@dilicorp/ui 0.0.57 → 0.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/atoms/button.js +2 -2
  2. package/dist/atoms/checkbox.js +2 -2
  3. package/dist/atoms/col.js +2 -2
  4. package/dist/atoms/container.js +2 -2
  5. package/dist/atoms/icon.js +2 -2
  6. package/dist/atoms/image.js +2 -2
  7. package/dist/atoms/input-datepicker.js +2 -3
  8. package/dist/atoms/input.js +2 -2
  9. package/dist/atoms/label.js +2 -2
  10. package/dist/atoms/link.js +3 -3
  11. package/dist/atoms/radio.js +2 -2
  12. package/dist/atoms/row.js +2 -2
  13. package/dist/atoms/separator.js +2 -2
  14. package/dist/atoms/spinner.js +2 -2
  15. package/dist/atoms/typography.js +2 -2
  16. package/dist/components/accordion/accordion-body.js +3 -2
  17. package/dist/components/accordion/accordion-header.js +4 -2
  18. package/dist/components/accordion/accordion-item.js +2 -2
  19. package/dist/components/accordion/accordion.js +7 -5
  20. package/dist/components/alert-template/alert-provider.js +2 -2
  21. package/dist/components/alert-template/alert-template.js +6 -2
  22. package/dist/components/form-builder/_partials/form-group.js +8 -3
  23. package/dist/components/form-builder/components/button.js +5 -4
  24. package/dist/components/form-builder/components/checkbox.js +4 -2
  25. package/dist/components/form-builder/components/datepicker.js +2 -2
  26. package/dist/components/form-builder/components/dropzone.js +19 -4
  27. package/dist/components/form-builder/components/input-currency.js +2 -2
  28. package/dist/components/form-builder/components/input-mask.js +2 -2
  29. package/dist/components/form-builder/components/input-prefix-suffix.js +11 -8
  30. package/dist/components/form-builder/components/input.js +6 -6
  31. package/dist/components/form-builder/components/password.js +3 -2
  32. package/dist/components/form-builder/components/radio.js +4 -2
  33. package/dist/components/form-builder/components/select.js +2 -3
  34. package/dist/components/form-builder/form-builder-element.js +3 -2
  35. package/dist/components/form-builder/form-builder.js +12 -7
  36. package/dist/components/navbar/navbar.js +8 -4
  37. package/dist/components/page-create/page-create.js +12 -2
  38. package/dist/components/page-list/column-management-components/button-config.js +3 -3
  39. package/dist/components/page-list/column-management-components/container-drag-drop.js +2 -3
  40. package/dist/components/page-list/column-management-components/item-drag-drop.js +4 -2
  41. package/dist/components/page-list/column-management-components/modal-config.js +34 -5
  42. package/dist/components/page-list/filter-components/button-filter-clear.js +3 -2
  43. package/dist/components/page-list/filter-components/button-filter.js +4 -2
  44. package/dist/components/page-list/filter-components/button-filters.js +4 -2
  45. package/dist/components/page-list/filter-components/filter-form.js +3 -3
  46. package/dist/components/page-list/filters/filter-datepicker.js +6 -2
  47. package/dist/components/page-list/filters/filter-input.js +11 -3
  48. package/dist/components/page-list/filters/filter-select.js +5 -2
  49. package/dist/components/page-list/page-list-filters.js +2 -2
  50. package/dist/components/page-list/page-list-get-filters.js +22 -3
  51. package/dist/components/page-list/page-list.js +16 -3
  52. package/dist/components/page-show/page-show.js +13 -3
  53. package/dist/components/side-navigation-bar/side-navigation-bar-item.js +8 -3
  54. package/dist/components/side-navigation-bar/side-navigation-bar.js +15 -8
  55. package/dist/components/tabs/tab-list.js +2 -2
  56. package/dist/components/tabs/tab-panel.js +2 -2
  57. package/dist/components/tabs/tab.js +2 -2
  58. package/dist/components/tabs/tabs.js +10 -8
  59. package/dist/molecules/alert.js +8 -4
  60. package/dist/molecules/breadcrumb.js +6 -4
  61. package/dist/molecules/card.js +7 -2
  62. package/dist/molecules/dropdown/dropdown-item.js +4 -4
  63. package/dist/molecules/dropdown/dropdown.js +13 -12
  64. package/dist/molecules/field.js +4 -2
  65. package/dist/molecules/paginate.js +4 -2
  66. package/dist/molecules/table.js +16 -13
  67. package/package.json +5 -5
  68. package/tsconfig.json +1 -1
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  import React from 'react';
3
2
  import classNames from 'classnames';
4
3
  import { DropdownItem } from './dropdown-item';
@@ -29,15 +28,17 @@ export const Dropdown = (props) => {
29
28
  };
30
29
  }, [toggle]);
31
30
  const classesDropdown = classNames('dropdown-menu', align, toggle && 'show');
32
- return (_jsxs("div", Object.assign({ ref: ref, className: "dropdown" }, { children: [_jsx(Tag, Object.assign({ className: classes, onClick: handleClick }, { children: label }), void 0), _jsx("div", Object.assign({ className: classesDropdown }, { children: items.map((item, index) => {
33
- const _item = Object.assign(Object.assign({}, item), { onClick: 'onClick' in item
34
- ? () => {
35
- setToggle(false);
36
- item.onClick();
37
- }
38
- : () => {
39
- setToggle(false);
40
- } });
41
- return (_jsx(DropdownItem, Object.assign({}, _item), `dropdown-item-${index}`));
42
- }) }), void 0)] }), void 0));
31
+ return (React.createElement("div", { ref: ref, className: "dropdown" },
32
+ React.createElement(Tag, { className: classes, onClick: handleClick }, label),
33
+ React.createElement("div", { className: classesDropdown }, items.map((item, index) => {
34
+ const _item = Object.assign(Object.assign({}, item), { onClick: 'onClick' in item
35
+ ? () => {
36
+ setToggle(false);
37
+ item.onClick();
38
+ }
39
+ : () => {
40
+ setToggle(false);
41
+ } });
42
+ return (React.createElement(DropdownItem, Object.assign({ key: `dropdown-item-${index}` }, _item)));
43
+ }))));
43
44
  };
@@ -1,4 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  export const Field = ({ value, label }) => {
3
- return (_jsxs("div", Object.assign({ className: "form-group" }, { children: [_jsx("div", Object.assign({ className: "form-label bold" }, { children: label }), void 0), Boolean(value) && _jsx("div", Object.assign({ className: "mb-3" }, { children: value }), void 0)] }), void 0));
3
+ return (React.createElement("div", { className: "form-group" },
4
+ React.createElement("div", { className: "form-label bold" }, label),
5
+ Boolean(value) && React.createElement("div", { className: "mb-3" }, value)));
4
6
  };
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import React from 'react';
2
2
  import ReactPagination from 'react-js-pagination';
3
3
  import uriHelper from '../utils/uri-helper';
4
4
  import { useLocation, useNavigate } from 'react-router-dom';
@@ -32,5 +32,7 @@ export const Paginate = (props) => {
32
32
  });
33
33
  }
34
34
  };
35
- return (_jsxs("div", Object.assign({ className: "box-paginate" }, { children: [_jsx(ReactPagination, Object.assign({}, config, { activePage: activePage, itemsCountPerPage: perPage, totalItemsCount: totalItems, onChange: handleChange }), void 0), _jsx("div", Object.assign({ className: "extra-paginate-info" }, { children: translate.replace(/%(\d+)/g, (_, n) => [`${String(from)} - ${String(to)}`, String(totalItems)][+n - 1]) }), void 0)] }), void 0));
35
+ return (React.createElement("div", { className: "box-paginate" },
36
+ React.createElement(ReactPagination, Object.assign({}, config, { activePage: activePage, itemsCountPerPage: perPage, totalItemsCount: totalItems, onChange: handleChange })),
37
+ React.createElement("div", { className: "extra-paginate-info" }, translate.replace(/%(\d+)/g, (_, n) => [`${String(from)} - ${String(to)}`, String(totalItems)][+n - 1]))));
36
38
  };
@@ -9,7 +9,6 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
12
  import React from 'react';
14
13
  import classNames from 'classnames';
15
14
  export const Table = (props) => {
@@ -80,16 +79,20 @@ export const Table = (props) => {
80
79
  return child;
81
80
  });
82
81
  const headersFiltered = headers.filter(filterHeader);
83
- return (_jsxs("table", Object.assign({ className: classesNames }, { children: [!!header && (_jsx("thead", { children: _jsx("tr", { children: headersFiltered.sort(sortHeader).map((head, index) => {
84
- var _a, _b, _c, _d;
85
- return (_jsx("th", Object.assign({ scope: "col" }, Object.assign(Object.assign({}, (_a = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _a === void 0 ? void 0 : _a.th), (_b = head.attributes) === null || _b === void 0 ? void 0 : _b.th), { className: handleClass((_c = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _c === void 0 ? void 0 : _c.th, (_d = head.attributes) === null || _d === void 0 ? void 0 : _d.th) }, { children: head.title }), `th-${index}`));
86
- }) }, void 0) }, void 0)), !!body && !childrenFiltered && (_jsx("tbody", { children: body.map((_a, index) => {
87
- var { attributes: attrs = null } = _a, item = __rest(_a, ["attributes"]);
88
- return (_jsx("tr", { children: Object.keys(item)
89
- .filter(filterBody)
90
- .sort(sortBody).map((key, idx) => {
91
- var _a, _b, _c, _d, _e, _f;
92
- return (_jsx("td", Object.assign({ scope: "row" }, Object.assign(Object.assign(Object.assign({}, (_a = attributes === null || attributes === void 0 ? void 0 : attributes.tbody) === null || _a === void 0 ? void 0 : _a.td), attrs === null || attrs === void 0 ? void 0 : attrs.td), (_c = (_b = item[key]) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.td), { className: handleClass((_d = attributes === null || attributes === void 0 ? void 0 : attributes.tbody) === null || _d === void 0 ? void 0 : _d.td, attrs === null || attrs === void 0 ? void 0 : attrs.td, (_f = (_e = item[key]) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.td) }, { children: render(item[key]) }), `td-${index}-${idx}`));
93
- }) }, `tr-${index}`));
94
- }) }, void 0)), childrenFiltered && !body && (_jsx("tbody", { children: childrenFiltered }, void 0))] }), void 0));
82
+ return (React.createElement("table", { className: classesNames },
83
+ !!header && (React.createElement("thead", null,
84
+ React.createElement("tr", null, headersFiltered.sort(sortHeader).map((head, index) => {
85
+ var _a, _b, _c, _d;
86
+ return (React.createElement("th", Object.assign({ key: `th-${index}`, scope: "col" }, Object.assign(Object.assign({}, (_a = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _a === void 0 ? void 0 : _a.th), (_b = head.attributes) === null || _b === void 0 ? void 0 : _b.th), { className: handleClass((_c = attributes === null || attributes === void 0 ? void 0 : attributes.thead) === null || _c === void 0 ? void 0 : _c.th, (_d = head.attributes) === null || _d === void 0 ? void 0 : _d.th) }), head.title));
87
+ })))),
88
+ !!body && !childrenFiltered && (React.createElement("tbody", null, body.map((_a, index) => {
89
+ var { attributes: attrs = null } = _a, item = __rest(_a, ["attributes"]);
90
+ return (React.createElement("tr", { key: `tr-${index}` }, Object.keys(item)
91
+ .filter(filterBody)
92
+ .sort(sortBody).map((key, idx) => {
93
+ var _a, _b, _c, _d, _e, _f;
94
+ return (React.createElement("td", Object.assign({ key: `td-${index}-${idx}`, scope: "row" }, Object.assign(Object.assign(Object.assign({}, (_a = attributes === null || attributes === void 0 ? void 0 : attributes.tbody) === null || _a === void 0 ? void 0 : _a.td), attrs === null || attrs === void 0 ? void 0 : attrs.td), (_c = (_b = item[key]) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.td), { className: handleClass((_d = attributes === null || attributes === void 0 ? void 0 : attributes.tbody) === null || _d === void 0 ? void 0 : _d.td, attrs === null || attrs === void 0 ? void 0 : attrs.td, (_f = (_e = item[key]) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.td) }), render(item[key])));
95
+ })));
96
+ }))),
97
+ childrenFiltered && !body && (React.createElement("tbody", null, childrenFiltered))));
95
98
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dilicorp/ui",
3
- "version": "0.0.57",
3
+ "version": "0.0.59",
4
4
  "description": "A simple UI design for Dilicorp",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,9 +48,9 @@
48
48
  "git-commit-msg-linter": "^3.2.8",
49
49
  "husky": "^7.0.4",
50
50
  "lint-staged": "^11.2.6",
51
- "react": "^17.0.2",
51
+ "react": "^18.2.0",
52
52
  "react-docgen-typescript-loader": "^3.7.2",
53
- "react-dom": "^17.0.2",
53
+ "react-dom": "^18.2.0",
54
54
  "react-router-dom": "^6.0.2",
55
55
  "sass": "^1.43.4",
56
56
  "sass-loader": "^10.1.1",
@@ -79,8 +79,8 @@
79
79
  "yup": "^0.32.11"
80
80
  },
81
81
  "peerDependencies": {
82
- "react": ">=17.0.2",
83
- "react-dom": ">=17.0.2",
82
+ "react": ">=^18.2.0",
83
+ "react-dom": ">=^18.2.0",
84
84
  "react-router-dom": ">=6.0.2"
85
85
  },
86
86
  "scripts": {
package/tsconfig.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "module": "es6",
15
15
  "lib": ["es6", "dom", "dom.iterable"],
16
16
  "allowJs": true,
17
- "jsx": "react-jsx",
17
+ "jsx": "react",
18
18
  "declaration": true,
19
19
  "declarationMap": true,
20
20
  "sourceMap": false,