@fctc/sme-widget-ui 1.1.8 → 1.2.0

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 CHANGED
@@ -1,93 +1,93 @@
1
- # edu-widget-ui
2
-
3
-
4
-
5
- ## Getting started
6
-
7
- To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
-
9
- Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
-
11
- ## Add your files
12
-
13
- - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
- - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
-
16
- ```
17
- cd existing_repo
18
- git remote add origin https://gitlab.atomsolution.vn/education-erp/edu-widget-ui.git
19
- git branch -M main
20
- git push -uf origin main
21
- ```
22
-
23
- ## Integrate with your tools
24
-
25
- - [ ] [Set up project integrations](https://gitlab.atomsolution.vn/education-erp/edu-widget-ui/-/settings/integrations)
26
-
27
- ## Collaborate with your team
28
-
29
- - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
- - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
- - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
- - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
- - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
-
35
- ## Test and Deploy
36
-
37
- Use the built-in continuous integration in GitLab.
38
-
39
- - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
- - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
- - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
- - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
- - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
-
45
- ***
46
-
47
- # Editing this README
48
-
49
- When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
-
51
- ## Suggestions for a good README
52
-
53
- Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
-
55
- ## Name
56
- Choose a self-explaining name for your project.
57
-
58
- ## Description
59
- Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
-
61
- ## Badges
62
- On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
-
64
- ## Visuals
65
- Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
-
67
- ## Installation
68
- Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
-
70
- ## Usage
71
- Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
-
73
- ## Support
74
- Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
-
76
- ## Roadmap
77
- If you have ideas for releases in the future, it is a good idea to list them in the README.
78
-
79
- ## Contributing
80
- State if you are open to contributions and what your requirements are for accepting them.
81
-
82
- For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
-
84
- You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
-
86
- ## Authors and acknowledgment
87
- Show your appreciation to those who have contributed to the project.
88
-
89
- ## License
90
- For open source projects, say how it is licensed.
91
-
92
- ## Project status
93
- If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
1
+ # edu-widget-ui
2
+
3
+
4
+
5
+ ## Getting started
6
+
7
+ To make it easy for you to get started with GitLab, here's a list of recommended next steps.
8
+
9
+ Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
10
+
11
+ ## Add your files
12
+
13
+ - [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
14
+ - [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
15
+
16
+ ```
17
+ cd existing_repo
18
+ git remote add origin https://gitlab.atomsolution.vn/education-erp/edu-widget-ui.git
19
+ git branch -M main
20
+ git push -uf origin main
21
+ ```
22
+
23
+ ## Integrate with your tools
24
+
25
+ - [ ] [Set up project integrations](https://gitlab.atomsolution.vn/education-erp/edu-widget-ui/-/settings/integrations)
26
+
27
+ ## Collaborate with your team
28
+
29
+ - [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
30
+ - [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
31
+ - [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
32
+ - [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
33
+ - [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
34
+
35
+ ## Test and Deploy
36
+
37
+ Use the built-in continuous integration in GitLab.
38
+
39
+ - [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
40
+ - [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
41
+ - [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
42
+ - [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
43
+ - [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
44
+
45
+ ***
46
+
47
+ # Editing this README
48
+
49
+ When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template.
50
+
51
+ ## Suggestions for a good README
52
+
53
+ Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
54
+
55
+ ## Name
56
+ Choose a self-explaining name for your project.
57
+
58
+ ## Description
59
+ Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
60
+
61
+ ## Badges
62
+ On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
63
+
64
+ ## Visuals
65
+ Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
66
+
67
+ ## Installation
68
+ Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
69
+
70
+ ## Usage
71
+ Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
72
+
73
+ ## Support
74
+ Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
75
+
76
+ ## Roadmap
77
+ If you have ideas for releases in the future, it is a good idea to list them in the README.
78
+
79
+ ## Contributing
80
+ State if you are open to contributions and what your requirements are for accepting them.
81
+
82
+ For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
83
+
84
+ You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
85
+
86
+ ## Authors and acknowledgment
87
+ Show your appreciation to those who have contributed to the project.
88
+
89
+ ## License
90
+ For open source projects, say how it is licensed.
91
+
92
+ ## Project status
93
+ If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
package/dist/index.css CHANGED
@@ -1,5 +1,103 @@
1
1
  @charset "UTF-8";
2
2
 
3
+ /* src/index.css */
4
+ @tailwind base;
5
+ @tailwind components;
6
+ @tailwind utilities;
7
+ @import url(https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap);
8
+ * {
9
+ font-family: "Inter", sans-serif;
10
+ }
11
+ @theme { --color-primary: var(--primary); --color-secondary: var(--secondary); }
12
+ .border-primary {
13
+ border: var(--color-primary);
14
+ }
15
+ .custom-checkbox {
16
+ appearance: none;
17
+ width: 20px;
18
+ height: 20px;
19
+ border: 2px solid #ccc;
20
+ border-radius: 4px;
21
+ position: relative;
22
+ cursor: pointer;
23
+ outline: none;
24
+ transition: border-color 0.3s ease, background-color 0.3s ease;
25
+ }
26
+ .custom-checkbox:checked {
27
+ border-color: var(--color-primary);
28
+ background-color: var(--color-primary);
29
+ }
30
+ .custom-checkbox:checked::before {
31
+ content: "\2714";
32
+ color: white;
33
+ font-size: 14px;
34
+ position: absolute;
35
+ top: 50%;
36
+ left: 50%;
37
+ transform: translate(-50%, -50%);
38
+ }
39
+ .custom-checkbox-label {
40
+ cursor: pointer;
41
+ margin-left: 8px;
42
+ }
43
+ .custom-radio {
44
+ appearance: none;
45
+ width: 20px;
46
+ height: 20px;
47
+ border: 2px solid #ccc;
48
+ border-radius: 50%;
49
+ position: relative;
50
+ cursor: pointer;
51
+ outline: none;
52
+ transition: border-color 0.3s ease;
53
+ }
54
+ .custom-radio:checked {
55
+ border-color: var(--color-primary);
56
+ }
57
+ .custom-radio:checked::before {
58
+ content: "";
59
+ width: 12px;
60
+ height: 12px;
61
+ background-color: var( --color-primary );
62
+ border-radius: 50%;
63
+ position: absolute;
64
+ top: 50%;
65
+ left: 50%;
66
+ transform: translate(-50%, -50%);
67
+ }
68
+ .custom-radio-label {
69
+ cursor: pointer;
70
+ margin-left: 8px;
71
+ }
72
+ .field {
73
+ border-radius: 10px !important;
74
+ min-height: 44px !important;
75
+ width: 100% !important;
76
+ background-color: #f7f7f7 !important;
77
+ padding: 12px 12px 12px 8px !important;
78
+ font-weight: 400 !important;
79
+ color: var(--text-color) !important;
80
+ font-size: 14px !important;
81
+ min-width: max-content;
82
+ gap: 8px;
83
+ opacity: 1;
84
+ cursor: pointer !important;
85
+ field-sizing: content;
86
+ line-height: 1.5;
87
+ scrollbar-width: none;
88
+ resize: none;
89
+ min-width: unset;
90
+ }
91
+ .field[readonly] {
92
+ cursor: not-allowed !important;
93
+ border: 1px solid transparent !important;
94
+ color: var(--placeholder-color) !important;
95
+ opacity: 1;
96
+ }
97
+ .react-datepicker-popper {
98
+ z-index: 9999 !important;
99
+ }
100
+
3
101
  /* node_modules/react-datepicker/dist/react-datepicker.css */
4
102
  .react-datepicker__navigation-icon::before,
5
103
  .react-datepicker__year-read-view--down-arrow,
package/dist/index.js CHANGED
@@ -18217,7 +18217,7 @@ var CharField = (props) => {
18217
18217
  value,
18218
18218
  defaultValue
18219
18219
  } = props;
18220
- if (!isForm) {
18220
+ if (!isForm && !isEditTable) {
18221
18221
  const propValue = value || defaultValue;
18222
18222
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
18223
18223
  }
@@ -18258,7 +18258,7 @@ var CharField = (props) => {
18258
18258
  const displayValue = (widget === "access_token" || widget === "refresh_token") && typeof realValue === "string" && !isDirty ? "*".repeat(realValue?.length) : widget === "private_secret_key" && formValues?.id && typeof formValues?.id === "number" && !isDirty && typeof realValue === "string" ? `${realValue?.slice(0, 4)}${realValue?.length > 4 ? "*".repeat(realValue?.length - 4) : ""}` : typeof realValue === "string" || typeof realValue === "number" ? String(realValue) : "";
18259
18259
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
18260
18260
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
18261
- "textarea",
18261
+ "input",
18262
18262
  {
18263
18263
  value: displayValue,
18264
18264
  onChange: (e3) => {
@@ -34474,8 +34474,8 @@ var Many2OneField = (props) => {
34474
34474
  menuShouldScrollIntoView: false,
34475
34475
  options: options2,
34476
34476
  classNames: {
34477
- control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white !shadow-none !rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34478
- valueContainer: () => "!m-0 !p-0",
34477
+ control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white shadow-none rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34478
+ valueContainer: () => "!m-0 !p-0 ",
34479
34479
  singleValue: () => `!m-0 ${readonly ? "!text-[#5c5a5a]" : ""}`,
34480
34480
  input: () => "!m-0 !p-0",
34481
34481
  dropdownIndicator: () => `${isEditTable ? "invisible group-hover:visible" : ""} !m-0 !p-0`,
@@ -34508,6 +34508,11 @@ var Many2OneField = (props) => {
34508
34508
  ...base,
34509
34509
  padding: "0"
34510
34510
  }),
34511
+ valueContainer: (base) => ({
34512
+ ...base,
34513
+ padding: "0",
34514
+ margin: "0"
34515
+ }),
34511
34516
  menuPortal: (base) => ({
34512
34517
  ...base,
34513
34518
  zIndex: 9999
@@ -34646,10 +34651,10 @@ var StatusBarOptionField = (props) => {
34646
34651
  return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
34647
34652
  "label",
34648
34653
  {
34649
- className: `relative flex-shrink-0 cursor-default py-[10px] px-8 font-semibold !text-sm
34650
- ${value ? "bg-primary text-white" : "bg-[#F1F6F1] text-[#121212]"}
34651
- ${index4 === 0 ? "rounded-l-xl! " : "rounded-none"}
34652
- ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl!" : "rounded-none"}
34654
+ className: `relative flex-shrink-0 cursor-default py-[10px] pl-8 pr-[20px] font-semibold !text-xs
34655
+ ${value ? "bg-primary text-white" : "bg-[#FAFAFA] text-[#121212]"}
34656
+ ${index4 === 0 ? "rounded-l-xl" : "rounded-none"}
34657
+ ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl" : "rounded-none"}
34653
34658
  `,
34654
34659
  children: [
34655
34660
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("input", { type: "radio", checked: value, className: "hidden", disabled: true }),
@@ -34657,8 +34662,8 @@ var StatusBarOptionField = (props) => {
34657
34662
  !(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
34658
34663
  "div",
34659
34664
  {
34660
- className: `absolute top-[5px] z-[2] -right-4 w-[30px] h-[30px] border-t-4 border-r-4 border-white transform rotate-45
34661
- ${value ? "bg-primary" : "bg-[#F1F6F1]"}
34665
+ className: `absolute top-[50%] translate-y-[-50%] z-[2] w-[25.5px] h-[25.5px] transform rotate-45
34666
+ ${value ? "bg-primary border border-primary -right-[13px]" : " -right-[12.5px] bg-[#FAFAFA] border border-b-[#FAFAFA] border-l-[#FAFAFA] border-t-[rgba(0,0,0,0.04)] border-r-[rgba(0,0,0,0.04)]"}
34662
34667
  `
34663
34668
  }
34664
34669
  )
package/dist/index.mjs CHANGED
@@ -18098,7 +18098,7 @@ var CharField = (props) => {
18098
18098
  value,
18099
18099
  defaultValue
18100
18100
  } = props;
18101
- if (!isForm) {
18101
+ if (!isForm && !isEditTable) {
18102
18102
  const propValue = value || defaultValue;
18103
18103
  return /* @__PURE__ */ jsx72("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
18104
18104
  }
@@ -18139,7 +18139,7 @@ var CharField = (props) => {
18139
18139
  const displayValue = (widget === "access_token" || widget === "refresh_token") && typeof realValue === "string" && !isDirty ? "*".repeat(realValue?.length) : widget === "private_secret_key" && formValues?.id && typeof formValues?.id === "number" && !isDirty && typeof realValue === "string" ? `${realValue?.slice(0, 4)}${realValue?.length > 4 ? "*".repeat(realValue?.length - 4) : ""}` : typeof realValue === "string" || typeof realValue === "number" ? String(realValue) : "";
18140
18140
  return /* @__PURE__ */ jsxs49(Fragment16, { children: [
18141
18141
  /* @__PURE__ */ jsx72(
18142
- "textarea",
18142
+ "input",
18143
18143
  {
18144
18144
  value: displayValue,
18145
18145
  onChange: (e3) => {
@@ -34355,8 +34355,8 @@ var Many2OneField = (props) => {
34355
34355
  menuShouldScrollIntoView: false,
34356
34356
  options: options2,
34357
34357
  classNames: {
34358
- control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white !shadow-none !rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34359
- valueContainer: () => "!m-0 !p-0",
34358
+ control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white shadow-none rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34359
+ valueContainer: () => "!m-0 !p-0 ",
34360
34360
  singleValue: () => `!m-0 ${readonly ? "!text-[#5c5a5a]" : ""}`,
34361
34361
  input: () => "!m-0 !p-0",
34362
34362
  dropdownIndicator: () => `${isEditTable ? "invisible group-hover:visible" : ""} !m-0 !p-0`,
@@ -34389,6 +34389,11 @@ var Many2OneField = (props) => {
34389
34389
  ...base,
34390
34390
  padding: "0"
34391
34391
  }),
34392
+ valueContainer: (base) => ({
34393
+ ...base,
34394
+ padding: "0",
34395
+ margin: "0"
34396
+ }),
34392
34397
  menuPortal: (base) => ({
34393
34398
  ...base,
34394
34399
  zIndex: 9999
@@ -34527,10 +34532,10 @@ var StatusBarOptionField = (props) => {
34527
34532
  return /* @__PURE__ */ jsxs74(
34528
34533
  "label",
34529
34534
  {
34530
- className: `relative flex-shrink-0 cursor-default py-[10px] px-8 font-semibold !text-sm
34531
- ${value ? "bg-primary text-white" : "bg-[#F1F6F1] text-[#121212]"}
34532
- ${index4 === 0 ? "rounded-l-xl! " : "rounded-none"}
34533
- ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl!" : "rounded-none"}
34535
+ className: `relative flex-shrink-0 cursor-default py-[10px] pl-8 pr-[20px] font-semibold !text-xs
34536
+ ${value ? "bg-primary text-white" : "bg-[#FAFAFA] text-[#121212]"}
34537
+ ${index4 === 0 ? "rounded-l-xl" : "rounded-none"}
34538
+ ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl" : "rounded-none"}
34534
34539
  `,
34535
34540
  children: [
34536
34541
  /* @__PURE__ */ jsx106("input", { type: "radio", checked: value, className: "hidden", disabled: true }),
@@ -34538,8 +34543,8 @@ var StatusBarOptionField = (props) => {
34538
34543
  !(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx106(
34539
34544
  "div",
34540
34545
  {
34541
- className: `absolute top-[5px] z-[2] -right-4 w-[30px] h-[30px] border-t-4 border-r-4 border-white transform rotate-45
34542
- ${value ? "bg-primary" : "bg-[#F1F6F1]"}
34546
+ className: `absolute top-[50%] translate-y-[-50%] z-[2] w-[25.5px] h-[25.5px] transform rotate-45
34547
+ ${value ? "bg-primary border border-primary -right-[13px]" : " -right-[12.5px] bg-[#FAFAFA] border border-b-[#FAFAFA] border-l-[#FAFAFA] border-t-[rgba(0,0,0,0.04)] border-r-[rgba(0,0,0,0.04)]"}
34543
34548
  `
34544
34549
  }
34545
34550
  )
package/dist/widgets.css CHANGED
@@ -1,5 +1,103 @@
1
1
  @charset "UTF-8";
2
2
 
3
+ /* src/index.css */
4
+ @tailwind base;
5
+ @tailwind components;
6
+ @tailwind utilities;
7
+ @import url(https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap);
8
+ * {
9
+ font-family: "Inter", sans-serif;
10
+ }
11
+ @theme { --color-primary: var(--primary); --color-secondary: var(--secondary); }
12
+ .border-primary {
13
+ border: var(--color-primary);
14
+ }
15
+ .custom-checkbox {
16
+ appearance: none;
17
+ width: 20px;
18
+ height: 20px;
19
+ border: 2px solid #ccc;
20
+ border-radius: 4px;
21
+ position: relative;
22
+ cursor: pointer;
23
+ outline: none;
24
+ transition: border-color 0.3s ease, background-color 0.3s ease;
25
+ }
26
+ .custom-checkbox:checked {
27
+ border-color: var(--color-primary);
28
+ background-color: var(--color-primary);
29
+ }
30
+ .custom-checkbox:checked::before {
31
+ content: "\2714";
32
+ color: white;
33
+ font-size: 14px;
34
+ position: absolute;
35
+ top: 50%;
36
+ left: 50%;
37
+ transform: translate(-50%, -50%);
38
+ }
39
+ .custom-checkbox-label {
40
+ cursor: pointer;
41
+ margin-left: 8px;
42
+ }
43
+ .custom-radio {
44
+ appearance: none;
45
+ width: 20px;
46
+ height: 20px;
47
+ border: 2px solid #ccc;
48
+ border-radius: 50%;
49
+ position: relative;
50
+ cursor: pointer;
51
+ outline: none;
52
+ transition: border-color 0.3s ease;
53
+ }
54
+ .custom-radio:checked {
55
+ border-color: var(--color-primary);
56
+ }
57
+ .custom-radio:checked::before {
58
+ content: "";
59
+ width: 12px;
60
+ height: 12px;
61
+ background-color: var( --color-primary );
62
+ border-radius: 50%;
63
+ position: absolute;
64
+ top: 50%;
65
+ left: 50%;
66
+ transform: translate(-50%, -50%);
67
+ }
68
+ .custom-radio-label {
69
+ cursor: pointer;
70
+ margin-left: 8px;
71
+ }
72
+ .field {
73
+ border-radius: 10px !important;
74
+ min-height: 44px !important;
75
+ width: 100% !important;
76
+ background-color: #f7f7f7 !important;
77
+ padding: 12px 12px 12px 8px !important;
78
+ font-weight: 400 !important;
79
+ color: var(--text-color) !important;
80
+ font-size: 14px !important;
81
+ min-width: max-content;
82
+ gap: 8px;
83
+ opacity: 1;
84
+ cursor: pointer !important;
85
+ field-sizing: content;
86
+ line-height: 1.5;
87
+ scrollbar-width: none;
88
+ resize: none;
89
+ min-width: unset;
90
+ }
91
+ .field[readonly] {
92
+ cursor: not-allowed !important;
93
+ border: 1px solid transparent !important;
94
+ color: var(--placeholder-color) !important;
95
+ opacity: 1;
96
+ }
97
+ .react-datepicker-popper {
98
+ z-index: 9999 !important;
99
+ }
100
+
3
101
  /* node_modules/react-datepicker/dist/react-datepicker.css */
4
102
  .react-datepicker__navigation-icon::before,
5
103
  .react-datepicker__year-read-view--down-arrow,
package/dist/widgets.js CHANGED
@@ -17863,7 +17863,7 @@ var CharField = (props) => {
17863
17863
  value,
17864
17864
  defaultValue
17865
17865
  } = props;
17866
- if (!isForm) {
17866
+ if (!isForm && !isEditTable) {
17867
17867
  const propValue = value || defaultValue;
17868
17868
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
17869
17869
  }
@@ -17904,7 +17904,7 @@ var CharField = (props) => {
17904
17904
  const displayValue = (widget === "access_token" || widget === "refresh_token") && typeof realValue === "string" && !isDirty ? "*".repeat(realValue?.length) : widget === "private_secret_key" && formValues?.id && typeof formValues?.id === "number" && !isDirty && typeof realValue === "string" ? `${realValue?.slice(0, 4)}${realValue?.length > 4 ? "*".repeat(realValue?.length - 4) : ""}` : typeof realValue === "string" || typeof realValue === "number" ? String(realValue) : "";
17905
17905
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_jsx_runtime72.Fragment, { children: [
17906
17906
  /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
17907
- "textarea",
17907
+ "input",
17908
17908
  {
17909
17909
  value: displayValue,
17910
17910
  onChange: (e3) => {
@@ -34120,8 +34120,8 @@ var Many2OneField = (props) => {
34120
34120
  menuShouldScrollIntoView: false,
34121
34121
  options: options2,
34122
34122
  classNames: {
34123
- control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white !shadow-none !rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34124
- valueContainer: () => "!m-0 !p-0",
34123
+ control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white shadow-none rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34124
+ valueContainer: () => "!m-0 !p-0 ",
34125
34125
  singleValue: () => `!m-0 ${readonly ? "!text-[#5c5a5a]" : ""}`,
34126
34126
  input: () => "!m-0 !p-0",
34127
34127
  dropdownIndicator: () => `${isEditTable ? "invisible group-hover:visible" : ""} !m-0 !p-0`,
@@ -34154,6 +34154,11 @@ var Many2OneField = (props) => {
34154
34154
  ...base,
34155
34155
  padding: "0"
34156
34156
  }),
34157
+ valueContainer: (base) => ({
34158
+ ...base,
34159
+ padding: "0",
34160
+ margin: "0"
34161
+ }),
34157
34162
  menuPortal: (base) => ({
34158
34163
  ...base,
34159
34164
  zIndex: 9999
@@ -34292,10 +34297,10 @@ var StatusBarOptionField = (props) => {
34292
34297
  return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
34293
34298
  "label",
34294
34299
  {
34295
- className: `relative flex-shrink-0 cursor-default py-[10px] px-8 font-semibold !text-sm
34296
- ${value ? "bg-primary text-white" : "bg-[#F1F6F1] text-[#121212]"}
34297
- ${index4 === 0 ? "rounded-l-xl! " : "rounded-none"}
34298
- ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl!" : "rounded-none"}
34300
+ className: `relative flex-shrink-0 cursor-default py-[10px] pl-8 pr-[20px] font-semibold !text-xs
34301
+ ${value ? "bg-primary text-white" : "bg-[#FAFAFA] text-[#121212]"}
34302
+ ${index4 === 0 ? "rounded-l-xl" : "rounded-none"}
34303
+ ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl" : "rounded-none"}
34299
34304
  `,
34300
34305
  children: [
34301
34306
  /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("input", { type: "radio", checked: value, className: "hidden", disabled: true }),
@@ -34303,8 +34308,8 @@ var StatusBarOptionField = (props) => {
34303
34308
  !(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
34304
34309
  "div",
34305
34310
  {
34306
- className: `absolute top-[5px] z-[2] -right-4 w-[30px] h-[30px] border-t-4 border-r-4 border-white transform rotate-45
34307
- ${value ? "bg-primary" : "bg-[#F1F6F1]"}
34311
+ className: `absolute top-[50%] translate-y-[-50%] z-[2] w-[25.5px] h-[25.5px] transform rotate-45
34312
+ ${value ? "bg-primary border border-primary -right-[13px]" : " -right-[12.5px] bg-[#FAFAFA] border border-b-[#FAFAFA] border-l-[#FAFAFA] border-t-[rgba(0,0,0,0.04)] border-r-[rgba(0,0,0,0.04)]"}
34308
34313
  `
34309
34314
  }
34310
34315
  )
package/dist/widgets.mjs CHANGED
@@ -17800,7 +17800,7 @@ var CharField = (props) => {
17800
17800
  value,
17801
17801
  defaultValue
17802
17802
  } = props;
17803
- if (!isForm) {
17803
+ if (!isForm && !isEditTable) {
17804
17804
  const propValue = value || defaultValue;
17805
17805
  return /* @__PURE__ */ jsx72("span", { children: propValue && typeof propValue === "object" ? propValue.display_name : propValue });
17806
17806
  }
@@ -17841,7 +17841,7 @@ var CharField = (props) => {
17841
17841
  const displayValue = (widget === "access_token" || widget === "refresh_token") && typeof realValue === "string" && !isDirty ? "*".repeat(realValue?.length) : widget === "private_secret_key" && formValues?.id && typeof formValues?.id === "number" && !isDirty && typeof realValue === "string" ? `${realValue?.slice(0, 4)}${realValue?.length > 4 ? "*".repeat(realValue?.length - 4) : ""}` : typeof realValue === "string" || typeof realValue === "number" ? String(realValue) : "";
17842
17842
  return /* @__PURE__ */ jsxs49(Fragment16, { children: [
17843
17843
  /* @__PURE__ */ jsx72(
17844
- "textarea",
17844
+ "input",
17845
17845
  {
17846
17846
  value: displayValue,
17847
17847
  onChange: (e3) => {
@@ -34057,8 +34057,8 @@ var Many2OneField = (props) => {
34057
34057
  menuShouldScrollIntoView: false,
34058
34058
  options: options2,
34059
34059
  classNames: {
34060
- control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white !shadow-none !rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34061
- valueContainer: () => "!m-0 !p-0",
34060
+ control: ({ isFocused }) => `w-full flex min-h-[44px] ring-0 cursor-pointer outline-0 bg-white shadow-none rounded-[10px] py-2 px-3 text-sm text-[#1A1A1B] font-normal cursor-pointer gap-2 opacity-100 leading-5 resize-none overflow-hidden field-sizing-content ${isForm && (isFocused ? "!border-[1px] !border-primary !ring-0 outline-none" : "border !border-[rgba(66,66,66,0.12)]")} ${readonly && "!cursor-not-allowed"} ${isEditTable && "md:!min-w-[300px] max-w-[300px] !rounded-none !border !border-transparent !border-b !border-[#f7f7f7] hover:border-b-primary !bg-transparent min-h-auto"}`,
34061
+ valueContainer: () => "!m-0 !p-0 ",
34062
34062
  singleValue: () => `!m-0 ${readonly ? "!text-[#5c5a5a]" : ""}`,
34063
34063
  input: () => "!m-0 !p-0",
34064
34064
  dropdownIndicator: () => `${isEditTable ? "invisible group-hover:visible" : ""} !m-0 !p-0`,
@@ -34091,6 +34091,11 @@ var Many2OneField = (props) => {
34091
34091
  ...base,
34092
34092
  padding: "0"
34093
34093
  }),
34094
+ valueContainer: (base) => ({
34095
+ ...base,
34096
+ padding: "0",
34097
+ margin: "0"
34098
+ }),
34094
34099
  menuPortal: (base) => ({
34095
34100
  ...base,
34096
34101
  zIndex: 9999
@@ -34229,10 +34234,10 @@ var StatusBarOptionField = (props) => {
34229
34234
  return /* @__PURE__ */ jsxs74(
34230
34235
  "label",
34231
34236
  {
34232
- className: `relative flex-shrink-0 cursor-default py-[10px] px-8 font-semibold !text-sm
34233
- ${value ? "bg-primary text-white" : "bg-[#F1F6F1] text-[#121212]"}
34234
- ${index4 === 0 ? "rounded-l-xl! " : "rounded-none"}
34235
- ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl!" : "rounded-none"}
34237
+ className: `relative flex-shrink-0 cursor-default py-[10px] pl-8 pr-[20px] font-semibold !text-xs
34238
+ ${value ? "bg-primary text-white" : "bg-[#FAFAFA] text-[#121212]"}
34239
+ ${index4 === 0 ? "rounded-l-xl" : "rounded-none"}
34240
+ ${index4 === memoizedStatusOptions?.length - 1 ? "rounded-r-xl" : "rounded-none"}
34236
34241
  `,
34237
34242
  children: [
34238
34243
  /* @__PURE__ */ jsx106("input", { type: "radio", checked: value, className: "hidden", disabled: true }),
@@ -34240,8 +34245,8 @@ var StatusBarOptionField = (props) => {
34240
34245
  !(index4 === memoizedStatusOptions?.length - 1) && /* @__PURE__ */ jsx106(
34241
34246
  "div",
34242
34247
  {
34243
- className: `absolute top-[5px] z-[2] -right-4 w-[30px] h-[30px] border-t-4 border-r-4 border-white transform rotate-45
34244
- ${value ? "bg-primary" : "bg-[#F1F6F1]"}
34248
+ className: `absolute top-[50%] translate-y-[-50%] z-[2] w-[25.5px] h-[25.5px] transform rotate-45
34249
+ ${value ? "bg-primary border border-primary -right-[13px]" : " -right-[12.5px] bg-[#FAFAFA] border border-b-[#FAFAFA] border-l-[#FAFAFA] border-t-[rgba(0,0,0,0.04)] border-r-[rgba(0,0,0,0.04)]"}
34245
34250
  `
34246
34251
  }
34247
34252
  )
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
- {
2
- "name": "@fctc/sme-widget-ui",
3
- "version": "1.1.8",
4
- "main": "dist/index.cjs",
5
- "module": "dist/index.mjs",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./hooks": {
14
- "types": "./dist/hooks.d.ts",
15
- "import": "./dist/hooks.mjs",
16
- "require": "./dist/hooks.cjs"
17
- },
18
- "./icons": {
19
- "types": "./dist/icons.d.ts",
20
- "import": "./dist/icons.mjs",
21
- "require": "./dist/icons.cjs"
22
- },
23
- "./types": {
24
- "types": "./dist/types.d.ts",
25
- "import": "./dist/types.mjs",
26
- "require": "./dist/types.cjs"
27
- },
28
- "./widgets": {
29
- "types": "./dist/widgets.d.ts",
30
- "import": "./dist/widgets.mjs",
31
- "require": "./dist/widgets.cjs"
32
- },
33
- "./utils": {
34
- "types": "./dist/utils.d.ts",
35
- "import": "./dist/utils.mjs",
36
- "require": "./dist/utils.cjs"
37
- }
38
- },
39
- "files": [
40
- "dist"
41
- ],
42
- "scripts": {
43
- "build": "tsup",
44
- "test": "jest"
45
- },
46
- "dependencies": {
47
- "@headlessui/react": "^2.2.7",
48
- "@types/react-dom": "^19.1.7",
49
- "react-dom": "18.0.0",
50
- "zod": "^3.24.2"
51
- },
52
- "devDependencies": {
53
- "@hookform/resolvers": "^4.1.3",
54
- "@types/react": "18.0.0",
55
- "i18next": "^24.2.3",
56
- "i18next-browser-languagedetector": "^8.0.4",
57
- "jest": "^29.7.0",
58
- "moment": "^2.30.1",
59
- "react": "18.0.0",
60
- "react-datepicker": "^8.2.1",
61
- "react-hook-form": "^7.54.2",
62
- "react-i18next": "^15.4.1",
63
- "react-redux": "^9.2.0",
64
- "react-select": "^5.10.1",
65
- "react-toastify": "^11.0.5",
66
- "react-tooltip": "^5.28.0",
67
- "tailwindcss": "^3",
68
- "tsup": "^8.0.0",
69
- "typescript": "^5.8.2"
70
- }
71
- }
1
+ {
2
+ "name": "@fctc/sme-widget-ui",
3
+ "version": "1.2.0",
4
+ "main": "dist/index.cjs",
5
+ "module": "dist/index.mjs",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./hooks": {
14
+ "types": "./dist/hooks.d.ts",
15
+ "import": "./dist/hooks.mjs",
16
+ "require": "./dist/hooks.cjs"
17
+ },
18
+ "./icons": {
19
+ "types": "./dist/icons.d.ts",
20
+ "import": "./dist/icons.mjs",
21
+ "require": "./dist/icons.cjs"
22
+ },
23
+ "./types": {
24
+ "types": "./dist/types.d.ts",
25
+ "import": "./dist/types.mjs",
26
+ "require": "./dist/types.cjs"
27
+ },
28
+ "./widgets": {
29
+ "types": "./dist/widgets.d.ts",
30
+ "import": "./dist/widgets.mjs",
31
+ "require": "./dist/widgets.cjs"
32
+ },
33
+ "./utils": {
34
+ "types": "./dist/utils.d.ts",
35
+ "import": "./dist/utils.mjs",
36
+ "require": "./dist/utils.cjs"
37
+ }
38
+ },
39
+ "files": [
40
+ "dist"
41
+ ],
42
+ "scripts": {
43
+ "build": "tsup",
44
+ "test": "jest"
45
+ },
46
+ "dependencies": {
47
+ "@headlessui/react": "^2.2.7",
48
+ "@types/react-dom": "^19.1.7",
49
+ "react-dom": "18.0.0",
50
+ "zod": "^3.24.2"
51
+ },
52
+ "devDependencies": {
53
+ "@hookform/resolvers": "^4.1.3",
54
+ "@types/react": "18.0.0",
55
+ "i18next": "^24.2.3",
56
+ "i18next-browser-languagedetector": "^8.0.4",
57
+ "jest": "^29.7.0",
58
+ "moment": "^2.30.1",
59
+ "react": "18.0.0",
60
+ "react-datepicker": "^8.2.1",
61
+ "react-hook-form": "^7.54.2",
62
+ "react-i18next": "^15.4.1",
63
+ "react-redux": "^9.2.0",
64
+ "react-select": "^5.10.1",
65
+ "react-toastify": "^11.0.5",
66
+ "react-tooltip": "^5.28.0",
67
+ "tailwindcss": "^3",
68
+ "tsup": "^8.0.0",
69
+ "typescript": "^5.8.2"
70
+ }
71
+ }
package/dist/.babelrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "presets": [
3
- "@babel/preset-env",
4
- "@babel/preset-react",
5
- "@babel/preset-typescript"
6
- ]
7
- }
@@ -1,10 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- end_of_line = lf
5
- insert_final_newline = true
6
-
7
- [*.{js,json,yml}]
8
- charset = utf-8
9
- indent_style = space
10
- indent_size = 2
@@ -1,6 +0,0 @@
1
- dist
2
- .cache
3
- package-lock.json
4
- public
5
- node_modules
6
- yarn.lock
@@ -1,66 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: { browser: true, es2020: true },
4
- extends: [
5
- 'eslint:recommended',
6
- 'plugin:@typescript-eslint/recommended',
7
- 'plugin:prettier/recommended',
8
- ],
9
- ignorePatterns: ['dist', '.eslintrc.cjs', 'commitlint.config.cjs'],
10
- parser: '@typescript-eslint/parser',
11
- overrides: [
12
- {
13
- files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.cjs'],
14
- plugins: [
15
- '@typescript-eslint',
16
- 'unused-imports',
17
- 'simple-import-sort',
18
- 'react-refresh',
19
- ],
20
- rules: {
21
- 'react-refresh/only-export-components': [
22
- 'warn',
23
- { allowConstantExport: true },
24
- ],
25
- 'import/prefer-default-export': 'off',
26
- 'simple-import-sort/imports': [
27
- 'error',
28
- {
29
- groups: [
30
- // Packages `react` related packages come first.
31
- ['^react', '^@?\\w'],
32
- // Internal packages.
33
- ['^(@|components)(/.*|$)'],
34
- // Side effect imports.
35
- ['^\\u0000'],
36
- // Parent imports. Put `..` last.
37
- ['^\\.\\.(?!/?$)', '^\\.\\./?$'],
38
- // Other relative imports. Put same-folder imports and `.` last.
39
- ['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
40
- // Style imports.
41
- ['^.+\\.?(css)$'],
42
- ],
43
- },
44
- ],
45
- 'prettier/prettier': [
46
- 'error',
47
- {
48
- endOfLine: 'auto',
49
- },
50
- ],
51
- 'react/react-in-jsx-scope': 'off',
52
- 'no-param-reassign': 'off',
53
- 'simple-import-sort/exports': 'error',
54
- '@typescript-eslint/no-unused-vars': 'off',
55
- '@typescript-eslint/no-non-null-assertion': 'off',
56
- '@typescript-eslint/no-explicit-any': 'off',
57
- '@typescript-eslint/ban-ts-comment': 'off',
58
- '@typescript-eslint/ban-types': 'off',
59
- 'unused-imports/no-unused-imports': 'error',
60
- 'unused-imports/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
61
- 'no-plusplus': 'off',
62
- 'no-case-declarations': 'off',
63
- },
64
- },
65
- ],
66
- }
@@ -1,4 +0,0 @@
1
- /.yarn/** linguist-vendored
2
- /.yarn/releases/* binary
3
- /.yarn/plugins/**/* binary
4
- /.pnp.* binary linguist-generated
package/dist/.prettierrc DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "semi": false
4
- }