pesona-ui 1.0.2 → 1.0.4

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.esm.js CHANGED
@@ -7908,6 +7908,31 @@ const FormRadio = ({ className = '', children }) => {
7908
7908
  return React.createElement("div", { className: `form-radio ${className}` }, children);
7909
7909
  };
7910
7910
 
7911
+ const ListView = ({ className = '', children }) => {
7912
+ return React.createElement("ul", { className: `block-list ${className}` }, children);
7913
+ };
7914
+ const ListItem = ({ children }) => {
7915
+ return React.createElement("li", null, children);
7916
+ };
7917
+
7918
+ const CheckboxAgreement = forwardRef(({ name, label, error, checked = false, onChange, ...rest }, ref) => {
7919
+ const uniqueCheckboxId = v4();
7920
+ const handleChange = (event) => {
7921
+ onChange(event);
7922
+ };
7923
+ return (React.createElement(React.Fragment, null,
7924
+ React.createElement(ListView, { className: `${error ? 'has-error' : ''}` },
7925
+ React.createElement(ListItem, null,
7926
+ React.createElement("div", { className: "d-flex align-items-center" },
7927
+ React.createElement(FormCheckbox, { className: `${error ? 'has-error' : ''}` },
7928
+ React.createElement("label", { className: `custom-checkbox`, htmlFor: uniqueCheckboxId },
7929
+ React.createElement("input", { className: "form-control", type: "checkbox", id: uniqueCheckboxId, name: name, ref: ref, role: "checkbox", checked: checked, onChange: handleChange, ...rest }),
7930
+ React.createElement("span", { className: "checkmark" })))),
7931
+ React.createElement("div", { className: "d-flex align-items-center pl-10" },
7932
+ React.createElement("p", { className: `mb-0 ${error ? 'text-danger' : ''}` }, label && React.createElement("span", { className: rest.required ? 'required' : '' }, label)))))));
7933
+ });
7934
+ CheckboxAgreement.displayName = 'CheckboxAgreement';
7935
+
7911
7936
  // Convert date to local format, e.g., '2024-12-31' local Indonesia
7912
7937
  const dateToDb = (date) => {
7913
7938
  return date
@@ -8534,6 +8559,13 @@ const Switch = React.forwardRef(({ name, className = '', error, checked = false,
8534
8559
  });
8535
8560
  Switch.displayName = 'Switch';
8536
8561
 
8562
+ const LoadingBar = ({ progress, visible }) => {
8563
+ if (!visible)
8564
+ return null;
8565
+ return (React.createElement("div", { className: "loading-bar-container" },
8566
+ React.createElement("div", { className: "loading-bar", style: { width: `${progress}%`, transition: 'width 300ms ease-in-out' } })));
8567
+ };
8568
+
8537
8569
  const DivTable = ({ children, className = '', view = 'list', gridColumn = 1 }) => {
8538
8570
  return (React.createElement("div", { className: `divcard-table ${view === 'grid' ? 'grid-mode' : ''} ${className}`, style: view === 'grid' ? { gridTemplateColumns: `repeat(${gridColumn}, 1fr)` } : {} }, children));
8539
8571
  };
@@ -8578,5 +8610,5 @@ const TableFooter = ({ children, className = '' }) => {
8578
8610
  return React.createElement("tfoot", { className: className }, children);
8579
8611
  };
8580
8612
 
8581
- export { Accordion, AccordionSection, AccordionSectionBody, AccordionSectionFooter, Alert, Badge, Button, Callout, Card, CardBody, CardFooter, CardHeader, Checkbox, CircularProgress, CircularProgressWithLabel, ClearInput, ConfirmationAlert, DatePicker, DivTable, DivTableBody, DivTableCell, DivTableFooter, DivTableHeader, DivTableRow, Dropdown, DropdownContent, DropdownDatePicker, DropdownMenu, DropdownToggle, FormCheckbox, FormContainer, FormGroup, FormRadio, Input, InputDate, InputFile, InputImageSize, InputTextArea, InputWysiwyg, LinearProgress, Modal, ModalBody, ModalFooter, ModalHeader, Popover, Radio, RadioButtonGroup, Select, SelectMultiple, SelectWithSearch, Spinner, Switch, Tab, Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, Tabs, Tooltip };
8613
+ export { Accordion, AccordionSection, AccordionSectionBody, AccordionSectionFooter, Alert, Badge, Button, Callout, Card, CardBody, CardFooter, CardHeader, Checkbox, CheckboxAgreement, CircularProgress, CircularProgressWithLabel, ClearInput, ConfirmationAlert, DatePicker, DivTable, DivTableBody, DivTableCell, DivTableFooter, DivTableHeader, DivTableRow, Dropdown, DropdownContent, DropdownDatePicker, DropdownMenu, DropdownToggle, FormCheckbox, FormContainer, FormGroup, FormRadio, Input, InputDate, InputFile, InputImageSize, InputTextArea, InputWysiwyg, LinearProgress, ListItem, ListView, LoadingBar, Modal, ModalBody, ModalFooter, ModalHeader, Popover, Radio, RadioButtonGroup, Select, SelectMultiple, SelectWithSearch, Spinner, Switch, Tab, Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, Tabs, Tooltip };
8582
8614
  //# sourceMappingURL=index.esm.js.map