oa-componentbook 0.0.0-sit1.1

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 (320) hide show
  1. package/README.md +92 -0
  2. package/build/MockData.js +2311 -0
  3. package/build/components/oa-component-accordion/Accordion.js +195 -0
  4. package/build/components/oa-component-accordion/styles.js +13 -0
  5. package/build/components/oa-component-auto-complete/CustomAutoComplete.js +167 -0
  6. package/build/components/oa-component-bar-chart/BarChart.js +295 -0
  7. package/build/components/oa-component-bread-crumb/CustomBreadCrumb.js +47 -0
  8. package/build/components/oa-component-button/CustomButton.js +108 -0
  9. package/build/components/oa-component-button/styles.js +41 -0
  10. package/build/components/oa-component-checkbox/CustomCheckBox.js +115 -0
  11. package/build/components/oa-component-checkbox/styles.js +12 -0
  12. package/build/components/oa-component-count-card/CustomCountCard.js +74 -0
  13. package/build/components/oa-component-count-card/styles.js +12 -0
  14. package/build/components/oa-component-datepicker/CustomDatePicker.js +134 -0
  15. package/build/components/oa-component-demo-border-radius/BorderRadiusDemo.js +35 -0
  16. package/build/components/oa-component-demo-border-radius/styles.js +12 -0
  17. package/build/components/oa-component-demo-color-variables/ColorVariablesDemo.js +34 -0
  18. package/build/components/oa-component-demo-color-variables/styles.js +12 -0
  19. package/build/components/oa-component-demo-elevation/ElevationDemo.js +22 -0
  20. package/build/components/oa-component-demo-elevation/styles.js +12 -0
  21. package/build/components/oa-component-demo-spacing/SpacingScales.js +26 -0
  22. package/build/components/oa-component-demo-spacing/styles.js +259 -0
  23. package/build/components/oa-component-drawer/CustomDrawer.js +178 -0
  24. package/build/components/oa-component-drawer/styles.js +16 -0
  25. package/build/components/oa-component-dropdown/CustomDropdown.js +102 -0
  26. package/build/components/oa-component-dropdown/customClass.css +9 -0
  27. package/build/components/oa-component-dropdown/styles.js +12 -0
  28. package/build/components/oa-component-feedback-form/FeedbackForm.js +75 -0
  29. package/build/components/oa-component-feedback-tooltip/FeedbackTooltip.js +69 -0
  30. package/build/components/oa-component-form-item/CustomFormItem.js +74 -0
  31. package/build/components/oa-component-header/CustomHeader.js +104 -0
  32. package/build/components/oa-component-header/styles.js +12 -0
  33. package/build/components/oa-component-icons/CustomIcon.js +92 -0
  34. package/build/components/oa-component-icons/MaterialIcon.js +70 -0
  35. package/build/components/oa-component-icons/SizedSvg.js +42 -0
  36. package/build/components/oa-component-info/CustomInfo.js +119 -0
  37. package/build/components/oa-component-info/styles.js +15 -0
  38. package/build/components/oa-component-input/CustomInput.js +131 -0
  39. package/build/components/oa-component-input-number/CustomInputNumber.js +140 -0
  40. package/build/components/oa-component-lable/CustomLable.js +37 -0
  41. package/build/components/oa-component-lable/styles.js +12 -0
  42. package/build/components/oa-component-loader/CustomLoader.js +66 -0
  43. package/build/components/oa-component-modal/CustomModal.js +153 -0
  44. package/build/components/oa-component-modal/styles.js +14 -0
  45. package/build/components/oa-component-notification/CustomNotification.js +152 -0
  46. package/build/components/oa-component-notification/styles.js +12 -0
  47. package/build/components/oa-component-notification/usage-example.md +44 -0
  48. package/build/components/oa-component-pagination/CustomPagination.js +111 -0
  49. package/build/components/oa-component-pagination/styles.js +12 -0
  50. package/build/components/oa-component-popover/CustomPopover.js +58 -0
  51. package/build/components/oa-component-progress-bar/CustomProgressBar.js +68 -0
  52. package/build/components/oa-component-progress-bar/styles.js +12 -0
  53. package/build/components/oa-component-radio/CustomRadio.js +112 -0
  54. package/build/components/oa-component-radio/styles.js +13 -0
  55. package/build/components/oa-component-rating/CustomRating.js +13 -0
  56. package/build/components/oa-component-select/CustomSelect.js +432 -0
  57. package/build/components/oa-component-steps/CustomSteps.js +117 -0
  58. package/build/components/oa-component-steps/styles.js +12 -0
  59. package/build/components/oa-component-table/CustomTable.js +300 -0
  60. package/build/components/oa-component-table/CustomTableV1.js +610 -0
  61. package/build/components/oa-component-table/styles.js +14 -0
  62. package/build/components/oa-component-table/stylesV1.js +19 -0
  63. package/build/components/oa-component-tabs/CustomTabs.js +102 -0
  64. package/build/components/oa-component-tabs/styles.js +13 -0
  65. package/build/components/oa-component-tag/CustomTag.js +66 -0
  66. package/build/components/oa-component-tag/styles.js +75 -0
  67. package/build/components/oa-component-textarea/CustomTextArea.js +74 -0
  68. package/build/components/oa-component-textarea/styles.js +16 -0
  69. package/build/components/oa-component-timeline/CustomTimeline.js +65 -0
  70. package/build/components/oa-component-timeline/styles.js +15 -0
  71. package/build/components/oa-component-timepicker/CustomTimePicker.js +104 -0
  72. package/build/components/oa-component-toggle/CustomToggle.js +111 -0
  73. package/build/components/oa-component-toggle/styles.js +43 -0
  74. package/build/components/oa-component-tooltip/CustomTooltip.js +70 -0
  75. package/build/components/oa-component-typography/Typography.js +58 -0
  76. package/build/components/oa-component-typography/styles.js +13 -0
  77. package/build/components/oa-component-upload/CustomUpload.js +332 -0
  78. package/build/components/oa-component-upload/styles.js +13 -0
  79. package/build/components/oa-component-viewer/CustomViewer.js +273 -0
  80. package/build/components/oa-component-viewer/styles.js +14 -0
  81. package/build/constants/ratingConstants.js +194 -0
  82. package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
  83. package/build/dev/oa-component-document-viewer/styles.js +12 -0
  84. package/build/dev/oa-component-timeline/CustomTimeline.js +53 -0
  85. package/build/dev/oa-component-timeline/styles.js +15 -0
  86. package/build/dev/oa-component-upload/CustomUpload.js +285 -0
  87. package/build/dev/oa-component-upload/styles.js +13 -0
  88. package/build/dev/oa-component-viewer/CustomViewer.js +326 -0
  89. package/build/dev/oa-component-viewer/styles.js +14 -0
  90. package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
  91. package/build/dev/oa-widget-document-modal/styles.js +12 -0
  92. package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
  93. package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
  94. package/build/dev/oa-widget-document-upload-card/DocUploadCardWidget.js +179 -0
  95. package/build/dev/oa-widget-document-upload-card/styles.js +13 -0
  96. package/build/global-css/BorderRadius.js +22 -0
  97. package/build/global-css/ColorVariables.js +26 -0
  98. package/build/global-css/ColorVariablesMap.js +29 -0
  99. package/build/global-css/CustomDropDownThemes.js +31 -0
  100. package/build/global-css/Elevation.js +35 -0
  101. package/build/global-css/GlobalCss.js +26 -0
  102. package/build/global-css/GridLayout.js +25 -0
  103. package/build/global-css/SpacingScales.js +11 -0
  104. package/build/global-css/Typographies.js +26 -0
  105. package/build/global-css/TypographiesMap.js +71 -0
  106. package/build/global-css/color-options.js +8 -0
  107. package/build/global-css/commonStyles.js +11 -0
  108. package/build/global-css/tooltip-placement-option.js +8 -0
  109. package/build/global-css/typography-options.js +8 -0
  110. package/build/images/AC.png +0 -0
  111. package/build/images/Car.png +0 -0
  112. package/build/images/Cooler.png +0 -0
  113. package/build/images/Default.png +0 -0
  114. package/build/images/Footwear.png +0 -0
  115. package/build/images/Furniture.png +0 -0
  116. package/build/images/Glasses.png +0 -0
  117. package/build/images/HA.png +0 -0
  118. package/build/images/Laptop.png +0 -0
  119. package/build/images/Luggage.png +0 -0
  120. package/build/images/Microwave.png +0 -0
  121. package/build/images/Mobile.png +0 -0
  122. package/build/images/PdfSampleImage.png +0 -0
  123. package/build/images/Refrigerator.png +0 -0
  124. package/build/images/Shirts.png +0 -0
  125. package/build/images/Tablets.png +0 -0
  126. package/build/images/Television.png +0 -0
  127. package/build/images/TwoWheeler.png +0 -0
  128. package/build/images/Wallet.png +0 -0
  129. package/build/images/WashingMachine.png +0 -0
  130. package/build/images/WaterPurifier.png +0 -0
  131. package/build/images/Wearable.png +0 -0
  132. package/build/images/ajax-loader.gif +0 -0
  133. package/build/images/astronaut_emptystate.png +0 -0
  134. package/build/images/caution.svg +3 -0
  135. package/build/images/close.svg +3 -0
  136. package/build/images/current-location.svg +3 -0
  137. package/build/images/delete.svg +8 -0
  138. package/build/images/exportGrp01.png +0 -0
  139. package/build/images/exportGrp02.png +0 -0
  140. package/build/images/exportGrp03.png +0 -0
  141. package/build/images/hand-icon.svg +4 -0
  142. package/build/images/iphone.svg +9 -0
  143. package/build/images/left-icon.svg +28 -0
  144. package/build/images/map_pointer.svg +25 -0
  145. package/build/images/modal-img.svg +8 -0
  146. package/build/images/oaChat.svg +5 -0
  147. package/build/images/offer.svg +3 -0
  148. package/build/images/oneassist-logo.png +0 -0
  149. package/build/images/outOfStock.png +0 -0
  150. package/build/images/right-icon.svg +28 -0
  151. package/build/images/search_ic.svg +3 -0
  152. package/build/images/search_not_found.svg +7 -0
  153. package/build/images/upload.svg +8 -0
  154. package/build/images/zoom.svg +4 -0
  155. package/build/index.js +763 -0
  156. package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
  157. package/build/layout/DetailDataLayout/components/Form.js +22 -0
  158. package/build/layout/DetailDataLayout/components/Header.js +32 -0
  159. package/build/layout/DetailDataLayout/style.css +9 -0
  160. package/build/layout/DetailDataLayout/styles.js +12 -0
  161. package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +235 -0
  162. package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +63 -0
  163. package/build/layout/EntityOverviewLayout/styles.js +13 -0
  164. package/build/layout/GenricLayOut/GenricLayOut.js +2293 -0
  165. package/build/layout/GenricLayOut/components/AppliedFilters.js +84 -0
  166. package/build/layout/GenricLayOut/components/CardList.js +34 -0
  167. package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
  168. package/build/layout/GenricLayOut/components/Header.js +74 -0
  169. package/build/layout/GenricLayOut/components/Modal.js +85 -0
  170. package/build/layout/GenricLayOut/components/ProfileSection.js +87 -0
  171. package/build/layout/GenricLayOut/components/Search.js +51 -0
  172. package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
  173. package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
  174. package/build/layout/GenricLayOut/reducer/layoutReducer.js +294 -0
  175. package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
  176. package/build/layout/GenricLayOut/styles.js +25 -0
  177. package/build/layout/paymentAndConsent/CancelScreen.js +46 -0
  178. package/build/layout/paymentAndConsent/ConsentCard.js +68 -0
  179. package/build/layout/paymentAndConsent/DetailsCard.js +75 -0
  180. package/build/layout/paymentAndConsent/DetailsList.js +38 -0
  181. package/build/layout/paymentAndConsent/Header.js +33 -0
  182. package/build/layout/paymentAndConsent/InProgressScreen.js +46 -0
  183. package/build/layout/paymentAndConsent/Loader.js +21 -0
  184. package/build/layout/paymentAndConsent/Modal.js +28 -0
  185. package/build/layout/paymentAndConsent/PaymentAndConsent.js +22 -0
  186. package/build/layout/paymentAndConsent/PaymentCard.js +83 -0
  187. package/build/layout/paymentAndConsent/Section.js +34 -0
  188. package/build/layout/paymentAndConsent/SuccessScreen.js +46 -0
  189. package/build/layout/paymentAndConsent/TimeLineCard.js +28 -0
  190. package/build/layout/paymentAndConsent/TncList.js +32 -0
  191. package/build/layout/paymentAndConsent/style.js +12 -0
  192. package/build/utils/common.js +20 -0
  193. package/build/utils/download-file.js +23 -0
  194. package/build/utils/fix-decimal-places.js +24 -0
  195. package/build/utils/get-uuid.js +41 -0
  196. package/build/utils/hex-to-rgb.js +30 -0
  197. package/build/utils/index.js +78 -0
  198. package/build/utils/random-generators.js +19 -0
  199. package/build/utils/rupee-formatters.js +69 -0
  200. package/build/utils/type-checkers.js +16 -0
  201. package/build/widgets/oa-form-widget/FormWidget.js +544 -0
  202. package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
  203. package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +461 -0
  204. package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +355 -0
  205. package/build/widgets/oa-widget-add-spare-part/styles.js +12 -0
  206. package/build/widgets/oa-widget-address/AddressWidget.js +55 -0
  207. package/build/widgets/oa-widget-address/styles.js +13 -0
  208. package/build/widgets/oa-widget-approval/ApprovalWidget.js +200 -0
  209. package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
  210. package/build/widgets/oa-widget-approval/styles.js +13 -0
  211. package/build/widgets/oa-widget-chat/ChatWidget.js +261 -0
  212. package/build/widgets/oa-widget-chat/styles.js +17 -0
  213. package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +256 -0
  214. package/build/widgets/oa-widget-close-claim/styles.js +12 -0
  215. package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +395 -0
  216. package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
  217. package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
  218. package/build/widgets/oa-widget-content-panel/styles.js +12 -0
  219. package/build/widgets/oa-widget-custom-details/CustomDetails.js +41 -0
  220. package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +147 -0
  221. package/build/widgets/oa-widget-customer-rating-card/styles.js +12 -0
  222. package/build/widgets/oa-widget-date-dropdown/DateDropDown.js +385 -0
  223. package/build/widgets/oa-widget-date-dropdown/styles.js +12 -0
  224. package/build/widgets/oa-widget-detailcard/MembershipDetailCard.js +182 -0
  225. package/build/widgets/oa-widget-detailcard/styles.js +12 -0
  226. package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +264 -0
  227. package/build/widgets/oa-widget-document-upload/styles.js +13 -0
  228. package/build/widgets/oa-widget-document-upload-card/DocUploadCardWidget.js +178 -0
  229. package/build/widgets/oa-widget-document-upload-card/styles.js +13 -0
  230. package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +200 -0
  231. package/build/widgets/oa-widget-dropdown-search-input/styles.js +12 -0
  232. package/build/widgets/oa-widget-feedback/FeedbackWidget.js +83 -0
  233. package/build/widgets/oa-widget-feedback/styles.js +13 -0
  234. package/build/widgets/oa-widget-form/CustomFormWidget.js +51 -0
  235. package/build/widgets/oa-widget-form/styles.js +12 -0
  236. package/build/widgets/oa-widget-googlerating/GoogleRating.js +55 -0
  237. package/build/widgets/oa-widget-googlerating/styles.js +12 -0
  238. package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
  239. package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
  240. package/build/widgets/oa-widget-header/CustomHeaderWidget.js +98 -0
  241. package/build/widgets/oa-widget-header/styles.js +12 -0
  242. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
  243. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
  244. package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
  245. package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
  246. package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
  247. package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
  248. package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
  249. package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
  250. package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
  251. package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
  252. package/build/widgets/oa-widget-input-pattern-pin/CustomPinPatternCaptureWidget.js +395 -0
  253. package/build/widgets/oa-widget-input-pattern-pin/styles.js +12 -0
  254. package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
  255. package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +77 -0
  256. package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
  257. package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
  258. package/build/widgets/oa-widget-key-value/KeyValueWidget.js +121 -0
  259. package/build/widgets/oa-widget-key-value/styles.js +14 -0
  260. package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
  261. package/build/widgets/oa-widget-kpi/styles.js +12 -0
  262. package/build/widgets/oa-widget-location-access/LocationAccessWidget.js +92 -0
  263. package/build/widgets/oa-widget-location-access/styles.js +12 -0
  264. package/build/widgets/oa-widget-map-base-location/AddressDetails.js +84 -0
  265. package/build/widgets/oa-widget-map-base-location/AddressForm.js +106 -0
  266. package/build/widgets/oa-widget-map-base-location/CustomModalComponent.js +58 -0
  267. package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +93 -0
  268. package/build/widgets/oa-widget-map-base-location/MapComponent.js +167 -0
  269. package/build/widgets/oa-widget-map-base-location/styles.js +12 -0
  270. package/build/widgets/oa-widget-membershipcard/MembershipCard.js +266 -0
  271. package/build/widgets/oa-widget-membershipcard/styles.js +13 -0
  272. package/build/widgets/oa-widget-multiple-collapse-with-slots/MultipleCollapseWithSlots.js +85 -0
  273. package/build/widgets/oa-widget-multiple-collapse-with-slots/checkactive.svg +8 -0
  274. package/build/widgets/oa-widget-multiple-collapse-with-slots/checkhover.svg +8 -0
  275. package/build/widgets/oa-widget-multiple-collapse-with-slots/styles.js +16 -0
  276. package/build/widgets/oa-widget-notes/NotesWidget.js +135 -0
  277. package/build/widgets/oa-widget-notes/styles.js +13 -0
  278. package/build/widgets/oa-widget-pincode-base-location/PincodeBaseLocation.js +281 -0
  279. package/build/widgets/oa-widget-pincode-base-location/styles.js +12 -0
  280. package/build/widgets/oa-widget-plan-card/PlanCard.js +183 -0
  281. package/build/widgets/oa-widget-plan-card/styles.js +13 -0
  282. package/build/widgets/oa-widget-preview/Preview.js +172 -0
  283. package/build/widgets/oa-widget-preview/ZoomImageComponent.js +95 -0
  284. package/build/widgets/oa-widget-preview/styles.js +12 -0
  285. package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +117 -0
  286. package/build/widgets/oa-widget-profile-data/styles.js +13 -0
  287. package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
  288. package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
  289. package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +141 -0
  290. package/build/widgets/oa-widget-reimbursement-breakup/styles.js +12 -0
  291. package/build/widgets/oa-widget-repair-service/RepairServiceWidget.js +79 -0
  292. package/build/widgets/oa-widget-repair-service/styles.js +12 -0
  293. package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
  294. package/build/widgets/oa-widget-send-payment-link/SendPaymentLinkWidget.js +224 -0
  295. package/build/widgets/oa-widget-send-payment-link/styles.js +15 -0
  296. package/build/widgets/oa-widget-servicecard/ServiceCard.js +185 -0
  297. package/build/widgets/oa-widget-servicecard/styles.js +13 -0
  298. package/build/widgets/oa-widget-sidebar/SidebarWidget.js +105 -0
  299. package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
  300. package/build/widgets/oa-widget-sidebar/sidebar.css +0 -0
  301. package/build/widgets/oa-widget-sidebar/styles.js +13 -0
  302. package/build/widgets/oa-widget-spare-part/SparePartsCollapseWidget.js +127 -0
  303. package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +294 -0
  304. package/build/widgets/oa-widget-spare-part/styles.js +18 -0
  305. package/build/widgets/oa-widget-stage-timeline/StageTimelineWidget.js +159 -0
  306. package/build/widgets/oa-widget-stage-timeline/styles.js +29 -0
  307. package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +232 -0
  308. package/build/widgets/oa-widget-track-shipment/styles.js +13 -0
  309. package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +103 -0
  310. package/build/widgets/oa-widget-track-shipment-list/fn.js +81 -0
  311. package/build/widgets/oa-widget-track-shipment-list/styles.js +13 -0
  312. package/build/widgets/oa-widget-upload-download/UploadDownloadWidget.js +167 -0
  313. package/build/widgets/oa-widget-upload-download/styles.js +14 -0
  314. package/build/widgets/oa-widget-user-management/UserManagementWidget.js +352 -0
  315. package/build/widgets/oa-widget-user-management/styles.js +15 -0
  316. package/build/widgets/oa-widget-view-history/ViewHistoryWidget.js +181 -0
  317. package/build/widgets/oa-widget-view-history/styles.js +12 -0
  318. package/build/widgets/oa-widget-view-previous-description/ViewPreviousDescriptionWidget.js +188 -0
  319. package/build/widgets/oa-widget-view-previous-description/styles.js +16 -0
  320. package/package.json +100 -0
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.StyleContainer = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ var _templateObject;
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
+ var _default = exports.default = {};
12
+ const StyleContainer = exports.StyleContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.flexProp{display:flex; flex-direction: row; align-items: center; justify-content: space-between; width:100%;}\n.flexSec{display:flex; flex-direction: row; justify-content: flex-start;}\n.flexSec svg{cursor:pointer;}\n.mobView{display:none;}\n.deskView{display:flex;}\n.headerSearch {display: flex; width:100%; flex-direction: row; justify-content: flex-start; align-items: center; background-color: var(--color-primary-background); position: absolute; padding: 6px 0; left: 0; right: 0;}\n.customHeader{min-height: 60px; position: relative; display: flex; align-items: center; justify-content: space-between;}\n\n@media only screen and (max-width: 600px) {\n.mobView{display:flex;}\n.deskView{display:none;}\n.headerSearch {align-items: flex-start; flex-direction: column; justify-content: flex-start; padding: 18px 0; }\n.headerSearch input{margin:18px 0 0 0;} \n\n}\n\n\n"])));
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.symbol.description.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.DeleteIcon = DeleteIcon;
8
+ exports.WarningIcon = WarningIcon;
9
+ exports.default = CustomIcon;
10
+ require("core-js/modules/es.object.assign.js");
11
+ var _react = _interopRequireDefault(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _icons = _interopRequireDefault(require("@ant-design/icons"));
14
+ var _delete = _interopRequireDefault(require("../../images/delete.svg"));
15
+ var _caution = _interopRequireDefault(require("../../images/caution.svg"));
16
+ var _SizedSvg = _interopRequireDefault(require("./SizedSvg"));
17
+ const _excluded = ["alt", "color", "hoverColor", "size", "src", "style"];
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+ function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
22
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
23
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
25
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
26
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
27
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
28
+ /**
29
+ * A simple wrapper around the Ant Design Icon component,
30
+ * which uses SizedSvg underneath. See the documentation for
31
+ * SizedSvg for more information.
32
+ *
33
+ * The only prop that is not passed to SizedSvg is `style`, which
34
+ * is merged with the style object that is passed to Icon.
35
+ *
36
+ * @param {Object} props - all the props to pass to SizedSvg
37
+ * @returns {React.ReactElement} - the rendered component
38
+ */
39
+ function CustomIcon(_ref) {
40
+ let {
41
+ alt,
42
+ color,
43
+ hoverColor,
44
+ size,
45
+ src,
46
+ style
47
+ } = _ref,
48
+ props = _objectWithoutProperties(_ref, _excluded);
49
+ return /*#__PURE__*/_react.default.createElement(_icons.default, _extends({
50
+ style: _objectSpread({
51
+ width: "".concat(size, "px")
52
+ }, style),
53
+ component:
54
+ // We need to give an uninstantiated component
55
+ () => (0, _SizedSvg.default)({
56
+ alt,
57
+ color,
58
+ hoverColor,
59
+ size,
60
+ src
61
+ })
62
+ }, props));
63
+ }
64
+ CustomIcon.propTypes = {
65
+ alt: _propTypes.default.string,
66
+ color: _propTypes.default.string,
67
+ hoverColor: _propTypes.default.string,
68
+ size: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
69
+ src: _propTypes.default.string.isRequired,
70
+ style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]))
71
+ };
72
+ CustomIcon.defaultProps = {
73
+ alt: '',
74
+ color: null,
75
+ hoverColor: null,
76
+ size: '40',
77
+ style: {}
78
+ };
79
+ function DeleteIcon(_ref2) {
80
+ let props = Object.assign({}, (_objectDestructuringEmpty(_ref2), _ref2));
81
+ return /*#__PURE__*/_react.default.createElement(CustomIcon, _extends({
82
+ alt: "Delete icon.",
83
+ src: _delete.default
84
+ }, props));
85
+ }
86
+ function WarningIcon(_ref3) {
87
+ let props = Object.assign({}, (_objectDestructuringEmpty(_ref3), _ref3));
88
+ return /*#__PURE__*/_react.default.createElement(CustomIcon, _extends({
89
+ alt: "Warning icon.",
90
+ src: _caution.default
91
+ }, props));
92
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.symbol.description.js");
4
+ require("core-js/modules/es.object.assign.js");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = MaterialIcon;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
12
+ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
13
+ var _colorOptions = require("../../global-css/color-options");
14
+ var _utils = require("../../utils");
15
+ const _excluded = ["color", "data-test", "icon", "onClick", "rotate", "size", "style"];
16
+ var _templateObject;
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
22
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
23
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
24
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
25
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
26
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
27
+ const UnstyledButton = _styledComponents.default.button(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline: inherit;\n height: ", "px;\n"])), props => props.size);
28
+ function MaterialIcon(_ref) {
29
+ let {
30
+ color,
31
+ // By default, material icons inherit font color
32
+ 'data-test': dataTest,
33
+ icon: Icon,
34
+ onClick,
35
+ rotate,
36
+ size,
37
+ style
38
+ } = _ref,
39
+ props = _objectWithoutProperties(_ref, _excluded);
40
+ const renderedIcon = /*#__PURE__*/_react.default.createElement(Icon, _extends({
41
+ style: _objectSpread({
42
+ color: color && _ColorVariablesMap.default["--color-".concat(color)] ? _ColorVariablesMap.default["--color-".concat(color)] : color || undefined,
43
+ fontSize: size ? "".concat(size, "px") : 'inherit',
44
+ transition: 'transform .3s ease',
45
+ transform: "rotate(".concat(rotate, "deg)")
46
+ }, style)
47
+ }, props));
48
+ return (0, _utils.isFunction)(onClick) ? /*#__PURE__*/_react.default.createElement(UnstyledButton, _extends({
49
+ onClick: onClick,
50
+ size: size,
51
+ "data-test": dataTest
52
+ }, props), renderedIcon) : renderedIcon;
53
+ }
54
+ MaterialIcon.propTypes = {
55
+ color: _propTypes.default.oneOf(_colorOptions.colorOptions),
56
+ 'data-test': _propTypes.default.string,
57
+ icon: _propTypes.default.element.isRequired,
58
+ onClick: _propTypes.default.func,
59
+ rotate: _propTypes.default.number,
60
+ size: _propTypes.default.number,
61
+ style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))
62
+ };
63
+ MaterialIcon.defaultProps = {
64
+ color: null,
65
+ 'data-test': null,
66
+ onClick: null,
67
+ rotate: 0,
68
+ size: null,
69
+ style: {}
70
+ };
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = SizedSvg;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
10
+ var _templateObject;
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
13
+ function SizedSvg(_ref) {
14
+ var _ref2;
15
+ let {
16
+ alt,
17
+ color,
18
+ hoverColor,
19
+ size,
20
+ src
21
+ } = _ref;
22
+ const Img = _styledComponents.default.img(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* color: ", ";\n fill: currentColor;\n\n &:hover {\n color: ", ";\n fill: currentColor;\n } */\n "])), color !== null && color !== void 0 ? color : 'inherit', (_ref2 = hoverColor !== null && hoverColor !== void 0 ? hoverColor : color) !== null && _ref2 !== void 0 ? _ref2 : 'inherit');
23
+ return /*#__PURE__*/_react.default.createElement(Img, {
24
+ alt: alt,
25
+ src: src,
26
+ height: "".concat(size, "px"),
27
+ width: "".concat(size, "px")
28
+ });
29
+ }
30
+ SizedSvg.propTypes = {
31
+ alt: _propTypes.default.string,
32
+ color: _propTypes.default.string,
33
+ hoverColor: _propTypes.default.string,
34
+ size: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
35
+ src: _propTypes.default.string.isRequired
36
+ };
37
+ SizedSvg.defaultProps = {
38
+ alt: 'random icon',
39
+ color: null,
40
+ hoverColor: null,
41
+ size: '20'
42
+ };
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = CustomInfo;
7
+ require("core-js/modules/es.symbol.description.js");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _antd = require("antd");
11
+ var _styles = require("./styles");
12
+ var _CustomButton = _interopRequireDefault(require("../oa-component-button/CustomButton"));
13
+ var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
14
+ var _colorOptions = require("../../global-css/color-options");
15
+ require("antd/dist/reset.css");
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ /**
18
+ * A component for displaying a single piece of information with an optional icon
19
+ * and/or button. The icon can be placed on either the left or right of the text.
20
+ * If the icon is a valid React element, its size is adjusted based on the presence
21
+ * of a title. If a title is not provided, the icon size is 20. If a title is
22
+ * provided, the icon size is 24.
23
+ *
24
+ * @param {object} buttonConfig - Configuration for the button.
25
+ * @param {string} color - The background color of the component.
26
+ * @param {string} description - The text to be displayed.
27
+ * @param {string} fontColor - The color of the text.
28
+ * @param {object} iconConfig - Configuration for the icon.
29
+ * @param {string} title - The title to be displayed.
30
+ * @param {string} borderColor - The border color of the component.
31
+ *
32
+ * @returns {ReactElement} A styled component with the specified properties.
33
+ */
34
+ function CustomInfo(_ref) {
35
+ let {
36
+ buttonConfig,
37
+ color,
38
+ description,
39
+ fontColor,
40
+ iconConfig,
41
+ title,
42
+ borderColor
43
+ } = _ref;
44
+ /**
45
+ * Renders the icon based on the presence of a title.
46
+ * If a title is not provided and the icon is a valid React element,
47
+ * it returns a cloned version of the icon with a size of 20.
48
+ * If a title is provided and the icon is a valid React element,
49
+ * it returns a cloned version of the icon with a size of 24.
50
+ */
51
+ const renderIcon = () => !title ? /*#__PURE__*/_react.default.isValidElement(iconConfig.icon) && /*#__PURE__*/_react.default.cloneElement(iconConfig.icon, {
52
+ size: 20
53
+ }) : /*#__PURE__*/_react.default.isValidElement(iconConfig.icon) && /*#__PURE__*/_react.default.cloneElement(iconConfig.icon, {
54
+ size: 24
55
+ });
56
+
57
+ /**
58
+ * Adds a tooltip to the icon if the iconConfig has a tooltipText property.
59
+ * Otherwise, just renders the icon.
60
+ *
61
+ * @returns {React.ReactNode} The rendered icon with or without a tooltip.
62
+ */
63
+ const conditionallyAddTooltipToIcon = () => {
64
+ var _iconConfig$tooltipTe;
65
+ return (iconConfig === null || iconConfig === void 0 || (_iconConfig$tooltipTe = iconConfig.tooltipText) === null || _iconConfig$tooltipTe === void 0 ? void 0 : _iconConfig$tooltipTe.length) > 0 ? /*#__PURE__*/_react.default.createElement(_antd.Tooltip, {
66
+ title: iconConfig === null || iconConfig === void 0 ? void 0 : iconConfig.tooltipText
67
+ }, renderIcon()) : renderIcon();
68
+ };
69
+ return /*#__PURE__*/_react.default.createElement(_styles.InfoContainer, {
70
+ $color: color,
71
+ $borderColor: borderColor
72
+ }, /*#__PURE__*/_react.default.createElement(_styles.RowFlex, null, iconConfig.position === 'left' && conditionallyAddTooltipToIcon(), /*#__PURE__*/_react.default.createElement(_styles.ColFlex, null, title && /*#__PURE__*/_react.default.createElement(_Typography.default, {
73
+ color: fontColor,
74
+ typography: "type-t2-700"
75
+ }, title), description && /*#__PURE__*/_react.default.createElement("div", {
76
+ className: "type-b2-400",
77
+ style: {
78
+ color: "var(--color-".concat(fontColor, ")")
79
+ }
80
+ }, description)), iconConfig.position === 'right' && conditionallyAddTooltipToIcon()), (buttonConfig === null || buttonConfig === void 0 ? void 0 : buttonConfig.label) && /*#__PURE__*/_react.default.createElement(_CustomButton.default, buttonConfig));
81
+ }
82
+ CustomInfo.propTypes = {
83
+ buttonConfig: _propTypes.default.shape({
84
+ size: _propTypes.default.oneOf(['small', 'medium', 'large']),
85
+ iconConfig: _propTypes.default.shape({
86
+ icon: _propTypes.default.node,
87
+ position: _propTypes.default.oneOf(['left', 'right']),
88
+ style: _propTypes.default.objectOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]))
89
+ }),
90
+ label: _propTypes.default.node,
91
+ onClick: _propTypes.default.func,
92
+ type: _propTypes.default.oneOf(['primary', 'secondary', 'text-only', 'danger-primary', 'danger-secondary', 'danger-text-only'])
93
+ }),
94
+ color: _propTypes.default.oneOf(_colorOptions.colorOptions),
95
+ description: _propTypes.default.string,
96
+ fontColor: _propTypes.default.oneOf(_colorOptions.colorOptions),
97
+ iconConfig: _propTypes.default.shape({
98
+ icon: _propTypes.default.node,
99
+ position: _propTypes.default.oneOf(['left', 'right']),
100
+ tooltipText: _propTypes.default.string
101
+ }),
102
+ title: _propTypes.default.string,
103
+ borderColor: _propTypes.default.string
104
+ };
105
+ CustomInfo.defaultProps = {
106
+ buttonConfig: {
107
+ label: null,
108
+ size: 'medium',
109
+ type: 'text-only'
110
+ },
111
+ color: 'background-warning',
112
+ iconConfig: {
113
+ position: 'left'
114
+ },
115
+ fontColor: 'primary-content',
116
+ title: '',
117
+ description: '',
118
+ borderColor: ''
119
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RowFlex = exports.InfoContainer = exports.ColFlex = void 0;
7
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
8
+ var _templateObject, _templateObject2, _templateObject3;
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
+ const RowFlex = exports.RowFlex = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n gap: 8px;\n"])));
12
+ const ColFlex = exports.ColFlex = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n gap: 8px;\n"])));
13
+ const InfoContainer = exports.InfoContainer = (0, _styledComponents.default)(RowFlex).attrs({
14
+ as: 'section'
15
+ })(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 12px;\n align-items: center;\n border-radius: 8px;\n background-color: var(--color-", ");\n border: 1px solid var(--color-", ");\n\n button {\n margin-left: 8px;\n }\n"])), props => props.$color, props => props.$borderColor);
@@ -0,0 +1,131 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.assign.js");
4
+ require("core-js/modules/es.weak-map.js");
5
+ require("core-js/modules/web.dom-collections.iterator.js");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.default = CustomInput;
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _antd = require("antd");
13
+ var _utils = require("../../utils");
14
+ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
15
+ var _TypographiesMap = _interopRequireDefault(require("../../global-css/TypographiesMap"));
16
+ const _excluded = ["data-test", "autoFocus"];
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
22
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
+ /**
24
+ * CustomInput is a component that renders an input field with customizable styling.
25
+ * It automatically focuses on the input field when mounted if autoFocus is set to true.
26
+ * The component allows customization of padding, border colors, box shadows, placeholder text color, and more.
27
+ */
28
+ function CustomInput(_ref) {
29
+ let {
30
+ 'data-test': dataTest,
31
+ autoFocus
32
+ } = _ref,
33
+ props = _objectWithoutProperties(_ref, _excluded);
34
+ const inputRef = (0, _react.useRef)(null);
35
+ (0, _react.useEffect)(() => {
36
+ if (autoFocus && inputRef.current && autoFocus === true) {
37
+ inputRef.current.focus(); // Automatically focus the input field when the component mounts
38
+ }
39
+ }, [autoFocus]);
40
+ return /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
41
+ theme: {
42
+ components: {
43
+ Input: {
44
+ /*
45
+ For small size:
46
+ 20 (line height)
47
+ + 2 * 5 (padding)
48
+ + 2 * 1 (border)
49
+ */
50
+ paddingBlockSM: 5,
51
+ /*
52
+ For default size:
53
+ 20 (line height)
54
+ + 2 * 13 (padding)
55
+ + 2 * 1 (border)
56
+ */
57
+ paddingBlock: 13,
58
+ /*
59
+ For small size: 13px inline padding
60
+ 12 (padding) 1 extra so that it shows 12px and 16px in browser console.
61
+ + 1 (border)
62
+ */
63
+ paddingInlineSM: 12,
64
+ /*
65
+ For default size: 17px inline padding
66
+ 16 (padding) 1 extra so that it shows 12px and 16px in browser console.
67
+ + 1 (border)
68
+ */
69
+ paddingInline: 16,
70
+ activeBorderColor: _ColorVariablesMap.default['--color-primary'],
71
+ // border color of active and hover should be same
72
+ hoverBorderColor: _ColorVariablesMap.default['--color-primary']
73
+
74
+ // Converting the hex code to rgb values.
75
+
76
+ // Box shadow for active input box.
77
+ // activeShadow: `0px 0px 4px 0px rgba(${
78
+ // hexToRgb(ColorVariablesMap['--color-primary']).join(', ')
79
+ // }, 0.9)`,
80
+
81
+ // Box shadow for error active input box.
82
+ // errorActiveShadow: `0px 0px 4px 0px rgba(${
83
+ // hexToRgb(ColorVariablesMap['--color-negative']).join(', ')
84
+ // }, 0.9)`,
85
+ }
86
+ },
87
+ token: {
88
+ colorTextPlaceholder: _ColorVariablesMap.default['--color-placeholder-text'],
89
+ // Color of placeholder text
90
+ lineHeight: "".concat(_TypographiesMap.default['type-b2-400']['line-height'], "px"),
91
+ colorPrimary: _ColorVariablesMap.default['--color-primary'],
92
+ // for active color of input
93
+ colorPrimaryHover: _ColorVariablesMap.default['--color-primary'],
94
+ // for hover color of input
95
+ colorBgContainerDisabled: _ColorVariablesMap.default['--color-divider'],
96
+ borderRadius: '4px',
97
+ // For border radius of input text field.
98
+ controlHeight: 48,
99
+ controlHeightSM: 32,
100
+ // Size of "small" size input
101
+ colorBorder: _ColorVariablesMap.default['--color-placeholder-text'],
102
+ // border color of input text field
103
+ colorText: _ColorVariablesMap.default['--color-primary-content'],
104
+ // Text color
105
+ colorTextDisabled: _ColorVariablesMap.default['--color-secondary-content'],
106
+ // Text color when disabled
107
+ colorError: _ColorVariablesMap.default['--color-negative'],
108
+ // Error color
109
+ colorErrorBorderHover: _ColorVariablesMap.default['--color-negative'] // Hover error color should be same as error color
110
+ }
111
+ }
112
+ }, /*#__PURE__*/_react.default.createElement(_antd.Input, _extends({
113
+ "data-test": dataTest,
114
+ ref: inputRef,
115
+ classNames: {
116
+ input: 'type-b2-400',
117
+ prefix: 'type-b2-400',
118
+ suffix: 'type-b2-400'
119
+ }
120
+ }, props)));
121
+ }
122
+ CustomInput.propTypes = {
123
+ 'data-test': _propTypes.default.string,
124
+ size: _propTypes.default.oneOf(['small', 'default']),
125
+ autoFocus: _propTypes.default.bool // Add autoFocus prop to control automatic focusing
126
+ };
127
+ CustomInput.defaultProps = {
128
+ 'data-test': null,
129
+ size: 'default',
130
+ autoFocus: false // Default to not auto-focusing
131
+ };
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.assign.js");
4
+ require("core-js/modules/es.weak-map.js");
5
+ require("core-js/modules/web.dom-collections.iterator.js");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.default = CustomInputNumber;
10
+ var _react = _interopRequireWildcard(require("react"));
11
+ var _propTypes = _interopRequireDefault(require("prop-types"));
12
+ var _antd = require("antd");
13
+ var _utils = require("../../utils");
14
+ var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
15
+ var _TypographiesMap = _interopRequireDefault(require("../../global-css/TypographiesMap"));
16
+ const _excluded = ["data-test", "autoFocus"];
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
19
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
22
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
+ /**
24
+ * CustomInputNumber is a component that renders a number input field with customizable styling.
25
+ * It automatically focuses on the input field when mounted if autoFocus is set to true.
26
+ * The component allows customization of padding, border colors, box shadows, placeholder text color, and more.
27
+ *
28
+ * @param {Object} props - The props for the component
29
+ * @prop {string} ['data-test'] - The data-test value for the component
30
+ * @prop {boolean} [autoFocus=false] - Whether to autofocus on the input field
31
+ *
32
+ * @return {ReactElement} The rendered component
33
+ */
34
+ function CustomInputNumber(_ref) {
35
+ let {
36
+ 'data-test': dataTest,
37
+ autoFocus
38
+ } = _ref,
39
+ props = _objectWithoutProperties(_ref, _excluded);
40
+ const inputRef = (0, _react.useRef)(null);
41
+ (0, _react.useEffect)(() => {
42
+ if (autoFocus && inputRef.current && autoFocus === true) {
43
+ inputRef.current.focus(); // Automatically focus the input field when the component mounts
44
+ }
45
+ }, [autoFocus]);
46
+ return /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
47
+ theme: {
48
+ components: {
49
+ InputNumber: {
50
+ controlWidth: '100%',
51
+ /*
52
+ For small size:
53
+ 20 (line height)
54
+ + 2 * 5 (padding)
55
+ + 2 * 1 (border)
56
+ */
57
+ paddingBlockSM: 5,
58
+ /*
59
+ For middle size:
60
+ 20 (line height)
61
+ + 2 * 13 (padding)
62
+ + 2 * 1 (border)
63
+ */
64
+ paddingBlock: 13,
65
+ /*
66
+ For small size: 13px inline padding
67
+ 12 (padding) 1 extra so that it shows 12px and 16px in browser console.
68
+ + 1 (border)
69
+ */
70
+ paddingInlineSM: 12,
71
+ /*
72
+ For default size: 17px inline padding
73
+ 16 (padding) 1 extra so that it shows 12px and 16px in browser console.
74
+ + 1 (border)
75
+ */
76
+ paddingInline: 16,
77
+ activeBorderColor: _ColorVariablesMap.default['--color-primary'],
78
+ // border color of active and hover should be same
79
+ hoverBorderColor: _ColorVariablesMap.default['--color-primary']
80
+ // // Converting the hex code to rgb values.
81
+
82
+ // // Box shadow for active input box.
83
+ // activeShadow: `0px 0px 4px 0px rgba(${
84
+ // hexToRgb(ColorVariablesMap['--color-primary']).join(', ')
85
+ // }, 0.9)`,
86
+ // // Box shadow for error active input box.
87
+ // errorActiveShadow: `0px 0px 4px 0px rgba(${
88
+ // hexToRgb(ColorVariablesMap['--color-negative']).join(', ')
89
+ // }, 0.9)`,
90
+ }
91
+ },
92
+ token: {
93
+ colorTextPlaceholder: _ColorVariablesMap.default['--color-placeholder-text'],
94
+ // Color of placeholder text
95
+
96
+ lineHeight: "".concat(_TypographiesMap.default['type-b2-400']['line-height'], "px"),
97
+ fontSize: _TypographiesMap.default['type-b2-400']['font-size'],
98
+ colorBgContainerDisabled: _ColorVariablesMap.default['--color-divider'],
99
+ borderRadius: '4px',
100
+ // For border radius of input text field.
101
+
102
+ controlHeight: 48,
103
+ // Size of default sized input
104
+ controlHeightSM: 32,
105
+ // Size of "small" size input
106
+
107
+ colorBorder: _ColorVariablesMap.default['--color-placeholder-text'],
108
+ // border color of input text field
109
+
110
+ colorText: _ColorVariablesMap.default['--color-primary-content'],
111
+ // Text color
112
+ colorTextDisabled: _ColorVariablesMap.default['--color-secondary-content'],
113
+ // Text color when disabled
114
+
115
+ colorError: _ColorVariablesMap.default['--color-negative'],
116
+ // Error color
117
+ colorErrorBorderHover: _ColorVariablesMap.default['--color-negative'] // Hover error color should be same as error color
118
+ }
119
+ }
120
+ }, /*#__PURE__*/_react.default.createElement(_antd.InputNumber, _extends({
121
+ ref: inputRef,
122
+ "data-test": dataTest,
123
+ controls: false
124
+ // classNames={{
125
+ // input: 'type-b2-400',
126
+ // prefix: 'type-b2-400',
127
+ // suffix: 'type-b2-400',
128
+ // }}
129
+ }, props)));
130
+ }
131
+ CustomInputNumber.propTypes = {
132
+ 'data-test': _propTypes.default.string,
133
+ size: _propTypes.default.oneOf(['small', 'middle']),
134
+ autoFocus: _propTypes.default.bool // Add autoFocus prop to control automatic focusing
135
+ };
136
+ CustomInputNumber.defaultProps = {
137
+ 'data-test': null,
138
+ size: 'middle',
139
+ autoFocus: false // Default to not auto-focusing
140
+ };