@skalfa/skalfa-component 1.0.0 → 1.0.3

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 (188) hide show
  1. package/dist/accordion/Accordion.component.d.ts +1 -1
  2. package/dist/breadcrumb/Breadcrumb.component.d.ts +1 -1
  3. package/dist/button/Button.component.d.ts +1 -1
  4. package/dist/card/AlertCard.component.d.ts +1 -1
  5. package/dist/card/Card.component.d.ts +1 -1
  6. package/dist/card/DashboardCard.component.d.ts +1 -1
  7. package/dist/card/GalleryCard.component.d.ts +1 -1
  8. package/dist/card/ProductCard.component.d.ts +1 -1
  9. package/dist/card/ProfileCard.component.d.ts +1 -1
  10. package/dist/carousel/Carousel.component.d.ts +1 -1
  11. package/dist/chip/Chip.component.d.ts +1 -1
  12. package/dist/index.js +175 -56
  13. package/dist/input/Checkbox.component.d.ts +1 -1
  14. package/dist/input/Input.component.d.ts +1 -1
  15. package/dist/input/InputCheckbox.component.d.ts +1 -1
  16. package/dist/input/InputCheckbox.component.js +2 -2
  17. package/dist/input/InputCurrency.component.d.ts +1 -1
  18. package/dist/input/InputDate.component.d.ts +1 -1
  19. package/dist/input/InputDate.component.js +9 -7
  20. package/dist/input/InputDatetime.component.d.ts +1 -1
  21. package/dist/input/InputDatetime.component.js +13 -8
  22. package/dist/input/InputDocument.component.d.ts +1 -1
  23. package/dist/input/InputDocument.component.js +6 -4
  24. package/dist/input/InputImage.component.js +5 -3
  25. package/dist/input/InputMap.component.d.ts +1 -1
  26. package/dist/input/InputMap.component.js +5 -3
  27. package/dist/input/InputNumber.component.d.ts +1 -1
  28. package/dist/input/InputPassword.component.d.ts +1 -1
  29. package/dist/input/InputRadio.component.d.ts +1 -1
  30. package/dist/input/InputRadio.component.js +2 -2
  31. package/dist/input/InputTime.component.d.ts +1 -1
  32. package/dist/input/InputTime.component.js +5 -3
  33. package/dist/input/InputValues.component.d.ts +1 -1
  34. package/dist/input/Radio.component.d.ts +1 -1
  35. package/dist/input/Select.component.d.ts +1 -1
  36. package/dist/modal/FloatingPage.component.d.ts +1 -1
  37. package/dist/modal/FloatingPage.component.js +2 -2
  38. package/dist/modal/Modal.component.d.ts +1 -1
  39. package/dist/modal/Modal.component.js +2 -2
  40. package/dist/modal/ModalConfirm.component.d.ts +2 -2
  41. package/dist/modal/ModalConfirm.component.js +5 -3
  42. package/dist/modal/Toast.component.d.ts +1 -1
  43. package/dist/modal/Toast.component.js +2 -2
  44. package/dist/nav/Bottombar.component.d.ts +1 -1
  45. package/dist/nav/Footer.component.d.ts +1 -1
  46. package/dist/nav/Headbar.component.d.ts +4 -11
  47. package/dist/nav/Headbar.component.js +3 -22
  48. package/dist/nav/Navbar.component.d.ts +1 -1
  49. package/dist/nav/Navbar.component.js +2 -2
  50. package/dist/nav/Sidebar.component.d.ts +2 -2
  51. package/dist/nav/Tabbar.component.d.ts +1 -1
  52. package/dist/nav/Wizard.component.d.ts +1 -1
  53. package/dist/supervision/FormSupervision.component.d.ts +14 -2
  54. package/dist/supervision/FormSupervision.component.js +32 -17
  55. package/dist/supervision/TableSupervision.component.d.ts +7 -2
  56. package/dist/supervision/TableSupervision.component.js +25 -19
  57. package/dist/table/ControlBar.component.d.ts +2 -2
  58. package/dist/table/ControlBar.component.js +20 -14
  59. package/dist/table/FilterComponent.d.ts +2 -2
  60. package/dist/table/FilterComponent.js +24 -17
  61. package/dist/table/Pagination.component.d.ts +1 -1
  62. package/dist/table/Pagination.component.js +4 -3
  63. package/dist/table/Table.component.d.ts +4 -2
  64. package/dist/table/Table.component.js +11 -7
  65. package/dist/typography/TypographyArticle.component.d.ts +1 -1
  66. package/dist/typography/TypographyColumn.component.d.ts +1 -1
  67. package/dist/typography/TypographyContent.component.d.ts +1 -1
  68. package/dist/typography/TypographyTips.component.d.ts +1 -1
  69. package/dist/wrap/Image.component.d.ts +1 -1
  70. package/dist/wrap/ScrollContainer.component.d.ts +1 -1
  71. package/dist/wrap/ShortcutProvider.d.ts +1 -1
  72. package/dist/wrap/ShortcutProvider.js +2 -2
  73. package/dist/wrap/Swipe.component.d.ts +1 -1
  74. package/package.json +4 -3
  75. package/dist/src/accordion/Accordion.component.d.ts +0 -13
  76. package/dist/src/accordion/Accordion.component.js +0 -25
  77. package/dist/src/breadcrumb/Breadcrumb.component.d.ts +0 -14
  78. package/dist/src/breadcrumb/Breadcrumb.component.js +0 -21
  79. package/dist/src/button/Button.component.d.ts +0 -21
  80. package/dist/src/button/Button.component.js +0 -19
  81. package/dist/src/card/AlertCard.component.d.ts +0 -11
  82. package/dist/src/card/AlertCard.component.js +0 -9
  83. package/dist/src/card/Card.component.d.ts +0 -5
  84. package/dist/src/card/Card.component.js +0 -9
  85. package/dist/src/card/DashboardCard.component.d.ts +0 -9
  86. package/dist/src/card/DashboardCard.component.js +0 -13
  87. package/dist/src/card/GalleryCard.component.d.ts +0 -7
  88. package/dist/src/card/GalleryCard.component.js +0 -13
  89. package/dist/src/card/ProductCard.component.d.ts +0 -9
  90. package/dist/src/card/ProductCard.component.js +0 -13
  91. package/dist/src/card/ProfileCard.component.d.ts +0 -10
  92. package/dist/src/card/ProfileCard.component.js +0 -13
  93. package/dist/src/carousel/Carousel.component.d.ts +0 -13
  94. package/dist/src/carousel/Carousel.component.js +0 -37
  95. package/dist/src/chip/Chip.component.d.ts +0 -6
  96. package/dist/src/chip/Chip.component.js +0 -12
  97. package/dist/src/index.d.ts +0 -13
  98. package/dist/src/index.js +0 -29
  99. package/dist/src/input/Checkbox.component.d.ts +0 -13
  100. package/dist/src/input/Checkbox.component.js +0 -23
  101. package/dist/src/input/Input.component.d.ts +0 -23
  102. package/dist/src/input/Input.component.js +0 -134
  103. package/dist/src/input/InputCheckbox.component.d.ts +0 -27
  104. package/dist/src/input/InputCheckbox.component.js +0 -53
  105. package/dist/src/input/InputCurrency.component.d.ts +0 -21
  106. package/dist/src/input/InputCurrency.component.js +0 -30
  107. package/dist/src/input/InputDate.component.d.ts +0 -24
  108. package/dist/src/input/InputDate.component.js +0 -107
  109. package/dist/src/input/InputDatetime.component.d.ts +0 -17
  110. package/dist/src/input/InputDatetime.component.js +0 -75
  111. package/dist/src/input/InputDocument.component.d.ts +0 -22
  112. package/dist/src/input/InputDocument.component.js +0 -88
  113. package/dist/src/input/InputImage.component.d.ts +0 -23
  114. package/dist/src/input/InputImage.component.js +0 -260
  115. package/dist/src/input/InputMap.component.d.ts +0 -25
  116. package/dist/src/input/InputMap.component.js +0 -101
  117. package/dist/src/input/InputNumber.component.d.ts +0 -19
  118. package/dist/src/input/InputNumber.component.js +0 -40
  119. package/dist/src/input/InputOtp.component.d.ts +0 -14
  120. package/dist/src/input/InputOtp.component.js +0 -65
  121. package/dist/src/input/InputPassword.component.d.ts +0 -17
  122. package/dist/src/input/InputPassword.component.js +0 -59
  123. package/dist/src/input/InputRadio.component.d.ts +0 -27
  124. package/dist/src/input/InputRadio.component.js +0 -56
  125. package/dist/src/input/InputTime.component.d.ts +0 -23
  126. package/dist/src/input/InputTime.component.js +0 -73
  127. package/dist/src/input/InputValues.component.d.ts +0 -9
  128. package/dist/src/input/InputValues.component.js +0 -19
  129. package/dist/src/input/Radio.component.d.ts +0 -12
  130. package/dist/src/input/Radio.component.js +0 -22
  131. package/dist/src/input/Select.component.d.ts +0 -47
  132. package/dist/src/input/Select.component.js +0 -275
  133. package/dist/src/modal/BottomSheet.component.d.ts +0 -12
  134. package/dist/src/modal/BottomSheet.component.js +0 -161
  135. package/dist/src/modal/FloatingPage.component.d.ts +0 -12
  136. package/dist/src/modal/FloatingPage.component.js +0 -27
  137. package/dist/src/modal/Modal.component.d.ts +0 -12
  138. package/dist/src/modal/Modal.component.js +0 -27
  139. package/dist/src/modal/ModalConfirm.component.d.ts +0 -26
  140. package/dist/src/modal/ModalConfirm.component.js +0 -68
  141. package/dist/src/modal/Toast.component.d.ts +0 -11
  142. package/dist/src/modal/Toast.component.js +0 -58
  143. package/dist/src/nav/Bottombar.component.d.ts +0 -12
  144. package/dist/src/nav/Bottombar.component.js +0 -32
  145. package/dist/src/nav/Footer.component.d.ts +0 -37
  146. package/dist/src/nav/Footer.component.js +0 -49
  147. package/dist/src/nav/Headbar.component.d.ts +0 -14
  148. package/dist/src/nav/Headbar.component.js +0 -32
  149. package/dist/src/nav/Navbar.component.d.ts +0 -22
  150. package/dist/src/nav/Navbar.component.js +0 -26
  151. package/dist/src/nav/Sidebar.component.d.ts +0 -33
  152. package/dist/src/nav/Sidebar.component.js +0 -87
  153. package/dist/src/nav/Tabbar.component.d.ts +0 -13
  154. package/dist/src/nav/Tabbar.component.js +0 -17
  155. package/dist/src/nav/Wizard.component.d.ts +0 -9
  156. package/dist/src/nav/Wizard.component.js +0 -24
  157. package/dist/src/supervision/FormSupervision.component.d.ts +0 -93
  158. package/dist/src/supervision/FormSupervision.component.js +0 -168
  159. package/dist/src/supervision/TableSupervision.component.d.ts +0 -78
  160. package/dist/src/supervision/TableSupervision.component.js +0 -273
  161. package/dist/src/table/ControlBar.component.d.ts +0 -34
  162. package/dist/src/table/ControlBar.component.js +0 -205
  163. package/dist/src/table/FilterComponent.d.ts +0 -45
  164. package/dist/src/table/FilterComponent.js +0 -132
  165. package/dist/src/table/Pagination.component.d.ts +0 -8
  166. package/dist/src/table/Pagination.component.js +0 -32
  167. package/dist/src/table/Table.component.d.ts +0 -61
  168. package/dist/src/table/Table.component.js +0 -101
  169. package/dist/src/typography/TypographyArticle.component.d.ts +0 -8
  170. package/dist/src/typography/TypographyArticle.component.js +0 -7
  171. package/dist/src/typography/TypographyColumn.component.d.ts +0 -6
  172. package/dist/src/typography/TypographyColumn.component.js +0 -7
  173. package/dist/src/typography/TypographyContent.component.d.ts +0 -6
  174. package/dist/src/typography/TypographyContent.component.js +0 -7
  175. package/dist/src/typography/TypographyTips.component.d.ts +0 -6
  176. package/dist/src/typography/TypographyTips.component.js +0 -7
  177. package/dist/src/wrap/Draggable.component.d.ts +0 -34
  178. package/dist/src/wrap/Draggable.component.js +0 -214
  179. package/dist/src/wrap/Image.component.d.ts +0 -2
  180. package/dist/src/wrap/Image.component.js +0 -13
  181. package/dist/src/wrap/OutsideClick.component.d.ts +0 -6
  182. package/dist/src/wrap/OutsideClick.component.js +0 -34
  183. package/dist/src/wrap/ScrollContainer.component.d.ts +0 -10
  184. package/dist/src/wrap/ScrollContainer.component.js +0 -54
  185. package/dist/src/wrap/ShortcutProvider.d.ts +0 -1
  186. package/dist/src/wrap/ShortcutProvider.js +0 -42
  187. package/dist/src/wrap/Swipe.component.d.ts +0 -14
  188. package/dist/src/wrap/Swipe.component.js +0 -61
@@ -7,7 +7,9 @@ const react_1 = require("react");
7
7
  const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
8
8
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
9
9
  const _utils_1 = require("@utils");
10
- const _components_1 = require("@components");
10
+ const BottomSheet_component_1 = require("../modal/BottomSheet.component");
11
+ const Button_component_1 = require("../button/Button.component");
12
+ const Modal_component_1 = require("../modal/Modal.component");
11
13
  const InputImageComponent = ({ name, label, tip, value, disabled, aspect = "1/1", invalid, validations, onChange, register, unregister, className = "", }) => {
12
14
  const { isSm } = (0, _utils_1.useResponsive)();
13
15
  const randomId = (0, _utils_1.useInputRandomId)();
@@ -78,7 +80,7 @@ const InputImageComponent = ({ name, label, tip, value, disabled, aspect = "1/1"
78
80
  }, onDragOver: (e) => e.preventDefault(), onDragEnter: (e) => {
79
81
  e.preventDefault();
80
82
  setDrag(true);
81
- }, onDragLeave: () => setDrag(false), onDrop: onDropFile, children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-image-dropzone-content", children: [(0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: drag ? free_solid_svg_icons_1.faHandHolding : free_solid_svg_icons_1.faImages, className: "text-3xl" }), (0, jsx_runtime_1.jsx)("p", { className: "input-image-dropzone-text", children: drag ? "Letakkan di sini" : preview ? "Klik atau seret untuk ganti Gambar" : "Klik atau seret gambar" })] }), (0, jsx_runtime_1.jsx)("input", { id: randomId, ref: inputRef, type: "file", accept: "image/*", className: "hidden", disabled: disabled, onChange: onUpload })] }) }), preview && !disabled && ((0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, paint: "danger", size: "sm", className: "absolute top-10 right-4", onClick: remove })), invalidMessage && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-error-message", (0, _utils_1.pcn)(className, "error")), children: invalidMessage })), !isSm ? ((0, jsx_runtime_1.jsx)(_components_1.ModalComponent, { show: openCrop, onClose: onCropCancel, title: "Sesuaikan Gambar", className: "w-max max-w-[350px]", children: cropSrc && ((0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.CanvasCropper, { src: cropSrc, aspect: eval(aspect.replace(":", "/")), onDone: onCropDone }) })) })) : ((0, jsx_runtime_1.jsx)(_components_1.BottomSheetComponent, { show: openCrop, onClose: onCropCancel, size: 400, children: cropSrc && ((0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.CanvasCropper, { src: cropSrc, aspect: eval(aspect.replace(":", "/")), onDone: onCropDone }) })) }))] }));
83
+ }, onDragLeave: () => setDrag(false), onDrop: onDropFile, children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-image-dropzone-content", children: [(0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: drag ? free_solid_svg_icons_1.faHandHolding : free_solid_svg_icons_1.faImages, className: "text-3xl" }), (0, jsx_runtime_1.jsx)("p", { className: "input-image-dropzone-text", children: drag ? "Letakkan di sini" : preview ? "Klik atau seret untuk ganti Gambar" : "Klik atau seret gambar" })] }), (0, jsx_runtime_1.jsx)("input", { id: randomId, ref: inputRef, type: "file", accept: "image/*", className: "hidden", disabled: disabled, onChange: onUpload })] }) }), preview && !disabled && ((0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, paint: "danger", size: "sm", className: "absolute top-10 right-4", onClick: remove })), invalidMessage && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-error-message", (0, _utils_1.pcn)(className, "error")), children: invalidMessage })), !isSm ? ((0, jsx_runtime_1.jsx)(Modal_component_1.ModalComponent, { show: openCrop, onClose: onCropCancel, title: "Sesuaikan Gambar", className: "w-max max-w-[350px]", children: cropSrc && ((0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.CanvasCropper, { src: cropSrc, aspect: eval(aspect.replace(":", "/")), onDone: onCropDone }) })) })) : ((0, jsx_runtime_1.jsx)(BottomSheet_component_1.BottomSheetComponent, { show: openCrop, onClose: onCropCancel, size: 400, children: cropSrc && ((0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.CanvasCropper, { src: cropSrc, aspect: eval(aspect.replace(":", "/")), onDone: onCropDone }) })) }))] }));
82
84
  };
83
85
  exports.InputImageComponent = InputImageComponent;
84
86
  const CanvasCropper = ({ src, aspect, onDone, }) => {
@@ -255,6 +257,6 @@ const CanvasCropper = ({ src, aspect, onDone, }) => {
255
257
  setDragging(false);
256
258
  pinchDistRef.current = 0;
257
259
  };
258
- return ((0, jsx_runtime_1.jsxs)("div", { style: { touchAction: "none" }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-image-cropper-wrapper", style: { width: CROP_W, height: CROP_SIZE }, onMouseMove: handleMove, onMouseUp: handleUp, onMouseLeave: handleUp, onWheel: handleWheel, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, children: [(0, jsx_runtime_1.jsx)("canvas", { ref: canvasRef, width: CROP_W, height: CROP_SIZE, onMouseDown: handleDown, className: "cursor-move" }), (0, jsx_runtime_1.jsxs)("div", { className: "input-image-cropper-grid-container", style: { width: CROP_W, height: CROP_SIZE }, children: [(0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-border" }), (0, jsx_runtime_1.jsxs)("div", { className: "absolute inset-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-h input-image-cropper-grid-line-h-1" }), (0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-h input-image-cropper-grid-line-h-2" }), (0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-v input-image-cropper-grid-line-v-1" }), (0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-v input-image-cropper-grid-line-v-2" })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "p-4 pb-2", children: (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { label: "Selesai", variant: "outline", onClick: performCrop, block: true }) }), (0, jsx_runtime_1.jsx)("canvas", { ref: previewRef, className: "hidden" })] }));
260
+ return ((0, jsx_runtime_1.jsxs)("div", { style: { touchAction: "none" }, children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-image-cropper-wrapper", style: { width: CROP_W, height: CROP_SIZE }, onMouseMove: handleMove, onMouseUp: handleUp, onMouseLeave: handleUp, onWheel: handleWheel, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, children: [(0, jsx_runtime_1.jsx)("canvas", { ref: canvasRef, width: CROP_W, height: CROP_SIZE, onMouseDown: handleDown, className: "cursor-move" }), (0, jsx_runtime_1.jsxs)("div", { className: "input-image-cropper-grid-container", style: { width: CROP_W, height: CROP_SIZE }, children: [(0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-border" }), (0, jsx_runtime_1.jsxs)("div", { className: "absolute inset-0", children: [(0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-h input-image-cropper-grid-line-h-1" }), (0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-h input-image-cropper-grid-line-h-2" }), (0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-v input-image-cropper-grid-line-v-1" }), (0, jsx_runtime_1.jsx)("div", { className: "input-image-cropper-grid-line-v input-image-cropper-grid-line-v-2" })] })] })] }), (0, jsx_runtime_1.jsx)("div", { className: "p-4 pb-2", children: (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { label: "Selesai", variant: "outline", onClick: performCrop, block: true }) }), (0, jsx_runtime_1.jsx)("canvas", { ref: previewRef, className: "hidden" })] }));
259
261
  };
260
262
  exports.CanvasCropper = CanvasCropper;
@@ -17,7 +17,7 @@ export interface InputMapProps extends Omit<React.InputHTMLAttributes<HTMLInputE
17
17
  unregister?: (name: string) => void;
18
18
  className?: string;
19
19
  }
20
- export declare function InputMapComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputMapProps): import("react").JSX.Element;
20
+ export declare function InputMapComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputMapProps): import("@types/react").JSX.Element;
21
21
  export interface MapPickerProps {
22
22
  value?: any;
23
23
  onChange?: (value: any) => any;
@@ -15,7 +15,9 @@ const api_1 = require("@react-google-maps/api");
15
15
  const LoadScriptComponent = api_1.LoadScript;
16
16
  const GoogleMapComponent = api_1.GoogleMap;
17
17
  const _utils_1 = require("@utils");
18
- const _components_1 = require("@components");
18
+ const BottomSheet_component_1 = require("../modal/BottomSheet.component");
19
+ const Button_component_1 = require("../button/Button.component");
20
+ const OutsideClick_component_1 = require("../wrap/OutsideClick.component");
19
21
  function InputMapComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className = "", ...props }) {
20
22
  const { isSm } = (0, _utils_1.useResponsive)();
21
23
  // =========================>
@@ -27,14 +29,14 @@ function InputMapComponent({ label, tip, leftIcon, rightIcon, value, invalid, va
27
29
  // ## Invalid handler
28
30
  // =========================>
29
31
  const [invalidMessage] = (0, _utils_1.useValidation)(inputHandler.value, validations, invalid, inputHandler.idle);
30
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-container", children: [label && ((0, jsx_runtime_1.jsxs)("label", { htmlFor: randomId, className: (0, _utils_1.cn)("input-label", props.disabled && "input-label-disabled", inputHandler.focus && "input-label-focus", !!invalidMessage && "input-label-error", (0, _utils_1.pcn)(className, "label")), children: [label, validations && _utils_1.validation.hasRules(validations, "required") && (0, jsx_runtime_1.jsx)("span", { className: "text-danger ml-1", children: "*" })] })), tip && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-tip", props.disabled && "input-tip-disabled", (0, _utils_1.pcn)(className, "tip")), children: tip })), (0, jsx_runtime_1.jsx)(_components_1.OutsideClickComponent, { onOutsideClick: !isSm ? () => inputHandler.setFocus(false) : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("input", { ...props, id: randomId, className: (0, _utils_1.cn)("input", leftIcon && "input-with-left-icon", rightIcon && "input-with-right-icon", (0, _utils_1.pcn)(className, "input"), !!invalidMessage && "input-error"), value: inputHandler.value?.address || "", readOnly: true, onFocus: (e) => {
32
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-container", children: [label && ((0, jsx_runtime_1.jsxs)("label", { htmlFor: randomId, className: (0, _utils_1.cn)("input-label", props.disabled && "input-label-disabled", inputHandler.focus && "input-label-focus", !!invalidMessage && "input-label-error", (0, _utils_1.pcn)(className, "label")), children: [label, validations && _utils_1.validation.hasRules(validations, "required") && (0, jsx_runtime_1.jsx)("span", { className: "text-danger ml-1", children: "*" })] })), tip && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-tip", props.disabled && "input-tip-disabled", (0, _utils_1.pcn)(className, "tip")), children: tip })), (0, jsx_runtime_1.jsx)(OutsideClick_component_1.OutsideClickComponent, { onOutsideClick: !isSm ? () => inputHandler.setFocus(false) : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("input", { ...props, id: randomId, className: (0, _utils_1.cn)("input", leftIcon && "input-with-left-icon", rightIcon && "input-with-right-icon", (0, _utils_1.pcn)(className, "input"), !!invalidMessage && "input-error"), value: inputHandler.value?.address || "", readOnly: true, onFocus: (e) => {
31
33
  props.onFocus?.(e);
32
34
  inputHandler.setFocus(true);
33
35
  inputHandler.setIdle(false);
34
36
  }, autoComplete: "off" }), leftIcon && ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { className: (0, _utils_1.cn)("input-icon", "input-icon-left", props.disabled && "input-icon-disabled", inputHandler.focus && "input-icon-focus", (0, _utils_1.pcn)(className, "icon")), icon: leftIcon })), rightIcon && ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { className: (0, _utils_1.cn)("input-icon", "input-icon-right", props.disabled && "input-icon-disabled", inputHandler.focus && "input-icon-focus", (0, _utils_1.pcn)(className, "icon")), icon: rightIcon })), !isSm && inputHandler.focus && ((0, jsx_runtime_1.jsx)("div", { className: "input-map-suggest-container", style: { height: 300 }, children: (0, jsx_runtime_1.jsx)(exports.InputMapPickerComponent, { value: inputHandler.value, onChange: (e) => {
35
37
  inputHandler.setValue(e);
36
38
  onChange?.(e);
37
- } }) }))] }) }), invalidMessage && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-error-message", (0, _utils_1.pcn)(className, "error")), children: invalidMessage }))] }), isSm && ((0, jsx_runtime_1.jsx)(_components_1.BottomSheetComponent, { show: inputHandler.focus, onClose: () => inputHandler.setFocus(false), size: 450, footer: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { label: "Selesai", variant: "outline", onClick: () => inputHandler.setFocus(false), block: true }) }), children: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.InputMapPickerComponent, { onChange: (e) => {
39
+ } }) }))] }) }), invalidMessage && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-error-message", (0, _utils_1.pcn)(className, "error")), children: invalidMessage }))] }), isSm && ((0, jsx_runtime_1.jsx)(BottomSheet_component_1.BottomSheetComponent, { show: inputHandler.focus, onClose: () => inputHandler.setFocus(false), size: 450, footer: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { label: "Selesai", variant: "outline", onClick: () => inputHandler.setFocus(false), block: true }) }), children: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.InputMapPickerComponent, { onChange: (e) => {
38
40
  inputHandler.setValue(e);
39
41
  onChange?.(e);
40
42
  } }) }) }))] }));
@@ -16,4 +16,4 @@ export interface InputNumberProps extends Omit<InputHTMLAttributes<HTMLInputElem
16
16
  /** Use custom class with: "label::", "tip::", "error::", "icon::", "suggest::", "suggest-item::". */
17
17
  className?: string;
18
18
  }
19
- export declare function InputNumberComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, min, max, onChange, register, unregister, className, ...props }: InputNumberProps): import("react").JSX.Element;
19
+ export declare function InputNumberComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, min, max, onChange, register, unregister, className, ...props }: InputNumberProps): import("@types/react").JSX.Element;
@@ -14,4 +14,4 @@ export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputEl
14
14
  /** Use custom class with: "label::", "tip::", "error::", "icon::". */
15
15
  className?: string;
16
16
  }
17
- export declare function InputPasswordComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputPasswordProps): import("react").JSX.Element;
17
+ export declare function InputPasswordComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputPasswordProps): import("@types/react").JSX.Element;
@@ -24,4 +24,4 @@ export type InputRadioProps = {
24
24
  /** Use custom class with: "label::", "checked::", "error::". */
25
25
  classNameCheckbox?: string;
26
26
  };
27
- export declare function InputRadioComponent({ name, label, tip, vertical, value, disabled, invalid, options, serverOptionControl, customOptions, validations, onChange, register, unregister, className, classNameCheckbox, }: InputRadioProps): import("react").JSX.Element;
27
+ export declare function InputRadioComponent({ name, label, tip, vertical, value, disabled, invalid, options, serverOptionControl, customOptions, validations, onChange, register, unregister, className, classNameCheckbox, }: InputRadioProps): import("@types/react").JSX.Element;
@@ -5,7 +5,7 @@ exports.InputRadioComponent = InputRadioComponent;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const react_1 = require("react");
7
7
  const _utils_1 = require("@utils");
8
- const _components_1 = require("@components");
8
+ const Radio_component_1 = require("./Radio.component");
9
9
  function InputRadioComponent({ name, label, tip, vertical, value, disabled, invalid, options, serverOptionControl, customOptions, validations, onChange, register, unregister, className = "", classNameCheckbox = "", }) {
10
10
  const [dataOptions, setDataOptions] = (0, react_1.useState)([]);
11
11
  const [loading, setLoading] = (0, react_1.useState)(false);
@@ -42,7 +42,7 @@ function InputRadioComponent({ name, label, tip, vertical, value, disabled, inva
42
42
  return (0, jsx_runtime_1.jsx)("div", { className: "w-1/3 h-6 rounded-lg" }, key);
43
43
  }), (options || dataOptions) &&
44
44
  (options || dataOptions)?.map((option, key) => {
45
- return ((0, jsx_runtime_1.jsx)(_components_1.RadioComponent, { label: option.label, name: `option[${option.value}]#${name}`, checked: inputHandler.value == option.value, disabled: disabled, className: classNameCheckbox, onChange: () => {
45
+ return ((0, jsx_runtime_1.jsx)(Radio_component_1.RadioComponent, { label: option.label, name: `option[${option.value}]#${name}`, checked: inputHandler.value == option.value, disabled: disabled, className: classNameCheckbox, onChange: () => {
46
46
  if (inputHandler.value == option.value) {
47
47
  inputHandler.setValue("");
48
48
  onChange?.("");
@@ -14,7 +14,7 @@ export interface InputTimeProps extends Omit<InputHTMLAttributes<HTMLInputElemen
14
14
  /** Use custom class with: "label::", "tip::", "error::", "icon::". */
15
15
  className?: string;
16
16
  }
17
- export declare function InputTimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputTimeProps): import("react").JSX.Element;
17
+ export declare function InputTimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className, ...props }: InputTimeProps): import("@types/react").JSX.Element;
18
18
  interface InputTimePickerProps {
19
19
  onChange?: (time: string) => void;
20
20
  rightElement?: ReactNode;
@@ -7,7 +7,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("react");
8
8
  const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
9
9
  const _utils_1 = require("@utils");
10
- const _components_1 = require("@components");
10
+ const BottomSheet_component_1 = require("../modal/BottomSheet.component");
11
+ const Button_component_1 = require("../button/Button.component");
12
+ const OutsideClick_component_1 = require("../wrap/OutsideClick.component");
11
13
  function InputTimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, validations, register, unregister, onChange, className = "", ...props }) {
12
14
  const { isSm } = (0, _utils_1.useResponsive)();
13
15
  // =========================>
@@ -19,7 +21,7 @@ function InputTimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, v
19
21
  // ## Invalid handler
20
22
  // =========================>
21
23
  const [invalidMessage] = (0, _utils_1.useValidation)(inputHandler.value, validations, invalid, inputHandler.idle);
22
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-container", children: [(0, jsx_runtime_1.jsxs)("label", { htmlFor: randomId, className: (0, _utils_1.cn)("input-label", props.disabled && "input-label-disabled", inputHandler.focus && "input-label-focus", !!invalidMessage && "input-label-error", (0, _utils_1.pcn)(className, "label")), children: [label, validations && _utils_1.validation.hasRules(validations, "required") && (0, jsx_runtime_1.jsx)("span", { className: "text-danger ml-1", children: "*" })] }), tip && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-tip", props.disabled && "input-tip-disabled", (0, _utils_1.pcn)(className, "tip")), children: tip })), (0, jsx_runtime_1.jsx)(_components_1.OutsideClickComponent, { onOutsideClick: !isSm ? () => inputHandler.setFocus(false) : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("input", { ...props, id: randomId, className: (0, _utils_1.cn)("input", leftIcon && "input-with-left-icon", rightIcon && "input-with-right-icon", (0, _utils_1.pcn)(className, "input"), !!invalidMessage && "input-error"), value: inputHandler.value, onChange: (e) => {
24
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { className: "input-container", children: [(0, jsx_runtime_1.jsxs)("label", { htmlFor: randomId, className: (0, _utils_1.cn)("input-label", props.disabled && "input-label-disabled", inputHandler.focus && "input-label-focus", !!invalidMessage && "input-label-error", (0, _utils_1.pcn)(className, "label")), children: [label, validations && _utils_1.validation.hasRules(validations, "required") && (0, jsx_runtime_1.jsx)("span", { className: "text-danger ml-1", children: "*" })] }), tip && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-tip", props.disabled && "input-tip-disabled", (0, _utils_1.pcn)(className, "tip")), children: tip })), (0, jsx_runtime_1.jsx)(OutsideClick_component_1.OutsideClickComponent, { onOutsideClick: !isSm ? () => inputHandler.setFocus(false) : undefined, children: (0, jsx_runtime_1.jsxs)("div", { className: "relative", children: [(0, jsx_runtime_1.jsx)("input", { ...props, id: randomId, className: (0, _utils_1.cn)("input", leftIcon && "input-with-left-icon", rightIcon && "input-with-right-icon", (0, _utils_1.pcn)(className, "input"), !!invalidMessage && "input-error"), value: inputHandler.value, onChange: (e) => {
23
25
  inputHandler.setValue(e.target.value);
24
26
  inputHandler.setIdle(false);
25
27
  onChange?.(e.target.value);
@@ -29,7 +31,7 @@ function InputTimeComponent({ label, tip, leftIcon, rightIcon, value, invalid, v
29
31
  }, autoComplete: "off", inputMode: isSm ? "none" : undefined }), leftIcon && ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { className: (0, _utils_1.cn)("input-icon", "input-icon-left", props.disabled && "input-icon-disabled", inputHandler.focus && "input-icon-focus", (0, _utils_1.pcn)(className, "icon")), icon: leftIcon })), rightIcon && ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { className: (0, _utils_1.cn)("input-icon", "input-icon-right", props.disabled && "input-icon-disabled", inputHandler.focus && "input-icon-focus", (0, _utils_1.pcn)(className, "icon")), icon: rightIcon })), !isSm && inputHandler.focus && ((0, jsx_runtime_1.jsx)("div", { className: "input-time-picker-popover", children: (0, jsx_runtime_1.jsx)(exports.InputTimePickerComponent, { onChange: (time) => {
30
32
  inputHandler.setValue(time);
31
33
  onChange?.(time);
32
- } }) }))] }) }), invalidMessage && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-error-message", (0, _utils_1.pcn)(className, "error")), children: invalidMessage }))] }), isSm && ((0, jsx_runtime_1.jsx)(_components_1.BottomSheetComponent, { show: inputHandler.focus, onClose: () => inputHandler.setFocus(false), size: 380, footer: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { label: "Selesai", variant: "outline", onClick: () => inputHandler.setFocus(false), block: true }) }), children: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.InputTimePickerComponent, { onChange: (time) => {
34
+ } }) }))] }) }), invalidMessage && ((0, jsx_runtime_1.jsx)("small", { className: (0, _utils_1.cn)("input-error-message", (0, _utils_1.pcn)(className, "error")), children: invalidMessage }))] }), isSm && ((0, jsx_runtime_1.jsx)(BottomSheet_component_1.BottomSheetComponent, { show: inputHandler.focus, onClose: () => inputHandler.setFocus(false), size: 380, footer: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { label: "Selesai", variant: "outline", onClick: () => inputHandler.setFocus(false), block: true }) }), children: (0, jsx_runtime_1.jsx)("div", { className: "p-4", children: (0, jsx_runtime_1.jsx)(exports.InputTimePickerComponent, { onChange: (time) => {
33
35
  inputHandler.setValue(time);
34
36
  onChange?.(time);
35
37
  } }) }) }))] }));
@@ -6,4 +6,4 @@ export declare function InputValues({ value, className, onDelete, isFocus, onFoc
6
6
  isFocus?: boolean;
7
7
  onFocus?: () => void;
8
8
  style?: CSSProperties;
9
- }): import("react").JSX.Element;
9
+ }): import("@types/react").JSX.Element;
@@ -9,4 +9,4 @@ export interface RadioProps {
9
9
  /** Use custom class with: "label::", "checked::", "error::". */
10
10
  className?: string;
11
11
  }
12
- export declare function RadioComponent({ name, label, value, disabled, checked, invalid, onChange, className, }: RadioProps): import("react").JSX.Element;
12
+ export declare function RadioComponent({ name, label, value, disabled, checked, invalid, onChange, className, }: RadioProps): import("@types/react").JSX.Element;
@@ -44,4 +44,4 @@ export interface SelectProps {
44
44
  /** Use custom class with: "label::", "tip::", "error::", "icon::", "suggest::", "suggest-item::". */
45
45
  className?: string;
46
46
  }
47
- export declare function SelectComponent({ name, label, placeholder, tip, leftIcon, rightIcon, value, invalid, disabled, validations, multiple, autoFocus, clearable, options, searchable, serverOptionControl, idbOptionControl, serverSearchable, includedOptions, exceptOptions, tempOptions, newOption, maxShowOption, register, unregister, onChange, onFocus, onBlur, className, }: SelectProps): import("react").JSX.Element;
47
+ export declare function SelectComponent({ name, label, placeholder, tip, leftIcon, rightIcon, value, invalid, disabled, validations, multiple, autoFocus, clearable, options, searchable, serverOptionControl, idbOptionControl, serverSearchable, includedOptions, exceptOptions, tempOptions, newOption, maxShowOption, register, unregister, onChange, onFocus, onBlur, className, }: SelectProps): import("@types/react").JSX.Element;
@@ -9,4 +9,4 @@ export interface FloatingPageProps {
9
9
  /** Use custom class with: "backdrop::", "header::", "footer::". */
10
10
  className?: string;
11
11
  }
12
- export declare function FloatingPageComponent({ show, onClose, title, children, tip, footer, className, }: FloatingPageProps): import("react").JSX.Element;
12
+ export declare function FloatingPageComponent({ show, onClose, title, children, tip, footer, className, }: FloatingPageProps): import("@types/react").JSX.Element;
@@ -5,7 +5,7 @@ exports.FloatingPageComponent = FloatingPageComponent;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const react_1 = require("react");
7
7
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
8
- const _components_1 = require("@components");
8
+ const Button_component_1 = require("../button/Button.component");
9
9
  const _utils_1 = require("@utils");
10
10
  ;
11
11
  function FloatingPageComponent({ show, onClose, title, children, tip, footer, className = "", }) {
@@ -23,5 +23,5 @@ function FloatingPageComponent({ show, onClose, title, children, tip, footer, cl
23
23
  _utils_1.shortcut.unregister("escape");
24
24
  };
25
25
  }, [show]);
26
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-backdrop", !show && "opacity-0 scale-0 -translate-y-full", (0, _utils_1.pcn)(className, "backdrop")), onClick: () => onClose() }), (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("floating-page", !show && "top-[200vh] md:top-0 md:-right-[200vw]", (0, _utils_1.pcn)(className, "base")), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal-header", (0, _utils_1.pcn)(className, "header")), children: [title && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h6", { className: "modal-title", children: title }), tip && (0, jsx_runtime_1.jsx)("p", { className: "modal-tip", children: tip })] })), (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, variant: "simple", paint: "danger", onClick: () => onClose() })] }), show && children, footer && ((0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-footer absolute bottom-0 w-full", (0, _utils_1.pcn)(className, "footer")), children: show && footer }))] })] }));
26
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-backdrop", !show && "opacity-0 scale-0 -translate-y-full", (0, _utils_1.pcn)(className, "backdrop")), onClick: () => onClose() }), (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("floating-page", !show && "top-[200vh] md:top-0 md:-right-[200vw]", (0, _utils_1.pcn)(className, "base")), children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal-header", (0, _utils_1.pcn)(className, "header")), children: [title && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h6", { className: "modal-title", children: title }), tip && (0, jsx_runtime_1.jsx)("p", { className: "modal-tip", children: tip })] })), (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, variant: "simple", paint: "danger", onClick: () => onClose() })] }), show && children, footer && ((0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-footer absolute bottom-0 w-full", (0, _utils_1.pcn)(className, "footer")), children: show && footer }))] })] }));
27
27
  }
@@ -9,4 +9,4 @@ export interface ModalProps {
9
9
  /** Use custom class with: "backdrop::", "header::", "footer::". */
10
10
  className?: string;
11
11
  }
12
- export declare function ModalComponent({ show, onClose, title, children, tip, footer, className, }: ModalProps): import("react").JSX.Element;
12
+ export declare function ModalComponent({ show, onClose, title, children, tip, footer, className, }: ModalProps): import("@types/react").JSX.Element;
@@ -6,7 +6,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const react_1 = require("react");
7
7
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
8
8
  const _utils_1 = require("@utils");
9
- const _components_1 = require("@components");
9
+ const Button_component_1 = require("../button/Button.component");
10
10
  ;
11
11
  function ModalComponent({ show, onClose, title, children, tip, footer, className = "", }) {
12
12
  (0, react_1.useEffect)(() => {
@@ -23,5 +23,5 @@ function ModalComponent({ show, onClose, title, children, tip, footer, className
23
23
  _utils_1.shortcut.unregister("escape");
24
24
  };
25
25
  }, [show]);
26
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-backdrop", !show && "opacity-0 scale-0 -translate-y-full", (0, _utils_1.pcn)(className, "backdrop")), onClick: () => onClose() }), (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal", !show && "-translate-y-full opacity-0 scale-y-0", (0, _utils_1.pcn)(className, "base")), children: [title && ((0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal-header", (0, _utils_1.pcn)(className, "header")), children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h6", { className: "modal-title", children: title }), tip && (0, jsx_runtime_1.jsx)("p", { className: "modal-tip", children: tip })] }), (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, variant: "simple", paint: "danger", onClick: () => onClose() })] })), show && children, footer && ((0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-footer", (0, _utils_1.pcn)(className, "footer")), children: show && footer }))] })] }));
26
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-backdrop", !show && "opacity-0 scale-0 -translate-y-full", (0, _utils_1.pcn)(className, "backdrop")), onClick: () => onClose() }), (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal", !show && "-translate-y-full opacity-0 scale-y-0", (0, _utils_1.pcn)(className, "base")), children: [title && ((0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal-header", (0, _utils_1.pcn)(className, "header")), children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h6", { className: "modal-title", children: title }), tip && (0, jsx_runtime_1.jsx)("p", { className: "modal-tip", children: tip })] }), (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, variant: "simple", paint: "danger", onClick: () => onClose() })] })), show && children, footer && ((0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-footer", (0, _utils_1.pcn)(className, "footer")), children: show && footer }))] })] }));
27
27
  }
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from "react";
2
2
  import { ApiType } from "@utils";
3
- import { ButtonProps } from "@components";
3
+ import { ButtonProps } from "../button/Button.component";
4
4
  type SubmitIDB = {
5
5
  idb: {
6
6
  store: string;
@@ -22,5 +22,5 @@ export interface ModalConfirmProps {
22
22
  /** Use custom class with: "backdrop::", "header::", "footer::". */
23
23
  className?: string;
24
24
  }
25
- export declare function ModalConfirmComponent({ show, title, children, icon, footer, submitControl, onClose, className, }: ModalConfirmProps): import("react").JSX.Element;
25
+ export declare function ModalConfirmComponent({ show, title, children, icon, footer, submitControl, onClose, className, }: ModalConfirmProps): import("@types/react").JSX.Element;
26
26
  export {};
@@ -7,7 +7,9 @@ const react_1 = require("react");
7
7
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
8
8
  const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
9
9
  const _utils_1 = require("@utils");
10
- const _components_1 = require("@components");
10
+ const Toast_component_1 = require("./Toast.component");
11
+ const Button_component_1 = require("../button/Button.component");
12
+ const BottomSheet_component_1 = require("./BottomSheet.component");
11
13
  ;
12
14
  function ModalConfirmComponent({ show, title, children, icon, footer, submitControl, onClose, className = "", }) {
13
15
  const { isSm } = (0, _utils_1.useResponsive)();
@@ -31,7 +33,7 @@ function ModalConfirmComponent({ show, title, children, icon, footer, submitCont
31
33
  return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [title && ((0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("flex flex-col gap-2 items-center text-primary", (0, _utils_1.pcn)(className, "header")), children: [(0, jsx_runtime_1.jsx)("div", { className: "mt-6", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: icon || free_solid_svg_icons_1.faQuestion, className: `text-xl` }) }), (0, jsx_runtime_1.jsx)("h6", { className: "font-semibold text-lg", children: title })] })), children, footer && ((0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-footer", (0, _utils_1.pcn)(className, "footer")), children: footer }))] }));
32
34
  }, [title, footer, children]);
33
35
  const renderAction = (size = 'md') => {
34
- return ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-center pt-6", children: [(0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { label: "Batal", variant: "simple", onClick: () => onClose(), className: "text-foreground bg-background rounded-none", block: true, size: size }), (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { label: "Konfirmasi", loading: loading, onClick: async () => {
36
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-center pt-6", children: [(0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { label: "Batal", variant: "simple", onClick: () => onClose(), className: "text-foreground bg-background rounded-none", block: true, size: size }), (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { label: "Konfirmasi", loading: loading, onClick: async () => {
35
37
  if (!submitControl?.onSubmit)
36
38
  return;
37
39
  setLoading(true);
@@ -64,5 +66,5 @@ function ModalConfirmComponent({ show, title, children, icon, footer, submitCont
64
66
  }
65
67
  }, className: "rounded-none", block: true, size: size, ...submitControl })] }));
66
68
  };
67
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isSm ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-backdrop", !show && "opacity-0 scale-0 -translate-y-full", (0, _utils_1.pcn)(className, "backdrop")), onClick: () => onClose() }), (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal modal-confirm", !show && "-translate-y-full opacity-0 scale-y-0", (0, _utils_1.pcn)(className, "base")), children: [renderChildren, renderAction()] })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(_components_1.BottomSheetComponent, { show: show, onClose: onClose, size: 220, footer: renderAction('lg'), children: renderChildren }) })), (0, jsx_runtime_1.jsx)(_components_1.ToastComponent, { show: toast == "failed", onClose: () => setToast(false), title: "Gagal", className: "!border-danger header::text-danger", children: (0, jsx_runtime_1.jsxs)("p", { className: "px-3 pb-2 text-sm", children: ["Gagal ", title || "", "! cek data dan koneksi internet dan coba kembali!"] }) }), (0, jsx_runtime_1.jsx)(_components_1.ToastComponent, { show: toast == "success", onClose: () => setToast(false), title: "Berhasil", className: "!border-success header::text-success", children: (0, jsx_runtime_1.jsxs)("p", { className: "px-3 pb-2 text-sm", children: ["Berhasil ", title || "", "!"] }) })] }));
69
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isSm ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-backdrop", !show && "opacity-0 scale-0 -translate-y-full", (0, _utils_1.pcn)(className, "backdrop")), onClick: () => onClose() }), (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("modal modal-confirm", !show && "-translate-y-full opacity-0 scale-y-0", (0, _utils_1.pcn)(className, "base")), children: [renderChildren, renderAction()] })] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(BottomSheet_component_1.BottomSheetComponent, { show: show, onClose: onClose, size: 220, footer: renderAction('lg'), children: renderChildren }) })), (0, jsx_runtime_1.jsx)(Toast_component_1.ToastComponent, { show: toast == "failed", onClose: () => setToast(false), title: "Gagal", className: "!border-danger header::text-danger", children: (0, jsx_runtime_1.jsxs)("p", { className: "px-3 pb-2 text-sm", children: ["Gagal ", title || "", "! cek data dan koneksi internet dan coba kembali!"] }) }), (0, jsx_runtime_1.jsx)(Toast_component_1.ToastComponent, { show: toast == "success", onClose: () => setToast(false), title: "Berhasil", className: "!border-success header::text-success", children: (0, jsx_runtime_1.jsxs)("p", { className: "px-3 pb-2 text-sm", children: ["Berhasil ", title || "", "!"] }) })] }));
68
70
  }
@@ -8,4 +8,4 @@ export interface ToastProps {
8
8
  /** Use custom class with: "backdrop::", "header::", "footer::". */
9
9
  className?: string;
10
10
  }
11
- export declare function ToastComponent({ show, onClose, title, children, footer, className, }: ToastProps): import("react").JSX.Element;
11
+ export declare function ToastComponent({ show, onClose, title, children, footer, className, }: ToastProps): import("@types/react").JSX.Element;
@@ -6,7 +6,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const react_1 = require("react");
7
7
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
8
8
  const _utils_1 = require("@utils");
9
- const _components_1 = require("@components");
9
+ const Button_component_1 = require("../button/Button.component");
10
10
  ;
11
11
  function ToastComponent({ show, onClose, title, children, footer, className = "", }) {
12
12
  const [countdown, setCountdown] = (0, react_1.useState)(5);
@@ -51,7 +51,7 @@ function ToastComponent({ show, onClose, title, children, footer, className = ""
51
51
  }, 1000);
52
52
  setTimerId(id);
53
53
  };
54
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("toast", !show && "translate-y-full opacity-0 scale-y-0", (0, _utils_1.pcn)(className, "base")), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [title && ((0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("pt-2 px-3 flex justify-between items-center text-foreground", (0, _utils_1.pcn)(className, "header")), children: [(0, jsx_runtime_1.jsx)("h6", { className: "font-semibold", children: title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-foreground/50", children: countdown }), (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, variant: "simple", paint: "danger", onClick: () => {
54
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("toast", !show && "translate-y-full opacity-0 scale-y-0", (0, _utils_1.pcn)(className, "base")), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [title && ((0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("pt-2 px-3 flex justify-between items-center text-foreground", (0, _utils_1.pcn)(className, "header")), children: [(0, jsx_runtime_1.jsx)("h6", { className: "font-semibold", children: title }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)("span", { className: "text-xs text-foreground/50", children: countdown }), (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { icon: free_solid_svg_icons_1.faTimes, variant: "simple", paint: "danger", onClick: () => {
55
55
  clearInterval(timerId || "");
56
56
  onClose();
57
57
  }, size: "sm" })] })] })), show && children, footer && ((0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("modal-footer", (0, _utils_1.pcn)(className, "footer")), children: show && footer }))] }) }));
@@ -9,4 +9,4 @@ export interface BottombarProps {
9
9
  items?: BottombarItemProps[];
10
10
  className?: string;
11
11
  }
12
- export declare function BottombarComponent({ className, active, items, }: BottombarProps): import("react").JSX.Element;
12
+ export declare function BottombarComponent({ className, active, items, }: BottombarProps): import("@types/react").JSX.Element;
@@ -34,4 +34,4 @@ export interface FooterProps {
34
34
  path: string;
35
35
  };
36
36
  }
37
- export declare function FooterComponent({ brandTitle, brandSubtitle, address, phone, email, supportHours, socials, columns, copyrightLink, }: FooterProps): import("react").JSX.Element;
37
+ export declare function FooterComponent({ brandTitle, brandSubtitle, address, phone, email, supportHours, socials, columns, copyrightLink, }: FooterProps): import("@types/react").JSX.Element;
@@ -1,14 +1,7 @@
1
1
  import { ReactNode } from "react";
2
- export interface HeadbarUserProps {
3
- name: string;
4
- role: string;
5
- avatar?: any;
6
- }
7
2
  export interface HeadbarProps {
8
- children?: ReactNode;
9
- user?: HeadbarUserProps;
10
- onLogout?: () => void;
11
- onEditProfile?: () => void;
12
- className?: string;
3
+ title?: string;
4
+ backHref?: string | boolean;
5
+ rightContent?: ReactNode;
13
6
  }
14
- export declare function HeadbarComponent({ children, user, onLogout, onEditProfile, className, }: HeadbarProps): import("react").JSX.Element;
7
+ export declare function HeadbarComponent({ title, backHref, rightContent }: HeadbarProps): import("@types/react").JSX.Element;
@@ -3,30 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.HeadbarComponent = HeadbarComponent;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const react_1 = require("react");
7
6
  const navigation_1 = require("next/navigation");
8
7
  const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
9
8
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
10
- const _components_1 = require("@components");
11
- const _utils_1 = require("@utils");
12
- const defaultUser = {
13
- name: "Jhon Duck",
14
- role: "Admin",
15
- };
16
- function HeadbarComponent({ children, user = defaultUser, onLogout, onEditProfile, className = "", }) {
9
+ ;
10
+ function HeadbarComponent({ title, backHref, rightContent }) {
17
11
  const router = (0, navigation_1.useRouter)();
18
- const [profile, setProfile] = (0, react_1.useState)(false);
19
- const handleLogout = () => {
20
- if (onLogout) {
21
- onLogout();
22
- }
23
- else {
24
- _utils_1.auth.deleteAccessToken();
25
- router.push("/");
26
- }
27
- };
28
- const styles = {
29
- base: (0, _utils_1.cn)("headbar-base", className),
30
- };
31
- return ((0, jsx_runtime_1.jsxs)("div", { className: styles.base, children: [(0, jsx_runtime_1.jsx)("div", { className: "w-full ", children: children }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-right-controls", children: [(0, jsx_runtime_1.jsx)("div", { className: "headbar-icon-button", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faHistory }) }), (0, jsx_runtime_1.jsx)("div", { className: "headbar-icon-button", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faBell }) }), (0, jsx_runtime_1.jsx)("div", { className: "headbar-divider" }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-user-profile-trigger", onClick: () => setProfile(!profile), children: [(0, jsx_runtime_1.jsx)("div", { className: "headbar-user-avatar-wrapper", children: user.avatar ? ((0, jsx_runtime_1.jsx)(_components_1.ImageComponent, { src: user.avatar, alt: user.name, className: "w-full h-full object-cover" })) : ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUser })) }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-user-info", children: [(0, jsx_runtime_1.jsx)("h6", { className: "headbar-user-name", children: user.name }), (0, jsx_runtime_1.jsx)("h6", { className: "headbar-user-role", children: user.role })] })] })] }), (0, jsx_runtime_1.jsx)(_components_1.OutsideClickComponent, { onOutsideClick: () => setProfile(false), children: (0, jsx_runtime_1.jsxs)("div", { className: (0, _utils_1.cn)("headbar-dropdown", profile ? "scale-y-100" : "scale-y-0"), children: [(0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-header", children: [(0, jsx_runtime_1.jsx)("div", { className: "headbar-dropdown-avatar-wrapper", children: user.avatar ? ((0, jsx_runtime_1.jsx)(_components_1.ImageComponent, { src: user.avatar, alt: user.name, className: "w-full h-full object-cover" })) : ((0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUser, className: "text-2xl text-light-foreground" })) }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-user-info", children: [(0, jsx_runtime_1.jsx)("h6", { className: "text-lg font-bold line-clamp-1", children: user.name }), (0, jsx_runtime_1.jsx)("h6", { className: "text-xs -mt-1 font-semibold line-clamp-1", children: user.role })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-body", children: [(0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-item", onClick: onEditProfile, children: [(0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUserCog }), (0, jsx_runtime_1.jsx)("label", { className: "cursor-pointer font-semibold", children: "Edit Profile" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "headbar-dropdown-item-danger", onClick: handleLogout, children: [(0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faPowerOff }), (0, jsx_runtime_1.jsx)("label", { className: "cursor-pointer font-semibold", children: "Keluar" })] })] })] }) })] }));
12
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "flex justify-between w-full items-center mt-2 mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex items-center", children: [backHref && ((0, jsx_runtime_1.jsx)("div", { className: "w-8 aspect-square flex justify-center items-center cursor-pointer", onClick: () => typeof backHref != "boolean" ? router.push(backHref) : router.back(), children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faChevronLeft, className: "text-secondary text-xl" }) })), (0, jsx_runtime_1.jsx)("p", { className: "text-lg font-bold px-2", children: title })] }), rightContent && (0, jsx_runtime_1.jsx)("div", { children: rightContent })] }));
32
13
  }
@@ -19,4 +19,4 @@ export interface NavbarProps {
19
19
  onProfile?: () => void;
20
20
  className?: string;
21
21
  }
22
- export declare function NavbarComponent({ logoTitle, logoSubtitle, logoPath, specialLink, items, isLoggedIn, onLogin, onRegister, onProfile, className, }: NavbarProps): import("react").JSX.Element;
22
+ export declare function NavbarComponent({ logoTitle, logoSubtitle, logoPath, specialLink, items, isLoggedIn, onLogin, onRegister, onProfile, className, }: NavbarProps): import("@types/react").JSX.Element;
@@ -9,7 +9,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
9
9
  const link_1 = __importDefault(require("next/link"));
10
10
  const react_fontawesome_1 = require("@fortawesome/react-fontawesome");
11
11
  const free_solid_svg_icons_1 = require("@fortawesome/free-solid-svg-icons");
12
- const _components_1 = require("@components");
12
+ const Button_component_1 = require("../button/Button.component");
13
13
  const _utils_1 = require("@utils");
14
14
  const defaultItems = [
15
15
  { label: "Tentang", path: "" },
@@ -22,5 +22,5 @@ const defaultSpecialLink = {
22
22
  icon: free_solid_svg_icons_1.faStore,
23
23
  };
24
24
  function NavbarComponent({ logoTitle = "Next Light v.3", logoSubtitle = "The Magic Starter Template", logoPath = "/", specialLink = defaultSpecialLink, items = defaultItems, isLoggedIn = false, onLogin, onRegister, onProfile, className = "", }) {
25
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("navbar-topbar", className), children: (0, jsx_runtime_1.jsxs)("div", { className: "navbar-container", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-base", children: ["Ini untuk", (0, jsx_runtime_1.jsxs)(link_1.default, { href: specialLink.path, className: "navbar-special-link", children: [specialLink.icon && (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: specialLink.icon, className: "mr-1" }), specialLink.label] })] }), (0, jsx_runtime_1.jsx)("div", { className: "navbar-menu", children: items.map((item, key) => ((0, jsx_runtime_1.jsx)(link_1.default, { href: item.path, children: (0, jsx_runtime_1.jsx)("div", { className: "navbar-menu-item-sm", children: item.label }) }, key))) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "navbar-main", children: (0, jsx_runtime_1.jsxs)("div", { className: "navbar-main-container", children: [(0, jsx_runtime_1.jsx)(link_1.default, { href: logoPath, children: (0, jsx_runtime_1.jsxs)("div", { className: "w-max", children: [(0, jsx_runtime_1.jsx)("h1", { className: "navbar-logo-title", children: logoTitle }), logoSubtitle && ((0, jsx_runtime_1.jsx)("p", { className: "navbar-logo-subtitle", children: logoSubtitle }))] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-12 items-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "navbar-menu", children: items.map((item, key) => ((0, jsx_runtime_1.jsx)(link_1.default, { href: item.path, children: (0, jsx_runtime_1.jsx)("div", { className: "navbar-menu-item-base", children: item.label }) }, key))) }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex items-center gap-8", children: !isLoggedIn ? ((0, jsx_runtime_1.jsxs)("div", { className: "navbar-auth-buttons", children: [(0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { label: "Masuk", size: "sm", onClick: onLogin }), (0, jsx_runtime_1.jsx)(_components_1.ButtonComponent, { label: "Daftar", size: "sm", variant: "light", onClick: onRegister })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 w-max items-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-2 text-light-foreground hover:text-foreground cursor-pointer", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faHistory }) }), (0, jsx_runtime_1.jsx)("div", { className: "p-2 text-light-foreground hover:text-foreground cursor-pointer", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faBell }) }), (0, jsx_runtime_1.jsx)("div", { className: "h-5 w-[1px] bg-foreground mx-2.5" }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2.5 px-4 cursor-pointer -ml-2 text-light-foreground hover:text-foreground", onClick: onProfile, children: (0, jsx_runtime_1.jsx)("div", { className: "h-10 bg-background rounded-full aspect-square overflow-hidden flex justify-center items-center", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUser }) }) })] })) })] })] }) })] }));
25
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: (0, _utils_1.cn)("navbar-topbar", className), children: (0, jsx_runtime_1.jsxs)("div", { className: "navbar-container", children: [(0, jsx_runtime_1.jsxs)("h2", { className: "text-base", children: ["Ini untuk", (0, jsx_runtime_1.jsxs)(link_1.default, { href: specialLink.path, className: "navbar-special-link", children: [specialLink.icon && (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: specialLink.icon, className: "mr-1" }), specialLink.label] })] }), (0, jsx_runtime_1.jsx)("div", { className: "navbar-menu", children: items.map((item, key) => ((0, jsx_runtime_1.jsx)(link_1.default, { href: item.path, children: (0, jsx_runtime_1.jsx)("div", { className: "navbar-menu-item-sm", children: item.label }) }, key))) })] }) }), (0, jsx_runtime_1.jsx)("div", { className: "navbar-main", children: (0, jsx_runtime_1.jsxs)("div", { className: "navbar-main-container", children: [(0, jsx_runtime_1.jsx)(link_1.default, { href: logoPath, children: (0, jsx_runtime_1.jsxs)("div", { className: "w-max", children: [(0, jsx_runtime_1.jsx)("h1", { className: "navbar-logo-title", children: logoTitle }), logoSubtitle && ((0, jsx_runtime_1.jsx)("p", { className: "navbar-logo-subtitle", children: logoSubtitle }))] }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex gap-12 items-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "navbar-menu", children: items.map((item, key) => ((0, jsx_runtime_1.jsx)(link_1.default, { href: item.path, children: (0, jsx_runtime_1.jsx)("div", { className: "navbar-menu-item-base", children: item.label }) }, key))) }), (0, jsx_runtime_1.jsx)("div", { className: "w-full flex items-center gap-8", children: !isLoggedIn ? ((0, jsx_runtime_1.jsxs)("div", { className: "navbar-auth-buttons", children: [(0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { label: "Masuk", size: "sm", onClick: onLogin }), (0, jsx_runtime_1.jsx)(Button_component_1.ButtonComponent, { label: "Daftar", size: "sm", variant: "light", onClick: onRegister })] })) : ((0, jsx_runtime_1.jsxs)("div", { className: "flex gap-2 w-max items-center", children: [(0, jsx_runtime_1.jsx)("div", { className: "p-2 text-light-foreground hover:text-foreground cursor-pointer", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faHistory }) }), (0, jsx_runtime_1.jsx)("div", { className: "p-2 text-light-foreground hover:text-foreground cursor-pointer", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faBell }) }), (0, jsx_runtime_1.jsx)("div", { className: "h-5 w-[1px] bg-foreground mx-2.5" }), (0, jsx_runtime_1.jsx)("div", { className: "flex items-center gap-2.5 px-4 cursor-pointer -ml-2 text-light-foreground hover:text-foreground", onClick: onProfile, children: (0, jsx_runtime_1.jsx)("div", { className: "h-10 bg-background rounded-full aspect-square overflow-hidden flex justify-center items-center", children: (0, jsx_runtime_1.jsx)(react_fontawesome_1.FontAwesomeIcon, { icon: free_solid_svg_icons_1.faUser }) }) })] })) })] })] }) })] }));
26
26
  }
@@ -27,7 +27,7 @@ export interface sidebarProps {
27
27
  /** Use custom class with: "backdrop::", "head-item::", "item::", "child-item::". */
28
28
  className?: string;
29
29
  }
30
- export declare function SidebarComponent({ head, items, basePath, toggle, onToggleChange, className, }: sidebarProps): import("react").JSX.Element;
30
+ export declare function SidebarComponent({ head, items, basePath, toggle, onToggleChange, className, }: sidebarProps): import("@types/react").JSX.Element;
31
31
  export declare function SidebarContentComponent({ children }: {
32
32
  children: ReactNode;
33
- }): import("react").JSX.Element;
33
+ }): import("@types/react").JSX.Element;
@@ -10,4 +10,4 @@ export interface TabbarProps {
10
10
  }
11
11
  export declare function TabbarComponent({ items, onChange, active,
12
12
  /** Use custom class with: "item::", "active::". */
13
- className, }: TabbarProps): import("react").JSX.Element;
13
+ className, }: TabbarProps): import("@types/react").JSX.Element;
@@ -6,4 +6,4 @@ export interface WizardProps {
6
6
  }[];
7
7
  active: number;
8
8
  }
9
- export declare function WizardComponent({ items, active }: WizardProps): import("react").JSX.Element;
9
+ export declare function WizardComponent({ items, active }: WizardProps): import("@types/react").JSX.Element;
@@ -1,6 +1,18 @@
1
1
  import { ReactNode } from "react";
2
2
  import { ApiType, FormErrorType, FormRegisterType, FormValueType, ValidationRules, DBSchema } from "@utils";
3
- import { InputProps, InputCheckboxProps, InputCurrencyProps, InputDateProps, InputNumberProps, InputRadioProps, SelectProps, InputPasswordProps, InputOtpProps, InputTimeProps, InputImageProps, InputDateTimeProps, InputMapProps } from "@components";
3
+ import { InputCheckboxProps } from "../input/InputCheckbox.component";
4
+ import { InputProps } from "../input/Input.component";
5
+ import { InputCurrencyProps } from "../input/InputCurrency.component";
6
+ import { InputDateProps } from "../input/InputDate.component";
7
+ import { InputNumberProps } from "../input/InputNumber.component";
8
+ import { InputOtpProps } from "../input/InputOtp.component";
9
+ import { InputPasswordProps } from "../input/InputPassword.component";
10
+ import { InputRadioProps } from "../input/InputRadio.component";
11
+ import { SelectProps } from "../input/Select.component";
12
+ import { InputTimeProps } from "../input/InputTime.component";
13
+ import { InputImageProps } from "../input/InputImage.component";
14
+ import { InputDateTimeProps } from "../input/InputDatetime.component";
15
+ import { InputMapProps } from "../input/InputMap.component";
4
16
  type formCustomConstructionProps = ({ formControl, values, setValues, setRegister, errors, setErrors, }: {
5
17
  formControl: (name: string) => {
6
18
  register: (regName: string, regValidations?: ValidationRules | undefined) => void;
@@ -89,5 +101,5 @@ export interface formSupervisionProps {
89
101
  onError?: (code: number) => void;
90
102
  className?: string;
91
103
  }
92
- export declare function FormSupervisionComponent({ title, fields, submitControl, confirmation, defaultValue, onSuccess, onError, footerControl, payload, className, }: formSupervisionProps): import("react").JSX.Element;
104
+ export declare function FormSupervisionComponent({ title, fields, submitControl, confirmation, defaultValue, onSuccess, onError, footerControl, payload, className, }: formSupervisionProps): import("@types/react").JSX.Element;
93
105
  export {};