pesona-ui 1.0.5 → 1.0.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/dist/index.cjs.js CHANGED
@@ -7562,8 +7562,20 @@ function IconBase(props) {
7562
7562
  }
7563
7563
 
7564
7564
  // THIS FILE IS AUTO GENERATED
7565
- function FiChevronDown (props) {
7565
+ function FiCheck (props) {
7566
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"20 6 9 17 4 12"},"child":[]}]})(props);
7567
+ }function FiChevronDown (props) {
7566
7568
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"6 9 12 15 18 9"},"child":[]}]})(props);
7569
+ }function FiChevronLeft (props) {
7570
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"15 18 9 12 15 6"},"child":[]}]})(props);
7571
+ }function FiChevronRight (props) {
7572
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"9 18 15 12 9 6"},"child":[]}]})(props);
7573
+ }function FiSkipBack (props) {
7574
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polygon","attr":{"points":"19 20 9 12 19 4 19 20"},"child":[]},{"tag":"line","attr":{"x1":"5","y1":"19","x2":"5","y2":"5"},"child":[]}]})(props);
7575
+ }function FiSkipForward (props) {
7576
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polygon","attr":{"points":"5 4 15 12 5 20 5 4"},"child":[]},{"tag":"line","attr":{"x1":"19","y1":"5","x2":"19","y2":"19"},"child":[]}]})(props);
7577
+ }function FiTrash (props) {
7578
+ return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"3 6 5 6 21 6"},"child":[]},{"tag":"path","attr":{"d":"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},"child":[]}]})(props);
7567
7579
  }function FiX (props) {
7568
7580
  return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"line","attr":{"x1":"18","y1":"6","x2":"6","y2":"18"},"child":[]},{"tag":"line","attr":{"x1":"6","y1":"6","x2":"18","y2":"18"},"child":[]}]})(props);
7569
7581
  }
@@ -8614,6 +8626,51 @@ const TableFooter = ({ children, className = '' }) => {
8614
8626
  return React.createElement("tfoot", { className: className }, children);
8615
8627
  };
8616
8628
 
8629
+ const TableDeleteSelectedItems = ({ count, handleMultipleDelete }) => {
8630
+ return (React.createElement("div", { className: "selected-toolbar" },
8631
+ React.createElement(Button, { className: "btn-icon btn-danger", onClick: handleMultipleDelete },
8632
+ React.createElement(FiTrash, null)),
8633
+ React.createElement("p", null,
8634
+ count,
8635
+ " item selected")));
8636
+ };
8637
+
8638
+ const TablePaginating = ({ startIndex, endIndex, currentPage, totalData, itemsPerPage, setItemsPerPage, setCurrentPage, totalPages, showPerPage = true, }) => {
8639
+ return (React.createElement("div", { className: "pagination-toolbar" },
8640
+ showPerPage && (React.createElement("div", { className: "pagination-select" },
8641
+ React.createElement("p", null, "Baris per halaman:"),
8642
+ React.createElement(Select, { name: "row_perpage", size: "sm", options: [
8643
+ { value: '10', label: '10' },
8644
+ { value: '20', label: '20' },
8645
+ { value: '30', label: '30' },
8646
+ { value: '50', label: '50' },
8647
+ ], value: itemsPerPage.toString(), onChange: (e) => {
8648
+ setItemsPerPage(Number(e.target.value));
8649
+ setCurrentPage(1);
8650
+ } }))),
8651
+ React.createElement("div", { className: "pagination-nav" }, ` ${startIndex + 1} - ${Math.min(endIndex, totalData)} dari ${totalData}`),
8652
+ React.createElement("div", { className: "pagination-button" },
8653
+ React.createElement("div", { className: "btn-group" },
8654
+ React.createElement(Button, { className: `btn-icon btn-info`, onClick: () => setCurrentPage(1), disabled: currentPage <= 1 },
8655
+ React.createElement(FiSkipBack, null)),
8656
+ React.createElement(Button, { className: `btn-icon btn-info`, onClick: () => setCurrentPage(currentPage - 1), disabled: currentPage <= 1 },
8657
+ React.createElement(FiChevronLeft, null)),
8658
+ React.createElement(Button, { className: `btn-icon btn-info`, onClick: () => setCurrentPage(Math.min(currentPage + 1, totalPages)), disabled: currentPage >= totalPages },
8659
+ React.createElement(FiChevronRight, null)),
8660
+ React.createElement(Button, { className: `btn-icon btn-info`, onClick: () => setCurrentPage(totalPages), disabled: currentPage >= totalPages },
8661
+ React.createElement(FiSkipForward, null))))));
8662
+ };
8663
+
8664
+ const TablePickSelectedItems = ({ count, selectedItem, selectedRows, }) => {
8665
+ return (React.createElement("div", { className: "selected-toolbar-block", style: { borderRadius: '0 0 4px 0' } },
8666
+ React.createElement("span", null,
8667
+ count,
8668
+ " item selected"),
8669
+ React.createElement(Button, { className: "btn btn-primary", onClick: () => selectedItem(selectedRows) },
8670
+ React.createElement(FiCheck, null),
8671
+ " Gunakan")));
8672
+ };
8673
+
8617
8674
  exports.Accordion = Accordion;
8618
8675
  exports.AccordionSection = AccordionSection;
8619
8676
  exports.AccordionSectionBody = AccordionSectionBody;
@@ -8675,8 +8732,11 @@ exports.Tab = Tab;
8675
8732
  exports.Table = Table;
8676
8733
  exports.TableBody = TableBody;
8677
8734
  exports.TableCell = TableCell;
8735
+ exports.TableDeleteSelectedItems = TableDeleteSelectedItems;
8678
8736
  exports.TableFooter = TableFooter;
8679
8737
  exports.TableHeader = TableHeader;
8738
+ exports.TablePaginating = TablePaginating;
8739
+ exports.TablePickSelectedItems = TablePickSelectedItems;
8680
8740
  exports.TableRow = TableRow;
8681
8741
  exports.Tabs = Tabs;
8682
8742
  exports.Tooltip = Tooltip;