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.
- package/README.md +92 -0
- package/build/MockData.js +2311 -0
- package/build/components/oa-component-accordion/Accordion.js +195 -0
- package/build/components/oa-component-accordion/styles.js +13 -0
- package/build/components/oa-component-auto-complete/CustomAutoComplete.js +167 -0
- package/build/components/oa-component-bar-chart/BarChart.js +295 -0
- package/build/components/oa-component-bread-crumb/CustomBreadCrumb.js +47 -0
- package/build/components/oa-component-button/CustomButton.js +108 -0
- package/build/components/oa-component-button/styles.js +41 -0
- package/build/components/oa-component-checkbox/CustomCheckBox.js +115 -0
- package/build/components/oa-component-checkbox/styles.js +12 -0
- package/build/components/oa-component-count-card/CustomCountCard.js +74 -0
- package/build/components/oa-component-count-card/styles.js +12 -0
- package/build/components/oa-component-datepicker/CustomDatePicker.js +134 -0
- package/build/components/oa-component-demo-border-radius/BorderRadiusDemo.js +35 -0
- package/build/components/oa-component-demo-border-radius/styles.js +12 -0
- package/build/components/oa-component-demo-color-variables/ColorVariablesDemo.js +34 -0
- package/build/components/oa-component-demo-color-variables/styles.js +12 -0
- package/build/components/oa-component-demo-elevation/ElevationDemo.js +22 -0
- package/build/components/oa-component-demo-elevation/styles.js +12 -0
- package/build/components/oa-component-demo-spacing/SpacingScales.js +26 -0
- package/build/components/oa-component-demo-spacing/styles.js +259 -0
- package/build/components/oa-component-drawer/CustomDrawer.js +178 -0
- package/build/components/oa-component-drawer/styles.js +16 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +102 -0
- package/build/components/oa-component-dropdown/customClass.css +9 -0
- package/build/components/oa-component-dropdown/styles.js +12 -0
- package/build/components/oa-component-feedback-form/FeedbackForm.js +75 -0
- package/build/components/oa-component-feedback-tooltip/FeedbackTooltip.js +69 -0
- package/build/components/oa-component-form-item/CustomFormItem.js +74 -0
- package/build/components/oa-component-header/CustomHeader.js +104 -0
- package/build/components/oa-component-header/styles.js +12 -0
- package/build/components/oa-component-icons/CustomIcon.js +92 -0
- package/build/components/oa-component-icons/MaterialIcon.js +70 -0
- package/build/components/oa-component-icons/SizedSvg.js +42 -0
- package/build/components/oa-component-info/CustomInfo.js +119 -0
- package/build/components/oa-component-info/styles.js +15 -0
- package/build/components/oa-component-input/CustomInput.js +131 -0
- package/build/components/oa-component-input-number/CustomInputNumber.js +140 -0
- package/build/components/oa-component-lable/CustomLable.js +37 -0
- package/build/components/oa-component-lable/styles.js +12 -0
- package/build/components/oa-component-loader/CustomLoader.js +66 -0
- package/build/components/oa-component-modal/CustomModal.js +153 -0
- package/build/components/oa-component-modal/styles.js +14 -0
- package/build/components/oa-component-notification/CustomNotification.js +152 -0
- package/build/components/oa-component-notification/styles.js +12 -0
- package/build/components/oa-component-notification/usage-example.md +44 -0
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-popover/CustomPopover.js +58 -0
- package/build/components/oa-component-progress-bar/CustomProgressBar.js +68 -0
- package/build/components/oa-component-progress-bar/styles.js +12 -0
- package/build/components/oa-component-radio/CustomRadio.js +112 -0
- package/build/components/oa-component-radio/styles.js +13 -0
- package/build/components/oa-component-rating/CustomRating.js +13 -0
- package/build/components/oa-component-select/CustomSelect.js +432 -0
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +300 -0
- package/build/components/oa-component-table/CustomTableV1.js +610 -0
- package/build/components/oa-component-table/styles.js +14 -0
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-tabs/CustomTabs.js +102 -0
- package/build/components/oa-component-tabs/styles.js +13 -0
- package/build/components/oa-component-tag/CustomTag.js +66 -0
- package/build/components/oa-component-tag/styles.js +75 -0
- package/build/components/oa-component-textarea/CustomTextArea.js +74 -0
- package/build/components/oa-component-textarea/styles.js +16 -0
- package/build/components/oa-component-timeline/CustomTimeline.js +65 -0
- package/build/components/oa-component-timeline/styles.js +15 -0
- package/build/components/oa-component-timepicker/CustomTimePicker.js +104 -0
- package/build/components/oa-component-toggle/CustomToggle.js +111 -0
- package/build/components/oa-component-toggle/styles.js +43 -0
- package/build/components/oa-component-tooltip/CustomTooltip.js +70 -0
- package/build/components/oa-component-typography/Typography.js +58 -0
- package/build/components/oa-component-typography/styles.js +13 -0
- package/build/components/oa-component-upload/CustomUpload.js +332 -0
- package/build/components/oa-component-upload/styles.js +13 -0
- package/build/components/oa-component-viewer/CustomViewer.js +273 -0
- package/build/components/oa-component-viewer/styles.js +14 -0
- package/build/constants/ratingConstants.js +194 -0
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-timeline/CustomTimeline.js +53 -0
- package/build/dev/oa-component-timeline/styles.js +15 -0
- package/build/dev/oa-component-upload/CustomUpload.js +285 -0
- package/build/dev/oa-component-upload/styles.js +13 -0
- package/build/dev/oa-component-viewer/CustomViewer.js +326 -0
- package/build/dev/oa-component-viewer/styles.js +14 -0
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +196 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/dev/oa-widget-document-upload-card/DocUploadCardWidget.js +179 -0
- package/build/dev/oa-widget-document-upload-card/styles.js +13 -0
- package/build/global-css/BorderRadius.js +22 -0
- package/build/global-css/ColorVariables.js +26 -0
- package/build/global-css/ColorVariablesMap.js +29 -0
- package/build/global-css/CustomDropDownThemes.js +31 -0
- package/build/global-css/Elevation.js +35 -0
- package/build/global-css/GlobalCss.js +26 -0
- package/build/global-css/GridLayout.js +25 -0
- package/build/global-css/SpacingScales.js +11 -0
- package/build/global-css/Typographies.js +26 -0
- package/build/global-css/TypographiesMap.js +71 -0
- package/build/global-css/color-options.js +8 -0
- package/build/global-css/commonStyles.js +11 -0
- package/build/global-css/tooltip-placement-option.js +8 -0
- package/build/global-css/typography-options.js +8 -0
- package/build/images/AC.png +0 -0
- package/build/images/Car.png +0 -0
- package/build/images/Cooler.png +0 -0
- package/build/images/Default.png +0 -0
- package/build/images/Footwear.png +0 -0
- package/build/images/Furniture.png +0 -0
- package/build/images/Glasses.png +0 -0
- package/build/images/HA.png +0 -0
- package/build/images/Laptop.png +0 -0
- package/build/images/Luggage.png +0 -0
- package/build/images/Microwave.png +0 -0
- package/build/images/Mobile.png +0 -0
- package/build/images/PdfSampleImage.png +0 -0
- package/build/images/Refrigerator.png +0 -0
- package/build/images/Shirts.png +0 -0
- package/build/images/Tablets.png +0 -0
- package/build/images/Television.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/Wallet.png +0 -0
- package/build/images/WashingMachine.png +0 -0
- package/build/images/WaterPurifier.png +0 -0
- package/build/images/Wearable.png +0 -0
- package/build/images/ajax-loader.gif +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/caution.svg +3 -0
- package/build/images/close.svg +3 -0
- package/build/images/current-location.svg +3 -0
- package/build/images/delete.svg +8 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/hand-icon.svg +4 -0
- package/build/images/iphone.svg +9 -0
- package/build/images/left-icon.svg +28 -0
- package/build/images/map_pointer.svg +25 -0
- package/build/images/modal-img.svg +8 -0
- package/build/images/oaChat.svg +5 -0
- package/build/images/offer.svg +3 -0
- package/build/images/oneassist-logo.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/images/right-icon.svg +28 -0
- package/build/images/search_ic.svg +3 -0
- package/build/images/search_not_found.svg +7 -0
- package/build/images/upload.svg +8 -0
- package/build/images/zoom.svg +4 -0
- package/build/index.js +763 -0
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +235 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +63 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2293 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +84 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +85 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +87 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +294 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +25 -0
- package/build/layout/paymentAndConsent/CancelScreen.js +46 -0
- package/build/layout/paymentAndConsent/ConsentCard.js +68 -0
- package/build/layout/paymentAndConsent/DetailsCard.js +75 -0
- package/build/layout/paymentAndConsent/DetailsList.js +38 -0
- package/build/layout/paymentAndConsent/Header.js +33 -0
- package/build/layout/paymentAndConsent/InProgressScreen.js +46 -0
- package/build/layout/paymentAndConsent/Loader.js +21 -0
- package/build/layout/paymentAndConsent/Modal.js +28 -0
- package/build/layout/paymentAndConsent/PaymentAndConsent.js +22 -0
- package/build/layout/paymentAndConsent/PaymentCard.js +83 -0
- package/build/layout/paymentAndConsent/Section.js +34 -0
- package/build/layout/paymentAndConsent/SuccessScreen.js +46 -0
- package/build/layout/paymentAndConsent/TimeLineCard.js +28 -0
- package/build/layout/paymentAndConsent/TncList.js +32 -0
- package/build/layout/paymentAndConsent/style.js +12 -0
- package/build/utils/common.js +20 -0
- package/build/utils/download-file.js +23 -0
- package/build/utils/fix-decimal-places.js +24 -0
- package/build/utils/get-uuid.js +41 -0
- package/build/utils/hex-to-rgb.js +30 -0
- package/build/utils/index.js +78 -0
- package/build/utils/random-generators.js +19 -0
- package/build/utils/rupee-formatters.js +69 -0
- package/build/utils/type-checkers.js +16 -0
- package/build/widgets/oa-form-widget/FormWidget.js +544 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +461 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +355 -0
- package/build/widgets/oa-widget-add-spare-part/styles.js +12 -0
- package/build/widgets/oa-widget-address/AddressWidget.js +55 -0
- package/build/widgets/oa-widget-address/styles.js +13 -0
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +200 -0
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
- package/build/widgets/oa-widget-approval/styles.js +13 -0
- package/build/widgets/oa-widget-chat/ChatWidget.js +261 -0
- package/build/widgets/oa-widget-chat/styles.js +17 -0
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +256 -0
- package/build/widgets/oa-widget-close-claim/styles.js +12 -0
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +395 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-custom-details/CustomDetails.js +41 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +147 -0
- package/build/widgets/oa-widget-customer-rating-card/styles.js +12 -0
- package/build/widgets/oa-widget-date-dropdown/DateDropDown.js +385 -0
- package/build/widgets/oa-widget-date-dropdown/styles.js +12 -0
- package/build/widgets/oa-widget-detailcard/MembershipDetailCard.js +182 -0
- package/build/widgets/oa-widget-detailcard/styles.js +12 -0
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +264 -0
- package/build/widgets/oa-widget-document-upload/styles.js +13 -0
- package/build/widgets/oa-widget-document-upload-card/DocUploadCardWidget.js +178 -0
- package/build/widgets/oa-widget-document-upload-card/styles.js +13 -0
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +200 -0
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +12 -0
- package/build/widgets/oa-widget-feedback/FeedbackWidget.js +83 -0
- package/build/widgets/oa-widget-feedback/styles.js +13 -0
- package/build/widgets/oa-widget-form/CustomFormWidget.js +51 -0
- package/build/widgets/oa-widget-form/styles.js +12 -0
- package/build/widgets/oa-widget-googlerating/GoogleRating.js +55 -0
- package/build/widgets/oa-widget-googlerating/styles.js +12 -0
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-header/CustomHeaderWidget.js +98 -0
- package/build/widgets/oa-widget-header/styles.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +256 -0
- package/build/widgets/oa-widget-image-carousel/styles.js +23 -0
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-input-pattern-pin/CustomPinPatternCaptureWidget.js +395 -0
- package/build/widgets/oa-widget-input-pattern-pin/styles.js +12 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +77 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +121 -0
- package/build/widgets/oa-widget-key-value/styles.js +14 -0
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-location-access/LocationAccessWidget.js +92 -0
- package/build/widgets/oa-widget-location-access/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +84 -0
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +106 -0
- package/build/widgets/oa-widget-map-base-location/CustomModalComponent.js +58 -0
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +93 -0
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +167 -0
- package/build/widgets/oa-widget-map-base-location/styles.js +12 -0
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +266 -0
- package/build/widgets/oa-widget-membershipcard/styles.js +13 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/MultipleCollapseWithSlots.js +85 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/checkactive.svg +8 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/checkhover.svg +8 -0
- package/build/widgets/oa-widget-multiple-collapse-with-slots/styles.js +16 -0
- package/build/widgets/oa-widget-notes/NotesWidget.js +135 -0
- package/build/widgets/oa-widget-notes/styles.js +13 -0
- package/build/widgets/oa-widget-pincode-base-location/PincodeBaseLocation.js +281 -0
- package/build/widgets/oa-widget-pincode-base-location/styles.js +12 -0
- package/build/widgets/oa-widget-plan-card/PlanCard.js +183 -0
- package/build/widgets/oa-widget-plan-card/styles.js +13 -0
- package/build/widgets/oa-widget-preview/Preview.js +172 -0
- package/build/widgets/oa-widget-preview/ZoomImageComponent.js +95 -0
- package/build/widgets/oa-widget-preview/styles.js +12 -0
- package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +117 -0
- package/build/widgets/oa-widget-profile-data/styles.js +13 -0
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +141 -0
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +12 -0
- package/build/widgets/oa-widget-repair-service/RepairServiceWidget.js +79 -0
- package/build/widgets/oa-widget-repair-service/styles.js +12 -0
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-send-payment-link/SendPaymentLinkWidget.js +224 -0
- package/build/widgets/oa-widget-send-payment-link/styles.js +15 -0
- package/build/widgets/oa-widget-servicecard/ServiceCard.js +185 -0
- package/build/widgets/oa-widget-servicecard/styles.js +13 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +105 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/sidebar.css +0 -0
- package/build/widgets/oa-widget-sidebar/styles.js +13 -0
- package/build/widgets/oa-widget-spare-part/SparePartsCollapseWidget.js +127 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +294 -0
- package/build/widgets/oa-widget-spare-part/styles.js +18 -0
- package/build/widgets/oa-widget-stage-timeline/StageTimelineWidget.js +159 -0
- package/build/widgets/oa-widget-stage-timeline/styles.js +29 -0
- package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +232 -0
- package/build/widgets/oa-widget-track-shipment/styles.js +13 -0
- package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +103 -0
- package/build/widgets/oa-widget-track-shipment-list/fn.js +81 -0
- package/build/widgets/oa-widget-track-shipment-list/styles.js +13 -0
- package/build/widgets/oa-widget-upload-download/UploadDownloadWidget.js +167 -0
- package/build/widgets/oa-widget-upload-download/styles.js +14 -0
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +352 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/build/widgets/oa-widget-view-history/ViewHistoryWidget.js +181 -0
- package/build/widgets/oa-widget-view-history/styles.js +12 -0
- package/build/widgets/oa-widget-view-previous-description/ViewPreviousDescriptionWidget.js +188 -0
- package/build/widgets/oa-widget-view-previous-description/styles.js +16 -0
- package/package.json +100 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _Typography = _interopRequireDefault(require("../oa-component-typography/Typography"));
|
|
10
|
+
var _typographyOptions = require("../../global-css/typography-options");
|
|
11
|
+
var _colorOptions = require("../../global-css/color-options");
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
/**
|
|
15
|
+
* A card component that displays a label, an image and a subtext.
|
|
16
|
+
* Used for displaying counts in a grid layout.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} label - The label text to be displayed.
|
|
19
|
+
* @param {string} imgPath - The path to the image to be displayed.
|
|
20
|
+
* @param {string} subText - The subtext to be displayed.
|
|
21
|
+
* @param {string} labelTypography - The typography option for the label. See typographyOptions for all available options.
|
|
22
|
+
* @param {string} labelColor - The color option for the label. See colorOptions for all available options.
|
|
23
|
+
* @param {string} subTextTypography - The typography option for the subtext. See typographyOptions for all available options.
|
|
24
|
+
* @param {string} subTextColor - The color option for the subtext. See colorOptions for all available options.
|
|
25
|
+
* @param {string} imgWidth - The width of the image to be displayed.
|
|
26
|
+
*
|
|
27
|
+
* @returns {ReactElement} A React element representing the card component.
|
|
28
|
+
*/
|
|
29
|
+
function CustomCountCard(_ref) {
|
|
30
|
+
let {
|
|
31
|
+
label,
|
|
32
|
+
imgPath,
|
|
33
|
+
subText,
|
|
34
|
+
labelTypography,
|
|
35
|
+
labelColor,
|
|
36
|
+
subTextTypography,
|
|
37
|
+
subTextColor,
|
|
38
|
+
imgWidth
|
|
39
|
+
} = _ref;
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_styles.CustomCountStyle, null, imgPath && /*#__PURE__*/_react.default.createElement("img", {
|
|
41
|
+
src: imgPath,
|
|
42
|
+
alt: "imageIcon",
|
|
43
|
+
style: {
|
|
44
|
+
width: imgWidth
|
|
45
|
+
}
|
|
46
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("p", null, label && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
47
|
+
typography: "type-sl1-700",
|
|
48
|
+
color: "secondary-content"
|
|
49
|
+
}, label)), /*#__PURE__*/_react.default.createElement("h3", null, subText && /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
50
|
+
typography: "type-h1-500",
|
|
51
|
+
color: "primary-content"
|
|
52
|
+
}, subText))));
|
|
53
|
+
}
|
|
54
|
+
CustomCountCard.propTypes = {
|
|
55
|
+
label: _propTypes.default.string,
|
|
56
|
+
imgPath: _propTypes.default.string,
|
|
57
|
+
subText: _propTypes.default.string,
|
|
58
|
+
labelTypography: _propTypes.default.oneOf(_typographyOptions.typographyOptions),
|
|
59
|
+
labelColor: _propTypes.default.oneOf(_colorOptions.colorOptions),
|
|
60
|
+
subTextTypography: _propTypes.default.oneOf(_typographyOptions.typographyOptions),
|
|
61
|
+
subTextColor: _propTypes.default.oneOf(_colorOptions.colorOptions),
|
|
62
|
+
imgWidth: _propTypes.default.string
|
|
63
|
+
};
|
|
64
|
+
CustomCountCard.defaultProps = {
|
|
65
|
+
label: '',
|
|
66
|
+
imgPath: '',
|
|
67
|
+
subText: '',
|
|
68
|
+
labelTypography: null,
|
|
69
|
+
labelColor: null,
|
|
70
|
+
subTextTypography: null,
|
|
71
|
+
subTextColor: null,
|
|
72
|
+
imgWidth: '36px'
|
|
73
|
+
};
|
|
74
|
+
var _default = exports.default = CustomCountCard;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.CustomCountStyle = 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 CustomCountStyle = exports.CustomCountStyle = _styledComponents.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n\n img {margin-right:16px}\n div {display: flex;\n flex-direction: column;\n justify-content: flex-start;}\n\n div h3{margin-top:8px}\n"])));
|
|
@@ -0,0 +1,134 @@
|
|
|
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 = CustomDatePicker;
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
|
+
var _antd = require("antd");
|
|
14
|
+
var _CalendarTodayRounded = _interopRequireDefault(require("@material-ui/icons/CalendarTodayRounded"));
|
|
15
|
+
var _ColorVariablesMap = _interopRequireDefault(require("../../global-css/ColorVariablesMap"));
|
|
16
|
+
var _TypographiesMap = _interopRequireDefault(require("../../global-css/TypographiesMap"));
|
|
17
|
+
require("antd/dist/reset.css");
|
|
18
|
+
var _MaterialIcon = _interopRequireDefault(require("../oa-component-icons/MaterialIcon"));
|
|
19
|
+
const _excluded = ["data-test", "disabledDateFunction", "containerSize"];
|
|
20
|
+
var _templateObject, _templateObject2;
|
|
21
|
+
/* eslint-disable */
|
|
22
|
+
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); }
|
|
23
|
+
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; }
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
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); }
|
|
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
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
+
const CalendarPopupStyle = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.compact-calendar .ant-picker-body {\n padding: 6px 10px !important; /* moderate spacing */\n}\n\n.compact-calendar .ant-picker-content {\n margin: 0 !important;\n width: 100% !important;\n table-layout: fixed;\n}\n\n.compact-calendar .ant-picker-cell {\n padding: 2px 1px !important; /* smaller inner padding */\n height: 30px; /* compact but readable */\n line-height: 30px;\n}\n\n\n"])));
|
|
30
|
+
const FullWidthDatePicker = (0, _styledComponents.default)(_antd.DatePicker)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n"])));
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A custom datepicker component.
|
|
34
|
+
*
|
|
35
|
+
* The component includes a Material UI icon on the right side of the input field.
|
|
36
|
+
* The component is fully customizable and can be used with any of the options
|
|
37
|
+
* provided by the antd datepicker component.
|
|
38
|
+
*
|
|
39
|
+
* @param {Object} props - The props for the component
|
|
40
|
+
* @prop {string} ['data-test'] - The data-test value for the component
|
|
41
|
+
*
|
|
42
|
+
* @return {ReactElement} The rendered component
|
|
43
|
+
*/
|
|
44
|
+
function CustomDatePicker(_ref) {
|
|
45
|
+
let {
|
|
46
|
+
"data-test": dataTest,
|
|
47
|
+
disabledDateFunction,
|
|
48
|
+
containerSize
|
|
49
|
+
} = _ref,
|
|
50
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_antd.ConfigProvider, {
|
|
52
|
+
theme: {
|
|
53
|
+
components: {
|
|
54
|
+
DatePicker: {
|
|
55
|
+
// paddingInline: 161, // This works for middle sized datepicker
|
|
56
|
+
// paddingInlineSM: 12,
|
|
57
|
+
/*
|
|
58
|
+
For small size:
|
|
59
|
+
20 (line height)
|
|
60
|
+
+ 2 * 5 (padding)
|
|
61
|
+
+ 2 * 1 (border)
|
|
62
|
+
*/
|
|
63
|
+
paddingBlockSM: 5,
|
|
64
|
+
/*
|
|
65
|
+
For default size:
|
|
66
|
+
20 (line height)
|
|
67
|
+
+ 2 * 13 (padding)
|
|
68
|
+
+ 2 * 1 (border)
|
|
69
|
+
*/
|
|
70
|
+
paddingBlock: 13,
|
|
71
|
+
paddingInline: 16,
|
|
72
|
+
paddingInlineSM: 12
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
token: {
|
|
76
|
+
lineHeight: _TypographiesMap.default["type-b2-400"]["line-height"] / _TypographiesMap.default["type-b2-400"]["font-size"],
|
|
77
|
+
paddingBlockLG: 50,
|
|
78
|
+
paddingXS: 16,
|
|
79
|
+
// Used to control margin of calendar icon
|
|
80
|
+
// controlPaddingHorizontal: 161,
|
|
81
|
+
// controlPaddingHorizontalSM: 12,
|
|
82
|
+
controlHeight: 48,
|
|
83
|
+
// height of text field (tag height is half of this, i.e. 24px)
|
|
84
|
+
controlHeightSM: 32,
|
|
85
|
+
// height of small text field
|
|
86
|
+
// controlHeightLG: 64,
|
|
87
|
+
borderRadius: 4,
|
|
88
|
+
colorPrimary: _ColorVariablesMap.default["--color-primary"],
|
|
89
|
+
// for active color of input
|
|
90
|
+
colorPrimaryHover: _ColorVariablesMap.default["--color-primary"],
|
|
91
|
+
// for hover color of input
|
|
92
|
+
colorBgContainerDisabled: _ColorVariablesMap.default["--color-divider"],
|
|
93
|
+
colorBorder: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
94
|
+
// border color of input text field
|
|
95
|
+
colorTextDisabled: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
96
|
+
// Color of disabled text.
|
|
97
|
+
colorTextPlaceholder: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
98
|
+
// Color of placeholder text
|
|
99
|
+
colorTextQuaternary: _ColorVariablesMap.default["--color-placeholder-text"],
|
|
100
|
+
// color of disabled calendar icon
|
|
101
|
+
colorText: _ColorVariablesMap.default["--color-primary-content"],
|
|
102
|
+
// Text color
|
|
103
|
+
colorIcon: _ColorVariablesMap.default["--color-primary"],
|
|
104
|
+
// Color of arrows icons beside month and year in datepicker
|
|
105
|
+
colorIconHover: _ColorVariablesMap.default["--color-primary-hover"],
|
|
106
|
+
// Hover color of arrows icons beside month and year in datepicker
|
|
107
|
+
|
|
108
|
+
colorLink: _ColorVariablesMap.default["--color-primary"],
|
|
109
|
+
colorLinkHover: _ColorVariablesMap.default["--color-primary-hover"],
|
|
110
|
+
colorError: _ColorVariablesMap.default["--color-negative"],
|
|
111
|
+
// Error color
|
|
112
|
+
colorErrorBorderHover: _ColorVariablesMap.default["--color-negative"] // Hover error color should be same as error color
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}, containerSize === "small" && /*#__PURE__*/_react.default.createElement(CalendarPopupStyle, null), /*#__PURE__*/_react.default.createElement(FullWidthDatePicker, _extends({
|
|
116
|
+
dropdownClassName: containerSize === "small" ? "compact-calendar" : "",
|
|
117
|
+
showToday: containerSize === "small" ? false : true,
|
|
118
|
+
allowClear: true // Discussed with UX team
|
|
119
|
+
,
|
|
120
|
+
suffixIcon: /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
121
|
+
icon: _CalendarTodayRounded.default,
|
|
122
|
+
size: 20
|
|
123
|
+
}),
|
|
124
|
+
disabledDate: disabledDateFunction
|
|
125
|
+
}, props)));
|
|
126
|
+
}
|
|
127
|
+
CustomDatePicker.propTypes = {
|
|
128
|
+
"data-test": _propTypes.default.string,
|
|
129
|
+
size: _propTypes.default.oneOf(["small", "middle"])
|
|
130
|
+
};
|
|
131
|
+
CustomDatePicker.defaultProps = {
|
|
132
|
+
"data-test": null,
|
|
133
|
+
size: "middle"
|
|
134
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styles = require("./styles");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
// Import the styles from the separate file
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A component to demonstrate the various border radius values in the design system.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} className - The desired border radius style from the design system.
|
|
17
|
+
* One of 'border-radius-xlarge', 'border-radius-large',
|
|
18
|
+
* 'border-radius-medium', 'border-radius-small',
|
|
19
|
+
* 'border-radius-xsmall', 'border-radius-none', or
|
|
20
|
+
* 'border-radius-full'.
|
|
21
|
+
*
|
|
22
|
+
* @return {ReactElement} A styled <div> element with the specified border radius.
|
|
23
|
+
*/
|
|
24
|
+
function BorderRadiusDemo(_ref) {
|
|
25
|
+
let {
|
|
26
|
+
className
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledCornerComponent, {
|
|
29
|
+
className: className
|
|
30
|
+
}, className);
|
|
31
|
+
}
|
|
32
|
+
BorderRadiusDemo.propTypes = {
|
|
33
|
+
className: _propTypes.default.oneOf(['border-radius-xlarge', 'border-radius-large', 'border-radius-medium', 'border-radius-small', 'border-radius-xsmall', 'border-radius-none', 'border-radius-full']).isRequired
|
|
34
|
+
};
|
|
35
|
+
var _default = exports.default = BorderRadiusDemo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StyledCornerComponent = 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 StyledCornerComponent = exports.StyledCornerComponent = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 200px;\n width: 200px;\n color: white;\n background-color: #029CFD;\n"])));
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styles = require("./styles");
|
|
10
|
+
var _colorOptions = require("../../global-css/color-options");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
// Import the styles from the separate file
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Component that renders a block with a background color specified by the
|
|
16
|
+
* given color variable, and displays the name of the variable.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} color - The name of the color variable to use.
|
|
19
|
+
* (e.g. 'primary', 'background-dark', 'background-info', etc.)
|
|
20
|
+
*
|
|
21
|
+
* @returns {React.ReactNode} The rendered component.
|
|
22
|
+
*/
|
|
23
|
+
function ColorVariablesDemo(_ref) {
|
|
24
|
+
let {
|
|
25
|
+
color
|
|
26
|
+
} = _ref;
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_styles.StyledDemo, {
|
|
28
|
+
color: color
|
|
29
|
+
}, "--color-".concat(color));
|
|
30
|
+
}
|
|
31
|
+
ColorVariablesDemo.propTypes = {
|
|
32
|
+
color: _propTypes.default.oneOf(_colorOptions.colorOptions).isRequired
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = ColorVariablesDemo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.StyledDemo = 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 StyledDemo = exports.StyledDemo = _styledComponents.default.h1(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: var(--color-", ");\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100px;\n width: 450px;\n"])), props => props.color);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styles = require("./styles");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function ElevationDemo(_ref) {
|
|
12
|
+
let {
|
|
13
|
+
className
|
|
14
|
+
} = _ref;
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_styles.Container, {
|
|
16
|
+
className: className
|
|
17
|
+
}, className);
|
|
18
|
+
}
|
|
19
|
+
ElevationDemo.propTypes = {
|
|
20
|
+
className: _propTypes.default.oneOf(['elevation-white-1', 'elevation-above-white-1', 'elevation-white-2', 'elevation-above-white-2', 'elevation-white-3', 'elevation-dark-1', 'elevation-dark-2', 'elevation-dark-3']).isRequired
|
|
21
|
+
};
|
|
22
|
+
var _default = exports.default = ElevationDemo;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.Container = 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 Container = exports.Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n height: 200px;\n width: 200px;\n\n display: flex;\n justify-content: center;\n align-items: center;\n"])));
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
// SpacingScales.js
|
|
12
|
+
|
|
13
|
+
// Import the styled component
|
|
14
|
+
|
|
15
|
+
function SpacingScales(_ref) {
|
|
16
|
+
let {
|
|
17
|
+
type
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement(_styles.default, {
|
|
20
|
+
type: type
|
|
21
|
+
}, ' `', type, "`heading");
|
|
22
|
+
}
|
|
23
|
+
SpacingScales.propTypes = {
|
|
24
|
+
type: _propTypes.default.oneOf(['spacing-4', 'spacing-8', 'spacing-12', 'spacing-16', 'spacing-24', 'spacing-32', 'padding-top-4', 'padding-left-4', 'padding-right-4', 'padding-bottom-4', 'padding-top-8', 'padding-left-8', 'padding-right-8', 'padding-bottom-8', 'padding-top-12', 'padding-left-12', 'padding-right-12', 'padding-bottom-12', 'padding-top-16', 'padding-left-16', 'padding-right-16', 'padding-bottom-16', 'padding-top-24', 'padding-left-24', 'padding-right-24', 'padding-bottom-24', 'padding-top-32', 'padding-left-32', 'padding-right-32', 'padding-bottom-32', 'padding-top-40', 'padding-left-40', 'padding-right-40', 'padding-bottom-40', 'padding-top-48', 'padding-left-48', 'padding-right-48', 'padding-bottom-48', 'padding-top-56', 'padding-left-56', 'padding-right-56', 'padding-bottom-56', 'padding-top-64', 'padding-left-64', 'padding-right-64', 'padding-bottom-64', 'padding-top-72', 'padding-left-72', 'padding-right-72', 'padding-bottom-72', 'padding-top-80', 'padding-left-80', 'padding-right-80', 'padding-bottom-80', 'padding-top-96', 'padding-left-96', 'padding-right-96', 'padding-bottom-96', 'padding-top-108', 'padding-left-108', 'padding-right-108', 'padding-bottom-108', 'margin-top-4', 'margin-left-4', 'margin-right-4', 'margin-bottom-4', 'margin-top-8', 'margin-left-8', 'margin-right-8', 'margin-bottom-8', 'margin-top-12', 'margin-left-12', 'margin-right-12', 'margin-bottom-12', 'margin-top-16', 'margin-left-16', 'margin-right-16', 'margin-bottom-16', 'margin-top-24', 'margin-left-24', 'margin-right-24', 'margin-bottom-24', 'margin-top-32', 'margin-left-32', 'margin-right-32', 'margin-bottom-32', 'margin-top-40', 'margin-left-40', 'margin-right-40', 'margin-bottom-40', 'margin-top-48', 'margin-left-48', 'margin-right-48', 'margin-bottom-48', 'margin-top-56', 'margin-left-56', 'margin-right-56', 'margin-bottom-56', 'margin-top-64', 'margin-left-64', 'margin-right-64', 'margin-bottom-64', 'margin-top-72', 'margin-left-72', 'margin-right-72', 'margin-bottom-72', 'margin-top-80', 'margin-left-80', 'margin-right-80', 'margin-bottom-80', 'margin-top-96', 'margin-left-96', 'margin-right-96', 'margin-bottom-96', 'margin-top-108', 'margin-left-108', 'margin-right-108', 'margin-bottom-108']).isRequired
|
|
25
|
+
};
|
|
26
|
+
var _default = exports.default = SpacingScales;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject; // SpacingScalesStyles.js
|
|
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 SpacingScalesContainer = _styledComponents.default.h1(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: pink;\n ", ""])), _ref => {
|
|
12
|
+
let {
|
|
13
|
+
type
|
|
14
|
+
} = _ref;
|
|
15
|
+
switch (type) {
|
|
16
|
+
case 'spacing-4':
|
|
17
|
+
// padding specific for all sides
|
|
18
|
+
return 'padding: 4px;';
|
|
19
|
+
case 'spacing-8':
|
|
20
|
+
return 'padding: 8px;';
|
|
21
|
+
case 'spacing-12':
|
|
22
|
+
return 'padding: 12px;';
|
|
23
|
+
case 'spacing-16':
|
|
24
|
+
return 'padding: 16px;';
|
|
25
|
+
case 'spacing-24':
|
|
26
|
+
return 'padding: 24px;';
|
|
27
|
+
case 'spacing-32':
|
|
28
|
+
return 'padding: 32px;';
|
|
29
|
+
case 'padding-top-4':
|
|
30
|
+
// for padding specific
|
|
31
|
+
return 'padding-top: 4px;';
|
|
32
|
+
case 'padding-left-4':
|
|
33
|
+
return 'padding-left: 4px;';
|
|
34
|
+
case 'padding-right-4':
|
|
35
|
+
return 'padding-right: 4px;';
|
|
36
|
+
case 'padding-bottom-4':
|
|
37
|
+
return 'padding-bottom: 4px;';
|
|
38
|
+
case 'padding-top-8':
|
|
39
|
+
return 'padding-top: 8px;';
|
|
40
|
+
case 'padding-left-8':
|
|
41
|
+
return 'padding-left: 8px;';
|
|
42
|
+
case 'padding-right-8':
|
|
43
|
+
return 'padding-right: 8px;';
|
|
44
|
+
case 'padding-bottom-8':
|
|
45
|
+
return 'padding-bottom: 8px;';
|
|
46
|
+
case 'padding-top-12':
|
|
47
|
+
return 'padding-top: 12px;';
|
|
48
|
+
case 'padding-left-12':
|
|
49
|
+
return 'padding-left: 12px;';
|
|
50
|
+
case 'padding-right-12':
|
|
51
|
+
return 'padding-right: 12px;';
|
|
52
|
+
case 'padding-bottom-12':
|
|
53
|
+
return 'padding-bottom: 12px;';
|
|
54
|
+
case 'padding-top-16':
|
|
55
|
+
return 'padding-top: 16px;';
|
|
56
|
+
case 'padding-left-16':
|
|
57
|
+
return 'padding-left: 16px;';
|
|
58
|
+
case 'padding-right-16':
|
|
59
|
+
return 'padding-right: 16px;';
|
|
60
|
+
case 'padding-bottom-16':
|
|
61
|
+
return 'padding-bottom: 16px;';
|
|
62
|
+
case 'padding-top-24':
|
|
63
|
+
return 'padding-top: 24px;';
|
|
64
|
+
case 'padding-left-24':
|
|
65
|
+
return 'padding-left: 24px;';
|
|
66
|
+
case 'padding-right-24':
|
|
67
|
+
return 'padding-right: 24px;';
|
|
68
|
+
case 'padding-bottom-24':
|
|
69
|
+
return 'padding-bottom: 24px;';
|
|
70
|
+
case 'padding-top-32':
|
|
71
|
+
return 'padding-top: 32px;';
|
|
72
|
+
case 'padding-left-32':
|
|
73
|
+
return 'padding-left: 32px;';
|
|
74
|
+
case 'padding-right-32':
|
|
75
|
+
return 'padding-right: 32px;';
|
|
76
|
+
case 'padding-bottom-32':
|
|
77
|
+
return 'padding-bottom: 32px;';
|
|
78
|
+
case 'padding-top-40':
|
|
79
|
+
return 'padding-top: 40px;';
|
|
80
|
+
case 'padding-left-40':
|
|
81
|
+
return 'padding-left: 40px;';
|
|
82
|
+
case 'padding-right-40':
|
|
83
|
+
return 'padding-right: 40px;';
|
|
84
|
+
case 'padding-bottom-40':
|
|
85
|
+
return 'padding-bottom: 40px;';
|
|
86
|
+
case 'padding-top-48':
|
|
87
|
+
return 'padding-top: 48px;';
|
|
88
|
+
case 'padding-left-48':
|
|
89
|
+
return 'padding-left: 48px;';
|
|
90
|
+
case 'padding-right-48':
|
|
91
|
+
return 'padding-right: 48px;';
|
|
92
|
+
case 'padding-bottom-48':
|
|
93
|
+
return 'padding-bottom: 48px;';
|
|
94
|
+
case 'padding-top-56':
|
|
95
|
+
return 'padding-top: 56px;';
|
|
96
|
+
case 'padding-left-56':
|
|
97
|
+
return 'padding-left: 56px;';
|
|
98
|
+
case 'padding-right-56':
|
|
99
|
+
return 'padding-right: 56px;';
|
|
100
|
+
case 'padding-bottom-56':
|
|
101
|
+
return 'padding-bottom: 56px;';
|
|
102
|
+
case 'padding-top-64':
|
|
103
|
+
return 'padding-top: 64px;';
|
|
104
|
+
case 'padding-left-64':
|
|
105
|
+
return 'padding-left: 64px;';
|
|
106
|
+
case 'padding-right-64':
|
|
107
|
+
return 'padding-right: 64px;';
|
|
108
|
+
case 'padding-bottom-64':
|
|
109
|
+
return 'padding-bottom: 64px;';
|
|
110
|
+
case 'padding-top-72':
|
|
111
|
+
return 'padding-top: 72px;';
|
|
112
|
+
case 'padding-left-72':
|
|
113
|
+
return 'padding-left: 72px;';
|
|
114
|
+
case 'padding-right-72':
|
|
115
|
+
return 'padding-right: 72px;';
|
|
116
|
+
case 'padding-bottom-72':
|
|
117
|
+
return 'padding-bottom: 72px;';
|
|
118
|
+
case 'padding-top-80':
|
|
119
|
+
return 'padding-top: 80px;';
|
|
120
|
+
case 'padding-left-80':
|
|
121
|
+
return 'padding-left: 80px;';
|
|
122
|
+
case 'padding-right-80':
|
|
123
|
+
return 'padding-right: 80px;';
|
|
124
|
+
case 'padding-bottom-80':
|
|
125
|
+
return 'padding-bottom: 80px;';
|
|
126
|
+
case 'padding-top-96':
|
|
127
|
+
return 'padding-top: 96px;';
|
|
128
|
+
case 'padding-left-96':
|
|
129
|
+
return 'padding-left: 96px;';
|
|
130
|
+
case 'padding-right-96':
|
|
131
|
+
return 'padding-right: 96px;';
|
|
132
|
+
case 'padding-bottom-96':
|
|
133
|
+
return 'padding-bottom: 96px;';
|
|
134
|
+
case 'padding-top-108':
|
|
135
|
+
return 'padding-top: 108px;';
|
|
136
|
+
case 'padding-left-108':
|
|
137
|
+
return 'padding-left: 108px;';
|
|
138
|
+
case 'padding-right-108':
|
|
139
|
+
return 'padding-right: 108px;';
|
|
140
|
+
case 'padding-bottom-108':
|
|
141
|
+
return 'padding-bottom: 108px;';
|
|
142
|
+
case 'margin-top-4':
|
|
143
|
+
// for margin spacific
|
|
144
|
+
return 'margin-top: 4px;';
|
|
145
|
+
case 'margin-left-4':
|
|
146
|
+
return 'margin-left: 4px;';
|
|
147
|
+
case 'margin-right-4':
|
|
148
|
+
return 'margin-right: 4px;';
|
|
149
|
+
case 'margin-bottom-4':
|
|
150
|
+
return 'margin-bottom: 4px;';
|
|
151
|
+
case 'margin-top-8':
|
|
152
|
+
return 'margin-top: 8px;';
|
|
153
|
+
case 'margin-left-8':
|
|
154
|
+
return 'margin-left: 8px;';
|
|
155
|
+
case 'margin-right-8':
|
|
156
|
+
return 'margin-right: 8px;';
|
|
157
|
+
case 'margin-bottom-8':
|
|
158
|
+
return 'margin-bottom: 8px;';
|
|
159
|
+
case 'margin-top-12':
|
|
160
|
+
return 'margin-top: 12px;';
|
|
161
|
+
case 'margin-left-12':
|
|
162
|
+
return 'margin-left: 12px;';
|
|
163
|
+
case 'margin-right-12':
|
|
164
|
+
return 'margin-right: 12px;';
|
|
165
|
+
case 'margin-bottom-12':
|
|
166
|
+
return 'margin-bottom: 12px;';
|
|
167
|
+
case 'margin-top-16':
|
|
168
|
+
return 'margin-top: 16px;';
|
|
169
|
+
case 'margin-left-16':
|
|
170
|
+
return 'margin-left: 16px;';
|
|
171
|
+
case 'margin-right-16':
|
|
172
|
+
return 'margin-right: 16px;';
|
|
173
|
+
case 'margin-bottom-16':
|
|
174
|
+
return 'margin-bottom: 16px;';
|
|
175
|
+
case 'margin-top-24':
|
|
176
|
+
return 'margin-top: 24px;';
|
|
177
|
+
case 'margin-left-24':
|
|
178
|
+
return 'margin-left: 24px;';
|
|
179
|
+
case 'margin-right-24':
|
|
180
|
+
return 'margin-right: 24px;';
|
|
181
|
+
case 'margin-bottom-24':
|
|
182
|
+
return 'margin-bottom: 24px;';
|
|
183
|
+
case 'margin-top-32':
|
|
184
|
+
return 'margin-top: 32px;';
|
|
185
|
+
case 'margin-left-32':
|
|
186
|
+
return 'margin-left: 32px;';
|
|
187
|
+
case 'margin-right-32':
|
|
188
|
+
return 'margin-right: 32px;';
|
|
189
|
+
case 'margin-bottom-32':
|
|
190
|
+
return 'margin-bottom: 32px;';
|
|
191
|
+
case 'margin-top-40':
|
|
192
|
+
return 'margin-top: 40px;';
|
|
193
|
+
case 'margin-left-40':
|
|
194
|
+
return 'margin-left: 40px;';
|
|
195
|
+
case 'margin-right-40':
|
|
196
|
+
return 'margin-right: 40px;';
|
|
197
|
+
case 'margin-bottom-40':
|
|
198
|
+
return 'margin-bottom: 40px;';
|
|
199
|
+
case 'margin-top-48':
|
|
200
|
+
return 'margin-top: 48px;';
|
|
201
|
+
case 'margin-left-48':
|
|
202
|
+
return 'margin-left: 48px;';
|
|
203
|
+
case 'margin-right-48':
|
|
204
|
+
return 'margin-right: 48px;';
|
|
205
|
+
case 'margin-bottom-48':
|
|
206
|
+
return 'margin-bottom: 48px;';
|
|
207
|
+
case 'margin-top-56':
|
|
208
|
+
return 'margin-top: 56px;';
|
|
209
|
+
case 'margin-left-56':
|
|
210
|
+
return 'margin-left: 56px;';
|
|
211
|
+
case 'margin-right-56':
|
|
212
|
+
return 'margin-right: 56px;';
|
|
213
|
+
case 'margin-bottom-56':
|
|
214
|
+
return 'margin-bottom: 56px;';
|
|
215
|
+
case 'margin-top-64':
|
|
216
|
+
return 'margin-top: 64px;';
|
|
217
|
+
case 'margin-left-64':
|
|
218
|
+
return 'margin-left: 64px;';
|
|
219
|
+
case 'margin-right-64':
|
|
220
|
+
return 'margin-right: 64px;';
|
|
221
|
+
case 'margin-bottom-64':
|
|
222
|
+
return 'margin-bottom: 64px;';
|
|
223
|
+
case 'margin-top-72':
|
|
224
|
+
return 'margin-top: 72px;';
|
|
225
|
+
case 'margin-left-72':
|
|
226
|
+
return 'margin-left: 72px;';
|
|
227
|
+
case 'margin-right-72':
|
|
228
|
+
return 'margin-right: 72px;';
|
|
229
|
+
case 'margin-bottom-72':
|
|
230
|
+
return 'margin-bottom: 72px;';
|
|
231
|
+
case 'margin-top-80':
|
|
232
|
+
return 'margin-top: 80px;';
|
|
233
|
+
case 'margin-left-80':
|
|
234
|
+
return 'margin-left: 80px;';
|
|
235
|
+
case 'margin-right-80':
|
|
236
|
+
return 'margin-right: 80px;';
|
|
237
|
+
case 'margin-bottom-80':
|
|
238
|
+
return 'margin-bottom: 80px;';
|
|
239
|
+
case 'margin-top-96':
|
|
240
|
+
return 'margin-top: 96px;';
|
|
241
|
+
case 'margin-left-96':
|
|
242
|
+
return 'margin-left: 96px;';
|
|
243
|
+
case 'margin-right-96':
|
|
244
|
+
return 'margin-right: 96px;';
|
|
245
|
+
case 'margin-bottom-96':
|
|
246
|
+
return 'margin-bottom: 96px;';
|
|
247
|
+
case 'margin-top-108':
|
|
248
|
+
return 'margin-top: 108px;';
|
|
249
|
+
case 'margin-left-108':
|
|
250
|
+
return 'margin-left: 108px;';
|
|
251
|
+
case 'margin-right-108':
|
|
252
|
+
return 'margin-right: 108px;';
|
|
253
|
+
case 'margin-bottom-108':
|
|
254
|
+
return 'margin-bottom: 108px;';
|
|
255
|
+
default:
|
|
256
|
+
return 'padding: 0; margin: 0;';
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
var _default = exports.default = SpacingScalesContainer;
|