@dilicorp/ui 0.0.55 → 0.0.57

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 +3 -2
  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 +2 -3
  17. package/dist/components/accordion/accordion-header.js +2 -4
  18. package/dist/components/accordion/accordion-item.js +2 -2
  19. package/dist/components/accordion/accordion.js +5 -7
  20. package/dist/components/alert-template/alert-provider.js +2 -2
  21. package/dist/components/alert-template/alert-template.js +2 -6
  22. package/dist/components/form-builder/_partials/form-group.js +3 -8
  23. package/dist/components/form-builder/components/button.js +4 -5
  24. package/dist/components/form-builder/components/checkbox.js +2 -4
  25. package/dist/components/form-builder/components/datepicker.js +2 -2
  26. package/dist/components/form-builder/components/dropzone.js +4 -19
  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 +8 -11
  30. package/dist/components/form-builder/components/input.js +6 -6
  31. package/dist/components/form-builder/components/password.js +2 -3
  32. package/dist/components/form-builder/components/radio.js +2 -4
  33. package/dist/components/form-builder/components/select.js +3 -2
  34. package/dist/components/form-builder/form-builder-element.js +2 -3
  35. package/dist/components/form-builder/form-builder.js +7 -12
  36. package/dist/components/navbar/navbar.js +4 -8
  37. package/dist/components/page-create/page-create.js +2 -12
  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 +3 -2
  40. package/dist/components/page-list/column-management-components/item-drag-drop.js +2 -4
  41. package/dist/components/page-list/column-management-components/modal-config.js +5 -34
  42. package/dist/components/page-list/filter-components/button-filter-clear.js +2 -3
  43. package/dist/components/page-list/filter-components/button-filter.js +2 -4
  44. package/dist/components/page-list/filter-components/button-filters.js +2 -4
  45. package/dist/components/page-list/filter-components/filter-form.js +3 -3
  46. package/dist/components/page-list/filters/filter-datepicker.js +2 -6
  47. package/dist/components/page-list/filters/filter-input.js +3 -11
  48. package/dist/components/page-list/filters/filter-select.js +2 -5
  49. package/dist/components/page-list/page-list-filters.js +2 -2
  50. package/dist/components/page-list/page-list-get-filters.js +3 -22
  51. package/dist/components/page-list/page-list.js +3 -16
  52. package/dist/components/page-show/page-show.js +3 -13
  53. package/dist/components/side-navigation-bar/side-navigation-bar-item.js +3 -8
  54. package/dist/components/side-navigation-bar/side-navigation-bar.js +8 -15
  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 +8 -10
  59. package/dist/molecules/alert.js +4 -8
  60. package/dist/molecules/breadcrumb.js +4 -6
  61. package/dist/molecules/card.js +2 -7
  62. package/dist/molecules/dropdown/dropdown-item.js +4 -4
  63. package/dist/molecules/dropdown/dropdown.js +12 -13
  64. package/dist/molecules/field.js +2 -4
  65. package/dist/molecules/paginate.js +2 -4
  66. package/dist/molecules/table.js +13 -16
  67. package/package.json +1 -1
  68. package/tsconfig.json +1 -1
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import React from 'react';
2
3
  import classNames from 'classnames';
3
4
  import { DropdownItem } from './dropdown-item';
@@ -28,17 +29,15 @@ export const Dropdown = (props) => {
28
29
  };
29
30
  }, [toggle]);
30
31
  const classesDropdown = classNames('dropdown-menu', align, toggle && 'show');
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
- }))));
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));
44
43
  };
@@ -1,6 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export const Field = ({ value, label }) => {
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)));
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));
6
4
  };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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,7 +32,5 @@ export const Paginate = (props) => {
32
32
  });
33
33
  }
34
34
  };
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]))));
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));
38
36
  };
@@ -9,6 +9,7 @@ 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";
12
13
  import React from 'react';
13
14
  import classNames from 'classnames';
14
15
  export const Table = (props) => {
@@ -79,20 +80,16 @@ export const Table = (props) => {
79
80
  return child;
80
81
  });
81
82
  const headersFiltered = headers.filter(filterHeader);
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))));
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));
98
95
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dilicorp/ui",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "description": "A simple UI design for Dilicorp",
5
5
  "repository": {
6
6
  "type": "git",
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",
17
+ "jsx": "react-jsx",
18
18
  "declaration": true,
19
19
  "declarationMap": true,
20
20
  "sourceMap": false,