@bikdotai/bik-component-library 0.0.687-beta.4 → 0.0.687-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/amplitude/index.d.ts +21 -0
- package/dist/esm/amplitude/index.js +1 -1
- package/dist/esm/amplitude/model.d.ts +51 -0
- package/dist/esm/components/InfiniteScroll/InfiniteScroll.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/CustomField/components/CustomField.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/Segment/components/SegmentFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/Filters/UserProperty/components/UserPropertyFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/QueryBuilder.d.ts +12 -0
- package/dist/esm/components/QueryBuilder/QueryBuilder.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.js +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/AddNodeButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/AllowedListDropdown.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/EmojiPicker.js +14 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/FrequencyIntegerPositiveSingle.js +2 -2
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IgPicker.js +234 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLast.js +5 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTheLastAgo.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/InTwoLast.js +6 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerPositiveSingle.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/IntegerSingleValue.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/MultiselectDropdownFreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/NumberTime.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleDate.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/SingleselectDropdownFreeText.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/StringSingleValue.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoDate.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Components/TwoNumberInputsSeperatedByAnd.js +1 -1
- package/dist/esm/components/QueryBuilder/components/Connectors/Connector.js +1 -1
- package/dist/esm/components/QueryBuilder/components/DeleteButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/DropdownWrapper.js +1 -1
- package/dist/esm/components/QueryBuilder/components/InputLoader.js +4 -4
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.d.ts +25 -0
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js +4 -4
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/AddPropertyButton.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.d.ts +20 -0
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodes.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/QueryBuilderNode.js +1 -1
- package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/ApiResponse.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/helpers/Connector.helper.js +1 -1
- package/dist/esm/components/QueryBuilder/hooks/useQueryBuilderCache.js +1 -1
- package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.d.ts +56 -0
- package/dist/esm/components/QueryBuilder/redux/queryBuilder.reducer.js +1 -1
- package/dist/esm/components/QueryBuilder/redux/queryBuilderCache.reducer.d.ts +22 -0
- package/dist/esm/components/QueryBuilder/redux/queryBuilderCache.reducer.js +1 -1
- package/dist/esm/components/QueryBuilder/types/QueryBuilder.type.d.ts +90 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderAPI.type.d.ts +21 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderConnector.type.d.ts +54 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderNodeProps.type.d.ts +14 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderOperator.type.d.ts +130 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderPropertyProps.d.ts +39 -0
- package/dist/esm/components/QueryBuilder/types/QueryBuilderProps.type.d.ts +55 -0
- package/dist/esm/components/SearchFilter/components/DatePickerButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/DateRangeOnlyButton.js +1 -1
- package/dist/esm/components/SearchFilter/components/FilterChipListRenderer.js +1 -1
- package/dist/esm/components/SearchFilter/components/SearchFilterItem.js +1 -1
- package/dist/esm/components/SearchFilter/index.d.ts +6 -0
- package/dist/esm/components/SearchFilter/index.js +1 -1
- package/dist/esm/components/SearchFilter/types/SearchFilter.type.d.ts +41 -0
- package/dist/esm/components/TablePagination/TablePagination.d.ts +17 -0
- package/dist/esm/components/TablePagination/TablePagination.js +1 -1
- package/dist/esm/components/TablePagination/TablePaginationCard.d.ts +14 -0
- package/dist/esm/components/TablePagination/TablePaginationCard.js +9 -1
- package/dist/esm/components/TypographyStyle.d.ts +117 -0
- package/dist/esm/components/WhatsAppTextEditor/CustomEditor.styled.js +22 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.d.ts +46 -0
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditor.js +1 -1
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +24 -0
- package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js +34 -1
- package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.d.ts +23 -0
- package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js +1 -1
- package/dist/esm/components/accordion/Accordion.d.ts +31 -0
- package/dist/esm/components/accordion/Accordion.js +1 -1
- package/dist/esm/components/accordion/Accordion.style.js +2 -2
- package/dist/esm/components/accordion/AccordionArrow.js +1 -1
- package/dist/esm/components/action-button/ActionButton.styled.js +2 -2
- package/dist/esm/components/action-button/ActionButtons.d.ts +14 -0
- package/dist/esm/components/action-button/ActionButtons.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.d.ts +61 -0
- package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.styled.js +3 -3
- package/dist/esm/components/add-variableV2/AddVariableV2SideModal.d.ts +23 -0
- package/dist/esm/components/add-variableV2/types.d.ts +8 -0
- package/dist/esm/components/ai-modals/ActivateBikAI.d.ts +12 -0
- package/dist/esm/components/ai-modals/ActivateBikAI.js +1 -1
- package/dist/esm/components/ai-modals/AiCreditsExhausted.d.ts +11 -0
- package/dist/esm/components/ai-modals/AiCreditsExhausted.js +1 -1
- package/dist/esm/components/ai-modals/AiCreditsLow.d.ts +10 -0
- package/dist/esm/components/ai-modals/AiCreditsLow.js +1 -1
- package/dist/esm/components/ai-modals/AiSyncProgress.d.ts +11 -0
- package/dist/esm/components/ai-modals/AiSyncProgress.js +1 -1
- package/dist/esm/components/alerts/Alert.d.ts +25 -0
- package/dist/esm/components/alerts/Alert.js +1 -1
- package/dist/esm/components/alerts/AlertHelper.d.ts +42 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.d.ts +14 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +21 -0
- package/dist/esm/components/analytics-card/AnalyticsCard.styled.js +46 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.d.ts +23 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsChip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +52 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.d.ts +21 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMetric.js +5 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.d.ts +9 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +37 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.js +113 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.d.ts +49 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.js +4 -4
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Legend/Legend.js +19 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.d.ts +58 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.js +16 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js +2 -2
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.d.ts +8 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +5 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartInputData.d.ts +23 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.model.d.ts +90 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.js +6 -6
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarDistributionChart.model.d.ts +51 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.d.ts +6 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraphModel.d.ts +24 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.d.ts +18 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/FunnelVerticalBarGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.d.ts +49 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.styles.js +3 -3
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.d.ts +35 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.js +38 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts +20 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.js +32 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/Chip.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/HorinzontalBar.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.d.ts +30 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.js +31 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.d.ts +22 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/utils/calcPercentage.js +1 -1
- package/dist/esm/components/avatar/Avatar.d.ts +53 -0
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/avatar/AvatarHelper.d.ts +24 -0
- package/dist/esm/components/bik-layout/BikHeader.d.ts +19 -0
- package/dist/esm/components/bik-layout/BikHeader.js +1 -1
- package/dist/esm/components/bik-layout/BikLayout.d.ts +27 -0
- package/dist/esm/components/bik-layout/BikLayout.js +1 -1
- package/dist/esm/components/bik-layout/BikProfile.d.ts +14 -0
- package/dist/esm/components/bik-layout/BikSidebar.d.ts +37 -0
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js +366 -1
- package/dist/esm/components/bik-layout/FeatureModal.d.ts +16 -0
- package/dist/esm/components/bik-layout/FeatureModalV2.d.ts +15 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.d.ts +15 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.js +1 -1
- package/dist/esm/components/bik-layout/SidebarPopup.js +1 -1
- package/dist/esm/components/bik-layout/SidebarSkeleton.d.ts +12 -0
- package/dist/esm/components/bik-layout/SimpleSidebar.d.ts +31 -0
- package/dist/esm/components/bik-layout/SimpleSidebar.js +1 -1
- package/dist/esm/components/button/Button.d.ts +6 -0
- package/dist/esm/components/button/Button.js +1 -1
- package/dist/esm/components/button/Button.styled.js +61 -1
- package/dist/esm/components/button/model.d.ts +78 -0
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/buttonGroup/ButtonGroup.d.ts +26 -0
- package/dist/esm/components/buttonGroup/ButtonGroup.js +1 -1
- package/dist/esm/components/card-selection-modal/CardSelectionModal.d.ts +21 -0
- package/dist/esm/components/card-selection-modal/CardSelectionModal.styled.js +41 -1
- package/dist/esm/components/card-selector/CardSelector.d.ts +20 -0
- package/dist/esm/components/card-selector/CardSelector.js +1 -1
- package/dist/esm/components/card-selector/CardSelectorGroup.d.ts +14 -0
- package/dist/esm/components/carousel/carousel.d.ts +6 -0
- package/dist/esm/components/carousel/carousel.js +2 -2
- package/dist/esm/components/carousel-preview/CarouselPreview.d.ts +16 -0
- package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/esm/components/carousel-preview/CarouselPreview.style.js +4 -4
- package/dist/esm/components/carousel-preview/CarouselPreviewCard.js +1 -1
- package/dist/esm/components/carousel-preview/CustomCarouselArrows.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.d.ts +15 -0
- package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.style.js +42 -1
- package/dist/esm/components/carousel-secondary/model.d.ts +6 -0
- package/dist/esm/components/checkBox/CheckBox.d.ts +24 -0
- package/dist/esm/components/checkBox/CheckBox.js +1 -1
- package/dist/esm/components/checkBox/CheckBox.styled.js +6 -6
- package/dist/esm/components/checkList/CheckList.d.ts +17 -0
- package/dist/esm/components/checkList/CheckList.js +1 -1
- package/dist/esm/components/checkList/CheckList.styled.js +10 -1
- package/dist/esm/components/colourInput/ColourInput.d.ts +12 -0
- package/dist/esm/components/colourInput/ColourInput.js +1 -1
- package/dist/esm/components/colourInput/ColourInput.styled.js +29 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +22 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
- package/dist/esm/components/country-code-picker/CountryCodePicker.modal.d.ts +10 -0
- package/dist/esm/components/country-code-picker/CountryCodePicker.styled.js +31 -1
- package/dist/esm/components/curtain/Curtain.d.ts +27 -0
- package/dist/esm/components/curtain/CurtainHelper.d.ts +26 -0
- package/dist/esm/components/custom-date-time/CustomDateTime.d.ts +16 -0
- package/dist/esm/components/custom-date-time/CustomDateTime.js +1 -1
- package/dist/esm/components/custom-date-time/CustomDateTime.styled.js +25 -1
- package/dist/esm/components/custom-date-time/DateSelector/DateSelector.js +1 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.d.ts +21 -0
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.js +1 -1
- package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.styled.js +26 -1
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.js +1 -1
- package/dist/esm/components/dashboard-review-popup/components/FiveStar.styled.js +18 -1
- package/dist/esm/components/dashboard-review-popup/components/Form.js +1 -1
- package/dist/esm/components/dashboard-review-popup/components/Form.styled.js +49 -1
- package/dist/esm/components/dashboard-review-popup/components/ZeroState.js +5 -1
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +39 -0
- package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/esm/components/data-source-panel/Modals/DescriptionModal.js +6 -6
- package/dist/esm/components/data-source-panel/model.d.ts +144 -0
- package/dist/esm/components/datePicker/DatePicker.d.ts +16 -0
- package/dist/esm/components/datePicker/DatePicker.js +1 -1
- package/dist/esm/components/datePicker/DatePicker.styled.js +159 -1
- package/dist/esm/components/datePicker/DatePickerWrapper.d.ts +19 -0
- package/dist/esm/components/datePicker/DatePickerWrapper.js +1 -1
- package/dist/esm/components/datePicker/model.d.ts +6 -0
- package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.d.ts +14 -0
- package/dist/esm/components/discount-modal/CouponExpiration/CouponExpiration.js +1 -1
- package/dist/esm/components/discount-modal/DiscountModal.d.ts +43 -0
- package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
- package/dist/esm/components/discount-modal/DiscountModal.styled.js +69 -1
- package/dist/esm/components/discount-modal/DiscountUtils.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.styled.js +8 -8
- package/dist/esm/components/discount-modal/DynamicCoupon/MinimumRequirementComponent.js +1 -1
- package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
- package/dist/esm/components/discount-modal/type.d.ts +111 -0
- package/dist/esm/components/dropShadow/DropShadow.d.ts +10 -0
- package/dist/esm/components/dropShadow/DropShadow.js +1 -1
- package/dist/esm/components/dropdown/ChipDropdown.d.ts +11 -0
- package/dist/esm/components/dropdown/ChipDropdown.js +5 -5
- package/dist/esm/components/dropdown/ChipInput.js +1 -1
- package/dist/esm/components/dropdown/Common.styled.js +2 -2
- package/dist/esm/components/dropdown/Dropdown.d.ts +24 -0
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/DropdownPopover/index.d.ts +20 -0
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/MenuItem/MenuItem.d.ts +13 -0
- package/dist/esm/components/dropdown/MenuItem/MenuItem.js +6 -6
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.d.ts +18 -0
- package/dist/esm/components/dropdown/MultilevelDropdownPopover/index.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.d.ts +6 -0
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +6 -6
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchZeroState.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/esm/components/dropdown/type.d.ts +75 -0
- package/dist/esm/components/dropdown-button/DropdownButton.d.ts +13 -0
- package/dist/esm/components/dropdown-button/DropdownButton.js +1 -1
- package/dist/esm/components/dropdown-button/DropdownButton.style.js +1 -1
- package/dist/esm/components/dynamic-tabs/DynamicTabs.d.ts +28 -0
- package/dist/esm/components/dynamic-tabs/DynamicTabs.js +1 -1
- package/dist/esm/components/fab-menu/FABMenu.d.ts +28 -0
- package/dist/esm/components/file-uploader/FileUploader.d.ts +6 -0
- package/dist/esm/components/file-uploader/FileUploader.js +1 -1
- package/dist/esm/components/file-uploader/Models.d.ts +31 -0
- package/dist/esm/components/floater/floater.d.ts +13 -0
- package/dist/esm/components/floater/floater.js +1 -1
- package/dist/esm/components/floating-action-button/FloatingActionButton.d.ts +24 -0
- package/dist/esm/components/floating-action-button/FloatingActionButton.styles.d.ts +62 -0
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.d.ts +28 -0
- package/dist/esm/components/floating-input-dropdown/FloatingInputDropdown.js +4 -4
- package/dist/esm/components/icon-button/IconButton.d.ts +6 -0
- package/dist/esm/components/icon-button/IconButton.js +1 -1
- package/dist/esm/components/icon-button/model.d.ts +45 -0
- package/dist/esm/components/image-compress/ImageCompress.d.ts +14 -0
- package/dist/esm/components/image-compress/ImageCompress.js +1 -1
- package/dist/esm/components/image-cropper/BikImageCropper.d.ts +12 -0
- package/dist/esm/components/image-cropper/BikImageCropper.js +1 -1
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.d.ts +38 -0
- package/dist/esm/components/image-cropper/BikImagePipeline/BikImagePipeline.js +1 -1
- package/dist/esm/components/input/ChipInput.js +1 -1
- package/dist/esm/components/input/ChipInput.styled.js +1 -1
- package/dist/esm/components/input/Input-helper.js +1 -1
- package/dist/esm/components/input/Input.d.ts +76 -0
- package/dist/esm/components/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.js +144 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +34 -0
- package/dist/esm/components/input-with-vars/InputWithVariables.js +2 -2
- package/dist/esm/components/input-with-vars/customPortal.d.ts +10 -0
- package/dist/esm/components/input-with-vars/customPortal.js +1 -1
- package/dist/esm/components/keywords-input/KeywordsInput.d.ts +15 -0
- package/dist/esm/components/keywords-input/KeywordsInput.js +1 -1
- package/dist/esm/components/list-item/ListItem.d.ts +23 -0
- package/dist/esm/components/list-item/ListItem.js +1 -1
- package/dist/esm/components/list-item/ListItem.styled.js +10 -1
- package/dist/esm/components/list-item/themes.js +29 -1
- package/dist/esm/components/modals/Modal.js +1 -1
- package/dist/esm/components/modals/modal.styled.js +47 -1
- package/dist/esm/components/modals/styledModal.d.ts +35 -0
- package/dist/esm/components/modals/styledModal.js +47 -1
- package/dist/esm/components/multi-level-dropdown/GroupedMenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuItem.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MenuList.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.d.ts +6 -0
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.js +25 -25
- package/dist/esm/components/multi-level-dropdown/type.d.ts +30 -0
- package/dist/esm/components/navigation-hyperlink/NavigationHyperlink.d.ts +14 -0
- package/dist/esm/components/pagination/Pagination.d.ts +13 -0
- package/dist/esm/components/pagination/Pagination.js +1 -1
- package/dist/esm/components/pagination/Pagination.styled.js +7 -1
- package/dist/esm/components/plans/NewSubscriptionPlan.d.ts +22 -0
- package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlan.d.ts +41 -0
- package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlanSelector.d.ts +49 -0
- package/dist/esm/components/plans/SubscriptionPlanSelector.js +101 -1
- package/dist/esm/components/plans/SubscriptionPlanStyled.js +266 -1
- package/dist/esm/components/plans/SubscriptionPlansCollected.d.ts +18 -0
- package/dist/esm/components/plans/SubscriptionPlansCollected.js +3 -3
- package/dist/esm/components/postPicker/postPicker.d.ts +51 -0
- package/dist/esm/components/postPicker/postPicker.js +1 -1
- package/dist/esm/components/product-picker/ProductPicker.styled.js +71 -1
- package/dist/esm/components/product-picker/ProductPickerModal.d.ts +7 -0
- package/dist/esm/components/product-picker/ProductPickerModal.js +1 -1
- package/dist/esm/components/product-picker/type.d.ts +70 -0
- package/dist/esm/components/product-picker-v2/ProductPickerShimmer.js +1 -1
- package/dist/esm/components/product-picker-v2/ProductPickerTag.js +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/emptyState.js +1 -1
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +114 -0
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/product.js +1 -1
- package/dist/esm/components/product-picker-v2/productInfoOverlay.js +3 -3
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/reducers.js +1 -1
- package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/type.d.ts +22 -0
- package/dist/esm/components/product-picker-v2/utility.js +1 -1
- package/dist/esm/components/product-picker-v2/variant.js +1 -1
- package/dist/esm/components/product-picker-v2/variantComponents.js +1 -1
- package/dist/esm/components/progress-bar/CircularProgressBar.js +1 -1
- package/dist/esm/components/progress-bar/ProgressBarComponent.d.ts +21 -0
- package/dist/esm/components/progress-bar/ProgressBarComponent.js +6 -1
- package/dist/esm/components/progress-bar-v2/ProgressBarV2.d.ts +27 -0
- package/dist/esm/components/progress-bar-v2/ProgressBarV2.js +39 -1
- package/dist/esm/components/radioButton/RadioButton.d.ts +21 -0
- package/dist/esm/components/radioButton/RadioButton.js +1 -1
- package/dist/esm/components/radioList/RadioList.d.ts +18 -0
- package/dist/esm/components/radioList/RadioList.js +1 -1
- package/dist/esm/components/radioList/RadioList.styled.js +10 -1
- package/dist/esm/components/resizeImage/index.d.ts +12 -0
- package/dist/esm/components/resizeImage/index.js +1 -1
- package/dist/esm/components/searchBar/searchBar.d.ts +24 -0
- package/dist/esm/components/searchBar/searchBar.js +1 -1
- package/dist/esm/components/shimmer/ShimmerComponent/BikShimmer.d.ts +18 -0
- package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.js +35 -2
- package/dist/esm/components/shimmer-image/ShimmerImage.d.ts +17 -0
- package/dist/esm/components/shimmer-image/ShimmerImage.js +1 -1
- package/dist/esm/components/side-modal/SideModal.d.ts +25 -0
- package/dist/esm/components/side-modal/SideModal.js +1 -1
- package/dist/esm/components/side-modal/SideModal.style.js +9 -9
- package/dist/esm/components/slider/slider.d.ts +14 -0
- package/dist/esm/components/slider/slider.js +1 -1
- package/dist/esm/components/spinner/Spinner.d.ts +16 -0
- package/dist/esm/components/spinner/Spinner.js +6 -6
- package/dist/esm/components/spinner/model.d.ts +14 -0
- package/dist/esm/components/star-rating/Star.js +1 -1
- package/dist/esm/components/star-rating/StarRating.d.ts +14 -0
- package/dist/esm/components/star-rating/StarRating.js +7 -1
- package/dist/esm/components/states/ShopifyScopeWrapper.d.ts +17 -0
- package/dist/esm/components/states/ShopifyScopeWrapper.js +1 -1
- package/dist/esm/components/states/StateComponent.d.ts +45 -0
- package/dist/esm/components/states/StateComponent.js +1 -1
- package/dist/esm/components/states-modal/DeleteConfirmationModal.d.ts +14 -0
- package/dist/esm/components/states-modal/StateModalComponent.d.ts +30 -0
- package/dist/esm/components/stepper/Stepper.d.ts +29 -0
- package/dist/esm/components/stepper/Stepper.js +1 -1
- package/dist/esm/components/switch/Switch.d.ts +24 -0
- package/dist/esm/components/switch/Switch.js +61 -1
- package/dist/esm/components/tabs/Tabs.d.ts +7 -0
- package/dist/esm/components/tabs/Tabs.js +1 -1
- package/dist/esm/components/tabs/Tabs.model.d.ts +52 -0
- package/dist/esm/components/tabs/Tabs.styles.js +45 -1
- package/dist/esm/components/tag/Tag.d.ts +9 -0
- package/dist/esm/components/tag/Tag.js +1 -1
- package/dist/esm/components/tag/Tag.styled.js +30 -1
- package/dist/esm/components/tag/model.d.ts +72 -0
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +74 -0
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/esm/components/template-context-mapper/custom-hooks/useAdditionalVariables.js +1 -1
- package/dist/esm/components/template-context-mapper/helpers/WebpushTemplateHelper.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/Body.js +8 -8
- package/dist/esm/components/template-context-mapper/modalElements/DesktopPreview.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/DiscountCodeComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaModal.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditWebpushTemplate.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.d.ts +13 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateV2.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/Footer.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/Header.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +4 -4
- package/dist/esm/components/template-context-mapper/modalElements/QueryParamsComponent.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.d.ts +16 -0
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/TemplateAnalyticsSkeleton.d.ts +7 -0
- package/dist/esm/components/template-context-mapper/modalElements/TemplateSelectModalContent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.js +5 -5
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableEditorHeader.js +3 -3
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/useEditWhtasappTemplateMedia.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/convertPlaceholdersToBikDropdown.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.d.ts +36 -0
- package/dist/esm/components/template-context-mapper/utils/getDataFromTemplateComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/highlightFor.js +1 -1
- package/dist/esm/components/template-context-mapper/utils/validateIsUrl.d.ts +4 -0
- package/dist/esm/components/template-preview/EmailTemplateThumbnailPreview.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSButtons.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSChatPreview.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSMediaCard.js +1 -1
- package/dist/esm/components/template-preview/RCS/RCSPreview.styled.js +4 -4
- package/dist/esm/components/template-preview/RCS/RCSTemplateLikePreview.js +4 -4
- package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.d.ts +33 -0
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatBtn.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/ChatUI.js +2 -2
- package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.js +4 -4
- package/dist/esm/components/template-preview/WhatsApp/MediaCard.js +1 -1
- package/dist/esm/components/template-preview/WhatsApp/RenderTemplateWithVariable.js +2 -2
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreview.d.ts +6 -0
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreview.js +5 -5
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.d.ts +6 -0
- package/dist/esm/components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js +5 -5
- package/dist/esm/components/template-preview/WhatsAppTemplatePreview.js +1 -1
- package/dist/esm/components/template-preview/constants/regexPatterns.d.ts +13 -0
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.d.ts +5 -0
- package/dist/esm/components/template-preview/helpers/SmsTemplateHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/TemplateCreatorHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/VariableEditorHelper.d.ts +10 -0
- package/dist/esm/components/template-preview/helpers/VariableEditorHelper.js +1 -1
- package/dist/esm/components/template-preview/helpers/WhatsAppFormatToHTML.d.ts +10 -0
- package/dist/esm/components/template-preview/helpers/templateMiscHelper.js +1 -1
- package/dist/esm/components/template-preview/models/Channels.d.ts +12 -0
- package/dist/esm/components/template-preview/models/EmailTemplate.d.ts +42 -0
- package/dist/esm/components/template-preview/models/RCSTemplate.d.ts +40 -0
- package/dist/esm/components/template-preview/models/SmsTemplate.d.ts +39 -0
- package/dist/esm/components/template-preview/models/TemplateMeta.d.ts +95 -0
- package/dist/esm/components/template-preview/models/WebpushTemplate.d.ts +64 -0
- package/dist/esm/components/template-preview/models/WhatsAppTemplate.d.ts +337 -0
- package/dist/esm/components/template-preview/models/WhatsappCarouselTemplate.d.ts +89 -0
- package/dist/esm/components/template-preview/models/types.d.ts +13 -0
- package/dist/esm/components/template-preview/utils/TemplateHelperUtils.js +1 -1
- package/dist/esm/components/template-preview/webpush/WebpushPreview.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.d.ts +21 -0
- package/dist/esm/components/testimonial-card/TestimonialCard.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.style.js +53 -1
- package/dist/esm/components/thumbnail/Thumbnail.d.ts +17 -0
- package/dist/esm/components/thumbnail/Thumbnail.js +1 -1
- package/dist/esm/components/toaster/Toaster.d.ts +33 -0
- package/dist/esm/components/toaster/Toaster.js +1 -1
- package/dist/esm/components/toaster/Toaster.styled.js +138 -1
- package/dist/esm/components/tooltips/Tooltip.d.ts +17 -0
- package/dist/esm/components/tooltips/Tooltip.js +1 -1
- package/dist/esm/components/tooltips/TooltipInternal.d.ts +11 -0
- package/dist/esm/components/tooltips/TooltipInternal.js +7 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.d.ts +16 -0
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.js +1 -1
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.d.ts +22 -0
- package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.js +1 -1
- package/dist/esm/components/variable-picker-v3/Content.js +1 -1
- package/dist/esm/components/variable-picker-v3/DefaultVariableContent.js +1 -1
- package/dist/esm/components/variable-picker-v3/SubHeaderItems.js +1 -1
- package/dist/esm/components/variable-picker-v3/VariablePicker.d.ts +7 -0
- package/dist/esm/components/variable-picker-v3/VariablePicker.js +1 -1
- package/dist/esm/components/variable-picker-v3/model.d.ts +65 -0
- package/dist/esm/components/variable-picker-v3/recommendVaribles.js +1 -1
- package/dist/esm/components/variable-picker-v3/searchVariables.js +1 -1
- package/dist/esm/components/zeroState/ZeroState.js +5 -5
- package/dist/esm/constants/Theme.d.ts +624 -0
- package/dist/esm/constants/zindex.d.ts +9 -0
- package/dist/esm/helpers/BaseWhatsappContentLang.helper.d.ts +43 -0
- package/dist/esm/hooks/useCurreny.js +1 -1
- package/dist/esm/hooks/useOutside.js +1 -1
- package/dist/esm/index.d.ts +175 -0
- package/dist/esm/types/apiExecutor.d.ts +13 -0
- package/dist/esm/utils/DateUtils.js +1 -1
- package/dist/esm/utils/StringUtils.d.ts +16 -0
- package/dist/esm/utils/StringUtils.js +1 -1
- package/dist/esm/utils/bytesToMB.js +1 -1
- package/dist/esm/utils/resizeImage.d.ts +3 -0
- package/dist/esm/utils/unCamelCase.js +1 -1
- package/dist/esm/utils/validator.d.ts +8 -0
- package/package.json +8 -7
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface FeatureModalProps {
|
|
2
|
+
zIndex?: number;
|
|
3
|
+
disableCross?: boolean;
|
|
4
|
+
onClickingCross: () => void;
|
|
5
|
+
otherContent?: JSX.Element;
|
|
6
|
+
onUpgrade?: () => void;
|
|
7
|
+
primaryButtonText?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
subTitle?: string;
|
|
10
|
+
showBookADemo?: boolean;
|
|
11
|
+
demoLink?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const FeatureModal: React.FC<FeatureModalProps>;
|
|
14
|
+
|
|
15
|
+
export { FeatureModal };
|
|
16
|
+
export type { FeatureModalProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface FeatureModalV2Props {
|
|
2
|
+
zIndex?: number;
|
|
3
|
+
otherContent?: JSX.Element;
|
|
4
|
+
onUpgrade?: () => void;
|
|
5
|
+
primaryButtonText?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
subTitle?: string;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
featureImage?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const FeatureModalV2: React.FC<FeatureModalV2Props>;
|
|
13
|
+
|
|
14
|
+
export { FeatureModalV2 };
|
|
15
|
+
export type { FeatureModalV2Props };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface ShowShopifyRestrictedModalProps {
|
|
2
|
+
containerType: 'demo_store' | 'connect_shopify';
|
|
3
|
+
handleButtonClick: (type: 'shopify' | 'demo' | 'close') => void;
|
|
4
|
+
connectShopifyDescription?: string;
|
|
5
|
+
demoDescription?: string;
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
triggerPosition?: {
|
|
8
|
+
top: number;
|
|
9
|
+
left: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const ShowShopifyRestrictedModal: React.FC<ShowShopifyRestrictedModalProps>;
|
|
13
|
+
|
|
14
|
+
export { ShowShopifyRestrictedModal };
|
|
15
|
+
export type { ShowShopifyRestrictedModalProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import t from"react-dom";import{COLORS as
|
|
1
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import t from"react-dom";import{COLORS as i}from"../../constants/Theme.js";import n from"../../assets/icons/cross.svg.js";import{Button as r}from"../button/Button.js";import{TitleMedium as a,BodyPrimary as s}from"../TypographyStyle.js";import{FeatureModalContainer as c,RelativeModalContainer as l}from"./CommonStyles.js";const d=d=>{const{zIndex:m,containerType:h,handleButtonClick:p,triggerPosition:u,connectShopifyDescription:y,demoDescription:g}=d,b=e=>{p(e)},f=u&&window.innerHeight-u.top<100,v=u?{position:"fixed",top:f?"auto":u.top,bottom:f?"0":"auto",left:u.left,width:"unset",background:"none"}:{alignItems:"center",height:950,background:"linear-gradient(0deg, #FFF 0%, rgba(255, 255, 255, 0.00) 129.71%)"};return t.createPortal(e(c,{zIndex:m,resetHeight:!0,style:v,relativePostion:!!u,children:o(l,{children:[e("div",{className:"cross-container",onClick:()=>b("close"),"aria-hidden":"true",children:e(n,{height:24,width:24,color:"#000000"})}),o("div","demo_store"==h?{className:"demo-container",children:[e(a,{color:i.background.negative.vibrant,children:"Demo Store Limitations"}),e(s,{children:g??"Apologies, but you are unable to save or take any actions as you are currently in the demo store."})]}:{className:"content-layout",children:[e("div",{className:"left-content",children:e("img",{src:"https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2F6300e18e-16ef-4f65-9861-26476d2a3d9a?alt=media&token=0da9e429-4c12-4a06-bba8-9ac7c3fdd2c4",alt:"left-panel"})}),o("div",{className:"right-content",children:[e(a,{children:"Connect Shopify "}),e(s,{style:{maxWidth:432},children:y??"Connect Shopify to publish your bot on your Shopify store. Or, explore our demo store to see it in action."}),o("div",{className:"cta-button-container",children:[e(r,{buttonText:"Connect shopify",buttonType:"primary",size:"small",onClick:()=>b("shopify")}),e(r,{buttonText:"View demo store",buttonType:"secondary",size:"small",onClick:()=>b("demo")})]})]})]})]})}),document.body)};export{d as ShowShopifyRestrictedModal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{TitleRegular as o,BodySecondary as t}from"../TypographyStyle.js";import{SidebarPopupContainer as i}from"./SidebarStyles.js";const r=r=>{const{top:s,menuList:l,zIndex:m,left:d,onMouseLeaveOnMenu:a,onClickingPopupMenu:
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import{TitleRegular as o,BodySecondary as t}from"../TypographyStyle.js";import{SidebarPopupContainer as i}from"./SidebarStyles.js";const r=r=>{const{top:s,menuList:l,zIndex:m,left:d,onMouseLeaveOnMenu:a,onClickingPopupMenu:c}=r;return e(i,{top:s,theme:"white",zIndex:m,left:d??95,postion:"fixed",children:e("div",{id:"_sub-menu",className:"sidebar-right-menu transform-class",onMouseLeave:a,children:l?.map(((i,r)=>n("div",{className:"each-menu",style:{borderBottom:r==l.length-1?"none":void 0},onClick:()=>c(i),children:[e(o,{style:{fontSize:14},children:i.displayName}),e(t,{style:{fontSize:12},children:i.description})]},r)))},"_sub-menu")})};export{r as SidebarPopup};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SidebarTheme } from './SimpleSidebar.js';
|
|
2
|
+
|
|
3
|
+
interface BikSidebarShimmerProps {
|
|
4
|
+
theme: SidebarTheme;
|
|
5
|
+
width?: number;
|
|
6
|
+
zIndex?: number;
|
|
7
|
+
left?: number;
|
|
8
|
+
}
|
|
9
|
+
declare const SidebarSkeleton: React.FC<BikSidebarShimmerProps>;
|
|
10
|
+
|
|
11
|
+
export { SidebarSkeleton };
|
|
12
|
+
export type { BikSidebarShimmerProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface Menu {
|
|
2
|
+
key: string | number;
|
|
3
|
+
displayName: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
path?: string;
|
|
6
|
+
page?: string;
|
|
7
|
+
isNew?: string;
|
|
8
|
+
}
|
|
9
|
+
type SidebarTheme = 'brand' | 'white';
|
|
10
|
+
interface SimpleSidebarProps {
|
|
11
|
+
menuList: Menu[];
|
|
12
|
+
activeMenu: Menu;
|
|
13
|
+
theme: SidebarTheme;
|
|
14
|
+
showAccessUpgradePanel?: boolean;
|
|
15
|
+
header?: string;
|
|
16
|
+
width?: number;
|
|
17
|
+
zIndex?: number;
|
|
18
|
+
left?: number;
|
|
19
|
+
postion?: 'fixed' | 'sticky';
|
|
20
|
+
top?: number;
|
|
21
|
+
router: any;
|
|
22
|
+
onMouseLeaveOnMenu?: () => void;
|
|
23
|
+
onMouseEnterOnMenu?: () => void;
|
|
24
|
+
onMenuClick: (menuSelected: Menu, reDirect?: boolean) => void;
|
|
25
|
+
onUpgrade?: () => void;
|
|
26
|
+
isNewSidebar?: boolean;
|
|
27
|
+
}
|
|
28
|
+
declare const SimpleSidebar: React.FC<SimpleSidebarProps>;
|
|
29
|
+
|
|
30
|
+
export { SimpleSidebar };
|
|
31
|
+
export type { Menu, SidebarTheme, SimpleSidebarProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as a}from"react";import{COLORS as i}from"../../constants/Theme.js";import{Button as s}from"../button/Button.js";import{NavigationHyperlink as n}from"../navigation-hyperlink/NavigationHyperlink.js";import{BodySecondary as r,TitleSmall as o}from"../TypographyStyle.js";import{SimpleSidebarContainer as l}from"./SidebarStyles.js";const c=c=>{const{menuList:d,activeMenu:m,theme:u,showAccessUpgradePanel:p=!1,header:h,width:b,zIndex:y,left:N,postion:g,top:v,router:f,onMouseLeaveOnMenu:k,onMouseEnterOnMenu:w,onMenuClick:x,onUpgrade:M,isNewSidebar:j}=c,[S,T]=a(m),U=(a,i)=>t("div",{className:"sub-child-menu "+(S?.key==a?.key?"sub-child-active-menu":""),onClick:()=>{T(a),x(a,!a.page)},"aria-hidden":"true",children:[e("span",{className:S?.key==a?.key&&"brand"==u?"sub-child-active-text":""}),e(r,{className:"sub-child-text "+(S?.key==a?.key&&"white"==u?"active-bold-weight":""),children:a?.displayName}),a.isNew&&e("div",{className:"sub-child-new-tag",children:"NEW"})]},i);return e(l,{width:b,zIndex:y,left:N,theme:u,postion:g,top:v,isNewSidebar:j,children:t("div",{id:"_sub-menu",className:"sidebar-right-menu transform-class",onMouseLeave:k,onMouseEnter:w,children:[t("div",{children:[!j&&e(r,{className:"sub-child-display-name",children:h}),d?.map(((t,a)=>t.page?e(n,{href:t.page,router:f,children:U(t,a)}):U(t,a)))]}),p&&t("div",{className:"lower-sticky-panel",children:[e(o,{className:"title-text",style:{color:i.surface.standard},children:"Upgrade plan to access this feature."}),e(s,{className:"upgrade-button",buttonText:"Upgrade plan",buttonType:"primary",size:"small",inverse:!0,onClick:()=>M?M():""})]})]},"_sub-menu")})};export{c as SimpleSidebar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import n,{forwardRef as o}from"react";import{Spinner as r}from"../spinner/Spinner.js";import{Button as a,ButtonCustomDashedBorder as s}from"./Button.styled.js";import{getButtonIconColor as l,SpinnerColorMap as c,GetButtonTextComponent as d}from"./themes.js";const m=o((({version:o,id:m,buttonType:h="primary",size:p="small",buttonText:u,disabled:b,IconComponent:v,LeadingIcon:y,TrailingIcon:N,isLoading:g,inverse:x,onClick:f,matchParentWidth:z,subtitle:C,darkMode:I,activated:k,error:T,buttonTextColor:j,buttonFontSize:L,customIconColor:S,buttonColor:B,LeadingIconStyles:E,...W},M)=>{const P=d(p,h,b),w=l(p,h,x,b,g,I),F="chip"===p?16:20,q={height:F,width:F,color:S||w,style:{display:"block"},className:"icon"};return e(a,{"data-test":W["data-test"],version:o,onClick:g?()=>{}:f,ref:M,id:m,disabled:b,size:p,buttonType:h,isLoading:g,inverse:x,matchParentWidth:z,darkMode:I,activated:k,error:T,buttonColor:B,...W,children:t("div",{className:"button-container",children:[h.startsWith("dash")&&e(s,{}),e("div",{className:"overlay-container",children:g&&e(r,{className:"spinner",size:"small",color:c(h,x)})}),v&&e("div",{className:"icon-component",children:n.createElement(v,q)}),y&&e("div",{className:"icon-leading",style:{zIndex:1,...E},children:n.createElement(y,q)}),u?t(P,{className:"text",style:{color:j,fontSize:L},children:[u,e("div",{className:"text-subtitle",children:C})]}):e(i,{}),N&&e("div",{className:"icon-trailing",style:{zIndex:1},children:n.createElement(N,q)})]})})}));m.displayName="Button";export{m as Button};
|
|
@@ -1 +1,61 @@
|
|
|
1
|
-
import t from"@emotion/styled/base";import{jsxs as c,Fragment as d,jsx as b}from"react/jsx-runtime";import{COLORS as n}from"../../constants/Theme.js";import{getBackgroundColor as X,getPadding as l,getBorder as i,getColor as H,getDashedBorderStyling as x,getClickEffect as e,generateDisabledStyling as G,getDisabledTextColor as R,getHoverButtonBackgroundCustom as o,getHoverButtonBackground as u,getHoverButtonTextDecorationStyle as I,generateInverseHoverBackground as g,getLoadingBorder as Z,getLoadingButtonBackgroundCustom as a,getLoadingBackground as m}from"./themes.js";const y=t("button","production"===process.env.NODE_ENV?{target:"exlualr0"}:{target:"exlualr0",label:"Button"})("all:unset;cursor:pointer;display:flex;gap:8.83px;border-radius:",(t=>"text"==t.buttonType?"0":"4px"),";overflow:hidden;",(t=>t.matchParentWidth?"flex-grow: 1;":"")," background-color:",(t=>X(t.buttonType,t.size,t.inverse,t.darkMode,t.buttonColor)),";",(t=>{var c;return t.buttonType.startsWith("dash")?`.button-container {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\t\t\t\tpadding: ${l(t.buttonType,t.size)};\n\t\t\t\t}`:`padding: ${l(t.buttonType,t.size)};\n\t${i(null!=(c=t.version)?c:"1.0",t.buttonType,t.size,t.inverse,t.error)}`})," .icon-component{height:",(t=>"chip"===t.size?"16px":"20px"),";width:",(t=>"chip"===t.size?"16px":"20px"),";}.icon-trailing{height:",(t=>"chip"===t.size?"16px":"20px"),";width:",(t=>"chip"===t.size?"16px":"20px"),";}.text{color:",(t=>H(t.buttonType,t.size,t.inverse,t.darkMode)),";}.icon-leading{height:",(t=>"chip"===t.size?"16px":"20px"),";width:",(t=>"chip"===t.size?"16px":"20px"),";}",(t=>x(t.buttonType,t.size,t.isLoading?n.stroke.brandLightAlt:t.error?n.stroke.negative.vibrant:void 0))," .overlay-container{display:none;}",(t=>!t.disabled&&!t.isLoading&&t.activated&&("dashBold"==t.buttonType||"dashRegular"==t.buttonType)&&`\n\t.button-container {\n\t\tdisplay: flex;\n\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\t.overlay-container {\n\t\t\tdisplay: none !important;\n\t\t}\n\t\t.text {\n\t\t\tcolor: ${n.content.brand} !important;\n\t\t}\n\t\t.icon {\n\t\t\tcolor: ${n.background.brand};\n\t\t}\n\t\t\n\t}\n\t${e(t.buttonType,t.size,t.inverse)}\n\t${x(t.buttonType,t.size,n.content.brand)}\n\t`)," :disabled{cursor:",(t=>"text"===t.buttonType?"auto":"not-allowed"),";",(t=>x(t.buttonType,t.size,n.stroke.primary)),";.overlay-container{display:none!important;}",(t=>G(t.buttonType,t.size,t.inverse))," .text{color:",(t=>R(t.inverse)),"!important;}}",(t=>!t.disabled&&!t.isLoading&&`:active {\n\t\t\t\t.button-container {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\t\t\t\tposition: relative;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\t.overlay-container {\n\t\t\t\t\t\tdisplay: none !important;\n\t\t\t\t\t}\n\t\t\t\t\t${"chip"===t.size&&`.text {\n\t\t\t\t\t\tcolor: ${n.background.inverseLight} !important;\n\t\t\t\t\t}\n\t\t\t\t\t.icon {\n\t\t\t\t\t\tcolor: ${n.background.inverseLight};\n\t\t\t\t\t}\n\t\t\t\t\t`}\n\t\t\t\t}\n\n\n\t\t\t${e(t.buttonType,t.size,t.inverse)}\n\t\t\t${x(t.buttonType,t.size,n.content.brand)}\n\t\t}`)," ",(t=>t.isLoading?`\n\t\t\tcursor: not-allowed;\n\t\t\tpadding: 0;\n\t\t${Z(t.buttonType,t.size,t.inverse)}\n\n\t\t.button-container {\n\t\t\tdisplay: flex;\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\t.text {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\t${t.buttonColor?`background-color: ${a(t.buttonColor,15)};`:""}\n\t\t\tpadding: ${l(t.buttonType,t.size)};\n\t\t\t.overlay-container {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 0;\n\t\t\t\tpadding-top: 1px;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\t${m(t.buttonType,t.size,t.inverse,t.buttonColor)}\n\t\t\t\t.spinner {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: calc(50% - 14px);\n\t\t\t\t\tleft: calc(50% - 7px);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}`:`:not(:active):not(:disabled):hover {\n\t\t\tpadding: 0;\n\t\t\t.button-container {\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\t\t\tpadding: ${l(t.buttonType,t.size)};\n\t\t\t\t{${t.buttonColor?`background-color: ${o(t.buttonColor,15)}`:""}}\n\t\t\t\t.overlay-container {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\t${u(t.buttonType,t.inverse)}\n\t\t\t\t}\n\t\t\t\t${"chip"===t.size&&"text"!==t.buttonType?t.darkMode?`background-color: ${n.stroke.primary};`:`background-color: ${n.surface.hovered};`:""}\n\t\t\t\t${"primary"!==t.buttonType||"chip"===t.size||t.inverse||t.buttonColor?"":`background-color: ${n.background.inverse};`}\n\t\t\t}\n\t\t\t${"text"===t.buttonType?I(t.buttonType,t.disabled):""}\n\t\t\t${t.inverse?g(t.buttonType,t.disabled):""}\n\t\t}`)," .button-container{display:flex;gap:8.33px;",(t=>t.matchParentWidth?"margin: auto;":""),";}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkJ1dHRvbi5zdHlsZWQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCbUMiLCJmaWxlIjoiQnV0dG9uLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcbmltcG9ydCB7IEZyYWdtZW50LCBqc3gsIGpzeHMgfSBmcm9tIFwicmVhY3QvanN4LXJ1bnRpbWVcIjtcbmltcG9ydCBzdHlsZWQgZnJvbSBcIkBlbW90aW9uL3N0eWxlZFwiO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSBcIkBzcmMvY29uc3RhbnRzL1RoZW1lXCI7XG5pbXBvcnQge1xuICBnZW5lcmF0ZURpc2FibGVkU3R5bGluZyxcbiAgZ2VuZXJhdGVJbnZlcnNlSG92ZXJCYWNrZ3JvdW5kLFxuICBnZXRCYWNrZ3JvdW5kQ29sb3IsXG4gIGdldEJvcmRlcixcbiAgZ2V0Q2xpY2tFZmZlY3QsXG4gIGdldENvbG9yLFxuICBnZXREYXNoZWRCb3JkZXJTdHlsaW5nLFxuICBnZXREaXNhYmxlZFRleHRDb2xvcixcbiAgZ2V0SG92ZXJCdXR0b25CYWNrZ3JvdW5kLFxuICBnZXRIb3ZlckJ1dHRvbkJhY2tncm91bmRDdXN0b20sXG4gIGdldEhvdmVyQnV0dG9uVGV4dERlY29yYXRpb25TdHlsZSxcbiAgZ2V0TG9hZGluZ0JhY2tncm91bmQsX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BjaGlsZHJlbjogW1xuICAgIC8qIEBfX1BVUkVfXyAqLyBqc3goXCJkaXZcIiwgeyBjbGFzc05hbWU6IFwibGluZS10b3BcIiB9KSxcbiAgICAvKiBAX19QVVJFX18gKi8ganN4KFwiZGl2XCIsIHsgY2xhc3NOYW1lOiBcImxpbmUtbGVmdFwiIH0pLFxuICAgIC8qIEBfX1BVUkVfXyAqLyBqc3goXCJkaXZcIiwgeyBjbGFzc05hbWU6IFwibGluZS1ib3R0b21cIiB9KSxcbiAgICAvKiBAX19QVVJFX18gKi8ganN4KFwiZGl2XCIsIHsgY2xhc3NOYW1lOiBcImxpbmUtcmlnaHRcIiB9KVxuICBdIH0pO1xufTtcbiJdfQ== */")),B=()=>c(d,{children:[b("div",{className:"line-top"}),b("div",{className:"line-left"}),b("div",{className:"line-bottom"}),b("div",{className:"line-right"})]});export{y as Button,B as ButtonCustomDashedBorder};
|
|
1
|
+
import{jsxs as t,Fragment as n,jsx as e}from"react/jsx-runtime";import o from"@emotion/styled";import{COLORS as i}from"../../constants/Theme.js";import{getBackgroundColor as r,getPadding as a,getBorder as s,getColor as p,getDashedBorderStyling as d,getClickEffect as l,generateDisabledStyling as c,getDisabledTextColor as b,getHoverButtonBackgroundCustom as u,getHoverButtonBackground as h,getHoverButtonTextDecorationStyle as y,generateInverseHoverBackground as $,getLoadingBorder as v,getLoadingButtonBackgroundCustom as g,getLoadingBackground as x}from"./themes.js";const m=o.button`
|
|
2
|
+
all: unset;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 8.83px;
|
|
6
|
+
border-radius: ${t=>"text"==t.buttonType?"0":"4px"};
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
${t=>t.matchParentWidth?"flex-grow: 1;":""}
|
|
9
|
+
background-color: ${t=>r(t.buttonType,t.size,t.inverse,t.darkMode,t.buttonColor)};
|
|
10
|
+
|
|
11
|
+
${t=>t.buttonType.startsWith("dash")?`.button-container {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\t\t\t\tpadding: ${a(t.buttonType,t.size)};\n\t\t\t\t}`:`padding: ${a(t.buttonType,t.size)};\n\t${s(t.version??"1.0",t.buttonType,t.size,t.inverse,t.error)}`}
|
|
12
|
+
|
|
13
|
+
.icon-component {
|
|
14
|
+
height: ${t=>"chip"===t.size?"16px":"20px"};
|
|
15
|
+
width: ${t=>"chip"===t.size?"16px":"20px"};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.icon-trailing {
|
|
19
|
+
height: ${t=>"chip"===t.size?"16px":"20px"};
|
|
20
|
+
width: ${t=>"chip"===t.size?"16px":"20px"};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.text {
|
|
24
|
+
color: ${t=>p(t.buttonType,t.size,t.inverse,t.darkMode)};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.icon-leading {
|
|
28
|
+
height: ${t=>"chip"===t.size?"16px":"20px"};
|
|
29
|
+
width: ${t=>"chip"===t.size?"16px":"20px"};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
${t=>d(t.buttonType,t.size,t.isLoading?i.stroke.brandLightAlt:t.error?i.stroke.negative.vibrant:void 0)}
|
|
33
|
+
|
|
34
|
+
.overlay-container {
|
|
35
|
+
display: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
${t=>!t.disabled&&!t.isLoading&&t.activated&&("dashBold"==t.buttonType||"dashRegular"==t.buttonType)&&`\n\t.button-container {\n\t\tdisplay: flex;\n\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\t.overlay-container {\n\t\t\tdisplay: none !important;\n\t\t}\n\t\t.text {\n\t\t\tcolor: ${i.content.brand} !important;\n\t\t}\n\t\t.icon {\n\t\t\tcolor: ${i.background.brand};\n\t\t}\n\t\t\n\t}\n\t${l(t.buttonType,t.size,t.inverse)}\n\t${d(t.buttonType,t.size,i.content.brand)}\n\t`}
|
|
39
|
+
|
|
40
|
+
:disabled {
|
|
41
|
+
.overlay-container {
|
|
42
|
+
display: none !important;
|
|
43
|
+
}
|
|
44
|
+
cursor: ${t=>"text"===t.buttonType?"auto":"not-allowed"};
|
|
45
|
+
${t=>c(t.buttonType,t.size,t.inverse)}
|
|
46
|
+
.text {
|
|
47
|
+
color: ${t=>b(t.inverse)} !important;
|
|
48
|
+
}
|
|
49
|
+
${t=>d(t.buttonType,t.size,i.stroke.primary)}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
${t=>!t.disabled&&!t.isLoading&&`:active {\n\t\t\t\t.button-container {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\t\t\t\tposition: relative;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\t.overlay-container {\n\t\t\t\t\t\tdisplay: none !important;\n\t\t\t\t\t}\n\t\t\t\t\t${"chip"===t.size&&`.text {\n\t\t\t\t\t\tcolor: ${i.background.inverseLight} !important;\n\t\t\t\t\t}\n\t\t\t\t\t.icon {\n\t\t\t\t\t\tcolor: ${i.background.inverseLight};\n\t\t\t\t\t}\n\t\t\t\t\t`}\n\t\t\t\t}\n\n\n\t\t\t${l(t.buttonType,t.size,t.inverse)}\n\t\t\t${d(t.buttonType,t.size,i.content.brand)}\n\t\t}`}
|
|
53
|
+
|
|
54
|
+
${t=>t.isLoading?`\n\t\t\tcursor: not-allowed;\n\t\t\tpadding: 0;\n\t\t${v(t.buttonType,t.size,t.inverse)}\n\n\t\t.button-container {\n\t\t\tdisplay: flex;\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\t.text {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\t${t.buttonColor?`background-color: ${g(t.buttonColor,15)};`:""}\n\t\t\tpadding: ${a(t.buttonType,t.size)};\n\t\t\t.overlay-container {\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 0;\n\t\t\t\tpadding-top: 1px;\n\t\t\t\ttop: 0;\n\t\t\t\tleft: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\t${x(t.buttonType,t.size,t.inverse,t.buttonColor)}\n\t\t\t\t.spinner {\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\ttop: calc(50% - 14px);\n\t\t\t\t\tleft: calc(50% - 7px);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}`:`:not(:active):not(:disabled):hover {\n\t\t\tpadding: 0;\n\t\t\t.button-container {\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\t${t.matchParentWidth?"justify-content: center;":""}\n\t\t\t\tpadding: ${a(t.buttonType,t.size)};\n\t\t\t\t{${t.buttonColor?`background-color: ${u(t.buttonColor,15)}`:""}}\n\t\t\t\t.overlay-container {\n\t\t\t\t\tdisplay: block;\n\t\t\t\t\tposition: absolute;\n\t\t\t\t\tpadding: 0;\n\t\t\t\t\ttop: 0;\n\t\t\t\t\tleft: 0;\n\t\t\t\t\twidth: 100%;\n\t\t\t\t\theight: 100%;\n\t\t\t\t\t${h(t.buttonType,t.inverse)}\n\t\t\t\t}\n\t\t\t\t${"chip"===t.size&&"text"!==t.buttonType?t.darkMode?`background-color: ${i.stroke.primary};`:`background-color: ${i.surface.hovered};`:""}\n\t\t\t\t${"primary"!==t.buttonType||"chip"===t.size||t.inverse||t.buttonColor?"":`background-color: ${i.background.inverse};`}\n\t\t\t}\n\t\t\t${"text"===t.buttonType?y(t.buttonType,t.disabled):""}\n\t\t\t${t.inverse?$(t.buttonType,t.disabled):""}\n\t\t}`}
|
|
55
|
+
|
|
56
|
+
.button-container {
|
|
57
|
+
display: flex;
|
|
58
|
+
gap: 8.33px;
|
|
59
|
+
${t=>t.matchParentWidth?"margin: auto;":""}
|
|
60
|
+
}
|
|
61
|
+
`,T=()=>t(n,{children:[e("div",{className:"line-top"}),e("div",{className:"line-left"}),e("div",{className:"line-bottom"}),e("div",{className:"line-right"})]});export{m as Button,T as ButtonCustomDashedBorder};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
type Size = 'chip' | 'small' | 'medium' | 'large';
|
|
2
|
+
type Type = 'primary' | 'secondary' | 'tertiary' | 'tertiaryGray' | 'destructive' | 'dashBold' | 'dashRegular' | 'text' | 'ai';
|
|
3
|
+
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
'data-test'?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Font fize of the text
|
|
7
|
+
* @default default 'small'
|
|
8
|
+
*/
|
|
9
|
+
size?: Size;
|
|
10
|
+
/**
|
|
11
|
+
* Text to render inside the button
|
|
12
|
+
* @default ''
|
|
13
|
+
*/
|
|
14
|
+
buttonText?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the button is pressable or not
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Type of the button
|
|
22
|
+
* @default 'primary'
|
|
23
|
+
*/
|
|
24
|
+
buttonType?: Type;
|
|
25
|
+
/**
|
|
26
|
+
* The icon component that needs to be render, if text also exists, this would be Trailing component
|
|
27
|
+
* Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
IconComponent?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
31
|
+
/**
|
|
32
|
+
* The icon component that is to the right of the buttonText
|
|
33
|
+
* Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react
|
|
34
|
+
* @default undefined
|
|
35
|
+
*/
|
|
36
|
+
LeadingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
37
|
+
/**
|
|
38
|
+
* Custom styles to be applied to the LeadingIcon
|
|
39
|
+
* @default undefined
|
|
40
|
+
*/
|
|
41
|
+
LeadingIconStyles?: React.CSSProperties;
|
|
42
|
+
/**
|
|
43
|
+
* The icon component that is the left of the buttonText
|
|
44
|
+
* Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react
|
|
45
|
+
* @default undefined
|
|
46
|
+
*/
|
|
47
|
+
TrailingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
|
|
48
|
+
/**
|
|
49
|
+
* the button container styling that needs to be override the default one
|
|
50
|
+
* @default null
|
|
51
|
+
*/
|
|
52
|
+
style?: React.CSSProperties;
|
|
53
|
+
/**
|
|
54
|
+
* Indicates if button is loading and a loading indicator should be shown.
|
|
55
|
+
* When the button is loading the width of the button should not change.
|
|
56
|
+
*/
|
|
57
|
+
isLoading?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Indicates if the styling of the button should be inverse
|
|
60
|
+
*/
|
|
61
|
+
inverse?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Will take the width of the parent.
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
matchParentWidth?: boolean;
|
|
67
|
+
subtitle?: string;
|
|
68
|
+
version?: '1.0' | '2.0';
|
|
69
|
+
darkMode?: boolean;
|
|
70
|
+
activated?: boolean;
|
|
71
|
+
error?: boolean;
|
|
72
|
+
buttonTextColor?: string;
|
|
73
|
+
customIconColor?: string;
|
|
74
|
+
buttonColor?: string;
|
|
75
|
+
buttonFontSize?: number;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type { ButtonProps, Size, Type };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COLORS as t}from"../../constants/Theme.js";import{ButtonRegularAI as r,ButtonLargeAI as n,BodySecondary as e,BodyCaption as a,ButtonRegular as o,ButtonLarge as i}from"../TypographyStyle.js";const c=(r,n,e,a,o)=>{if("chip"===n)return"text"===r?"transparent":a?t.surface.hovered:t.surface.subdued;switch(r){case"primary":return o||(e?t.background.warning.vibrant:t.background.inverseLight);case"destructive":return t.background.negative.vibrant;default:return"transparent"}},d=(r,n,e,a)=>{if("chip"===n)return"text"===r?e?t.content.inactive:t.content.brand:a?t.content.primary:t.content.secondary;switch(r){case"primary":return e?t.content.primary:t.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.content.secondary;case"destructive":return t.content.primaryInverse;case"ai":return t.content.ai;default:return e?t.content.primaryInverse:t.stroke.brand}},s=r=>r?"rgba(255, 255, 255, 0.5)":t.content.inactive,p=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}},
|
|
1
|
+
import{COLORS as t}from"../../constants/Theme.js";import{ButtonRegularAI as r,ButtonLargeAI as n,BodySecondary as e,BodyCaption as a,ButtonRegular as o,ButtonLarge as i}from"../TypographyStyle.js";const c=(r,n,e,a,o)=>{if("chip"===n)return"text"===r?"transparent":a?t.surface.hovered:t.surface.subdued;switch(r){case"primary":return o||(e?t.background.warning.vibrant:t.background.inverseLight);case"destructive":return t.background.negative.vibrant;default:return"transparent"}},d=(r,n,e,a)=>{if("chip"===n)return"text"===r?e?t.content.inactive:t.content.brand:a?t.content.primary:t.content.secondary;switch(r){case"primary":return e?t.content.primary:t.content.primaryInverse;case"tertiaryGray":case"dashBold":case"dashRegular":return t.content.secondary;case"destructive":return t.content.primaryInverse;case"ai":return t.content.ai;default:return e?t.content.primaryInverse:t.stroke.brand}},s=r=>r?"rgba(255, 255, 255, 0.5)":t.content.inactive,p=(t,r)=>{if("text"===t)return"0px";if("chip"===r)return"4px 8px";if("small"===r)switch(t){case"tertiary":case"tertiaryGray":return"6px 4px";default:return"6px 12px"}else if("medium"===r)switch(t){case"tertiary":case"tertiaryGray":return"10px 4px";default:return"10px 12px"}else if("large"===r)switch(t){case"tertiary":case"tertiaryGray":return"14px 4px";default:return"14px 12px"}},b=(t,c,d)=>d||"ai"!==c?"dashRegular"===c?e:"chip"===t?a:"small"===t?o:i:"small"===t?r:n,u=(r,n,e)=>e?t.stroke.negative.vibrant:n?t.surface.standard:"secondary"==r?t.stroke.brand:t.content.placeholder,g=(r,n,e,a,o)=>"text"==n?"border: none;":"chip"===e?`border: ${"2.0"===r?.5:1}px solid ${t.stroke.primary};`:a?"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${u(n,a,o)};`:"border: none;":"secondary"===n?`border: ${"2.0"===r?.5:1}px solid ${u(n,!1,o)};`:"border: none;",l=t=>"medium"===t?"5px,\n\t\ttransparent 5px,\n\t\ttransparent 10px":"6px,\n\t\ttransparent 6px,\n\t\ttransparent 12px",h=(t,r)=>{const n=parseInt(t.replace("#",""),16),e=Math.round(2.55*r),a=(n>>16)-e,o=(n>>8&255)-e,i=(255&n)-e;return`#${(16777216+(Math.max(a,0)<<16)+(Math.max(o,0)<<8)+Math.max(i,0)).toString(16).slice(1)}`},x=(t,r)=>{const n=parseInt(t.replace("#",""),16),e=Math.round(2.55*r),a=(n>>16)+e,o=(n>>8&255)+e,i=(255&n)+e;return`#${(16777216+(Math.min(a,255)<<16)+(Math.min(o,255)<<8)+Math.min(i,255)).toString(16).slice(1)}`},y=(r,n)=>"ai"===r?`background: ${t.surface.aiLight};`:"text"===r?"background-color:transparent;":n||"primary"===r?"":"background-color: #000000;\n\t\t\t\topacity: 0.03;",m=(r,n)=>n?"":`text-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`,k=(r,n)=>n?"":"primary"===r?`background-color: ${t.stroke.warning.lightAlt};`:"background-color: rgba(255, 255, 255, 0.1)",$=(r,n,e)=>"chip"===n?"background-color: transparent;":"primary"===r||"destructive"===r?e?"background-color: rgba(255,255,255,0.3);":`background-color: ${t.background.inactive};`:"secondary"===r?e?"border: 1px solid rgba(255, 255, 255, 0.5);":`border: 1px solid ${t.stroke.primary};`:"",v=(t,r,n=u(t,!1))=>`\n\t.line-top {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${l(r)}\n\t\t);\n\t}\n\t.line-right {\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${l(r)}\n\t\t);\n\t}\n\t.line-bottom {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tbottom: 0;\n\t\theight: 1px;\n\t\twidth: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto right,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${l(r)}\n\t\t);\n\t}\n\t.line-left {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\ttop: 0;\n\t\twidth: 1px;\n\t\theight: 100%;\n\t\tbackground: repeating-linear-gradient(\n\t\t\tto bottom,\n\t\t\t${n},\n\t\t\t${n}\n\t\t\t\t${l(r)}\n\t\t);\n\t}\n\t`,f=(r,n,e)=>"text"===r?`background-color: ${t.background.brandLight};\n\t\t\ttext-decoration-line: underline;\n\t\t\ttext-decoration-color: ${t.content.brand};`:"chip"===n?`border: 1px solid ${t.stroke.brandLightAlt};\n\t\tbackground-color: ${t.background.brandLight};`:"primary"===r||"destructive"===r?e?`background-color: ${t.background.warning.vibrant} !important;\n\t\t\tbox-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);\n\t\t\t`:"box-shadow: inset 0px 4px 12px rgba(0, 0, 0, 0.35);":"secondary"===r||"tertiary"===r||"tertiaryGray"===r||r.startsWith("dash")?e?`background-color: ${t.background.inverseLight} !important;`:`background-color: ${t.background.brandLight};`:void 0,w=(r,n,e,a)=>"chip"===n?`background-color: ${t.background.base};`:"primary"===r?a?`background-color: ${x(a,50)};`:`background-color: ${e?t.background.warning.vibrant:t.background.brandLight};`:"destructive"===r?`background-color: ${t.background.negative.light};`:"background-color: transparent;",L=(r,n,e)=>"chip"===n?"border: none;":"secondary"===r?e?`border: 1px solid ${t.content.secondary};`:`border: 1px solid ${t.stroke.brandLightAlt};`:"",I=(r,n)=>n?"primary"===r?t.content.primary:t.content.primaryInverse:"destructive"===r?t.content.negative:t.content.brand,M=(r,n,e,a,o,i)=>"chip"===r?a?t.content.inactive:i?t.content.primary:t.content.secondary:o?"transparent":"primary"===n||"destructive"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primary:a?t.content.inactive:t.content.primaryInverse:"secondary"===n||"tertiary"===n?e?a?"rgba(255, 255, 255, 0.5)":t.content.primaryInverse:a?t.content.inactive:t.content.brand:"tertiaryGray"===n||n.startsWith("dash")?a?t.content.inactive:t.content.secondary:void 0;export{b as GetButtonTextComponent,I as SpinnerColorMap,$ as generateDisabledStyling,k as generateInverseHoverBackground,c as getBackgroundColor,g as getBorder,u as getBorderColor,M as getButtonIconColor,f as getClickEffect,d as getColor,v as getDashedBorderStyling,s as getDisabledTextColor,y as getHoverButtonBackground,h as getHoverButtonBackgroundCustom,m as getHoverButtonTextDecorationStyle,l as getLinearGradientValue,w as getLoadingBackground,L as getLoadingBorder,x as getLoadingButtonBackgroundCustom,p as getPadding};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonGroupInterface {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
icon?: React__default.FunctionComponent<React__default.SVGAttributes<SVGElement>>;
|
|
7
|
+
}
|
|
8
|
+
interface ButtonGroupProps {
|
|
9
|
+
id?: string;
|
|
10
|
+
width?: string;
|
|
11
|
+
gap?: string;
|
|
12
|
+
iconWidth?: string;
|
|
13
|
+
iconHeight?: string;
|
|
14
|
+
iconPosition?: 'left' | 'right' | 'top';
|
|
15
|
+
onButtonClick: (buttonId: string) => void;
|
|
16
|
+
activeButtonId?: string;
|
|
17
|
+
buttonGroup: Array<ButtonGroupInterface>;
|
|
18
|
+
size: 'small' | 'medium' | 'large';
|
|
19
|
+
matchParentWidth?: boolean;
|
|
20
|
+
borderRadius?: string;
|
|
21
|
+
backgroundColor?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const ButtonGroup: React__default.FC<ButtonGroupProps>;
|
|
24
|
+
|
|
25
|
+
export { ButtonGroup };
|
|
26
|
+
export type { ButtonGroupInterface, ButtonGroupProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as o}from"react/jsx-runtime";import{useState as i,useEffect as n}from"react";import{BodySecondary as e}from"../TypographyStyle.js";import{COLORS as r}from"../../constants/Theme.js";import{ButtonGroupStyle as c,Button as d}from"./ButtonGroupStyle.js";const s=s=>{const[a,u]=i(void 0);n((()=>{u(s.activeButtonId||void 0)}),[s?.activeButtonId]);return t(c,{className:"button-group",width:s.width||"100%",gap:s.gap,size:s.size,children:s.buttonGroup.map((i=>{const n=i?.icon;return o(d,{borderRadius:s.borderRadius??"4px",matchParentWidth:s.matchParentWidth??!0,className:"button",isActive:a===i.id,onClick:()=>(t=>{u(t.id),s.onButtonClick(t.id)})(i),iconPosition:s.iconPosition,size:s.size,backgroundColor:s.backgroundColor||r.surface.subdued,children:[s?.iconPosition&&n&&t("div",{className:"button__image",children:t(n,{color:a===i.id?r.background.inverseLight:r.content.secondary,width:s?.iconWidth||"18px",height:s?.iconHeight||"18px"})}),t("div",{className:"button__name",children:t(e,{style:{color:a===i.id?r.background.inverseLight:r.content.secondary},children:i.title})})]},i.id)}))})};export{s as ButtonGroup};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type CardSelectionModalProps = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
subTitle?: string;
|
|
7
|
+
infoText?: string;
|
|
8
|
+
cards: SelectionCardData[];
|
|
9
|
+
onCardSelected: (value: string) => void;
|
|
10
|
+
onClose: () => void;
|
|
11
|
+
};
|
|
12
|
+
type SelectionCardData = {
|
|
13
|
+
icon?: React__default.FunctionComponent<React__default.SVGAttributes<SVGElement>>;
|
|
14
|
+
value: string;
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
declare const CardSelectionModal: React__default.FC<CardSelectionModalProps>;
|
|
19
|
+
|
|
20
|
+
export { CardSelectionModal };
|
|
21
|
+
export type { CardSelectionModalProps, SelectionCardData };
|
|
@@ -1 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"@emotion/styled";import{DEFAULT_THEME as o}from"../../constants/Theme.js";const e=r.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
.cards__wrapper {
|
|
6
|
+
padding: 0 24px;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
gap: 16px;
|
|
10
|
+
}
|
|
11
|
+
.info__wrapper {
|
|
12
|
+
padding: 0 24px 24px 24px;
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
}
|
|
17
|
+
`,p=r.div`
|
|
18
|
+
width: 212px;
|
|
19
|
+
padding: 16px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
gap: 8px;
|
|
23
|
+
background-color: ${o.colorsV2.surface.standard};
|
|
24
|
+
border: 1px solid ${o.colorsV2.stroke.primary};
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
background-color: ${o.colorsV2.surface.hovered};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.icon__container {
|
|
33
|
+
width: 48px;
|
|
34
|
+
height: 48px;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
background-color: ${o.colorsV2.background.brandLight};
|
|
40
|
+
}
|
|
41
|
+
`;export{p as StyledCard,e as StyledCardContainer};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
type CardSelectorProps = {
|
|
4
|
+
id: number;
|
|
5
|
+
icon?: React__default.FunctionComponent<React__default.SVGAttributes<SVGElement>>;
|
|
6
|
+
title?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
selected: boolean;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
dataTestId?: string;
|
|
12
|
+
tooltip?: string;
|
|
13
|
+
};
|
|
14
|
+
type CardSelectorInternalProps = CardSelectorProps & {
|
|
15
|
+
onCardClick: (id: number) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const CardSelector: React__default.FC<CardSelectorInternalProps>;
|
|
18
|
+
|
|
19
|
+
export { CardSelector };
|
|
20
|
+
export type { CardSelectorProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as t,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as t,jsxs as i}from"react/jsx-runtime";import{COLORS as l}from"../../constants/Theme.js";import{Spinner as n}from"../spinner/Spinner.js";import{Tooltip as o}from"../tooltips/Tooltip.js";import{TitleSmall as d,BodyCaption as r}from"../TypographyStyle.js";import{Container as s,Loader as c}from"./CardSelector.styled.js";const a=i=>e(t,{children:i.tooltip?e(o,{title:i.tooltip,children:e(s,{style:{alignItems:i.title&&i.subtitle?"flex-start":"center"},selected:i.selected,disabled:i.disabled??!1,loading:i.loading??!1,onClick:()=>{i.disabled||i.loading||i.onCardClick(i.id)},isTooltipPresent:!!i.tooltip,children:e(p,{...i})})}):e(s,{style:{alignItems:i.title&&i.subtitle?"flex-start":"center"},selected:i.selected,disabled:i.disabled??!1,loading:i.loading??!1,onClick:()=>{i.disabled||i.loading||i.onCardClick(i.id)},isTooltipPresent:!!i.tooltip,children:e(p,{...i})})}),p=o=>e(t,{children:o.loading?e(c,{children:e(n,{size:"large"})}):i(t,{children:[o?.icon&&e("div",{style:{width:24,height:24},children:e(o.icon,{width:24,color:o.selected?l.content.brand:o.disabled?l.content.inactive:l.content.placeholder})}),i("div",{"data-test":o?.dataTestId,children:[o.title&&e(d,{style:{color:o.selected?l.content.brand:o.disabled?l.content.inactive:l.content.secondary},children:o.title}),o.subtitle&&e(r,{style:{marginTop:o.title?4:0,color:o.selected?l.content.brand:o.disabled?l.content.inactive:l.content.secondary},children:o.subtitle})]})]})});export{a as CardSelector};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { CardSelectorProps } from './CardSelector.js';
|
|
3
|
+
|
|
4
|
+
type CardSelectorGroupProps = {
|
|
5
|
+
gap?: number;
|
|
6
|
+
align?: 'horizontal' | 'vertical';
|
|
7
|
+
cards: CardSelectorProps[];
|
|
8
|
+
onClick: (id: number) => void;
|
|
9
|
+
'data-test': string;
|
|
10
|
+
};
|
|
11
|
+
declare const CardSelectorGroup: React__default.FC<CardSelectorGroupProps>;
|
|
12
|
+
|
|
13
|
+
export { CardSelectorGroup };
|
|
14
|
+
export type { CardSelectorGroupProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r,Fragment as
|
|
1
|
+
import{jsx as r,Fragment as t}from"react/jsx-runtime";import e from"../../assets/icons/chevronLeft.svg.js";import o from"../../assets/icons/chevronRight.svg.js";import{Carousel as i}from"@trendyol-js/react-carousel";import s from"styled-components";const n=()=>r(l,{className:"left",children:r(e,{width:16,height:16,color:"#fff"})}),a=()=>r(l,{className:"right",children:r(o,{width:16,height:16,color:"#fff"})}),c=e=>r(t,{children:r(i,{leftArrow:r(n,{}),rightArrow:r(a,{}),...e,children:e.children})}),l=s.div`
|
|
2
2
|
cursor: pointer;
|
|
3
3
|
margin: 0 8px;
|
|
4
4
|
width: 50px;
|
|
@@ -19,4 +19,4 @@ import{jsx as r,Fragment as e}from"react/jsx-runtime";import t from"../../assets
|
|
|
19
19
|
transform: translate(0%, -50%);
|
|
20
20
|
right: 0;
|
|
21
21
|
}
|
|
22
|
-
`;export{
|
|
22
|
+
`;export{c as Carousel};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { CHANNEL_TYPE } from '../template-preview/models/Channels.js';
|
|
3
|
+
import { AllTemplateTypes } from '../template-preview/models/types.js';
|
|
4
|
+
|
|
5
|
+
declare const CarouselPreview: React__default.ForwardRefExoticComponent<{
|
|
6
|
+
channel: CHANNEL_TYPE;
|
|
7
|
+
template: AllTemplateTypes;
|
|
8
|
+
showSampleValues?: boolean | undefined;
|
|
9
|
+
isPreview?: boolean | undefined;
|
|
10
|
+
removeBottomBorder?: boolean | undefined;
|
|
11
|
+
borderRadius?: string | undefined;
|
|
12
|
+
showArrows?: boolean | undefined;
|
|
13
|
+
hideBorder?: boolean | undefined;
|
|
14
|
+
} & React__default.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
|
|
16
|
+
export { CarouselPreview };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"react";import
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"react";import t from"react-slick";import{Container as s,CarouselSlickContainer as a}from"./CarouselPreview.style.js";import l from"./CarouselPreviewCard.js";import{useTemplateModalContext as n}from"../template-context-mapper/context/templateModalContext.js";import{determineCardIndex as i,isRCSChannel as d}from"../template-preview/helpers/templateMiscHelper.js";import{RCSCarousalContainer as m}from"../template-preview/RCS/RCSPreview.styled.js";import{CustomCarouselRightArrow as p,CustomCarouselLeftArrow as c}from"./CustomCarouselArrows.js";const u=o.forwardRef((({channel:o,template:t,isPreview:a,removeBottomBorder:p,borderRadius:c,showArrows:u,hideBorder:h,showSampleValues:C})=>{const{sliderRef:v,selectedCarouselIndex:f,cardCount:x,setIsCarouselHovered:I,cardIndex:P}=n(),R=-1==P?i(o):P,S=t?.components?.[R]?.cards,j=S?.length?e(w,{cards:S,cardCount:x??0,selectedCarouselIndex:f??-1,sliderRef:v,isPreview:a,showArrows:u,channel:o,template:t,setIsCarouselHovered:I,showSampleValues:!!C}):null;return d(o)?e(m,{borderRadius:c,children:j}):r(s,{removeBottomBorder:p,borderRadius:c,hideBorder:h,children:[e(l,{channel:o,currentTemplate:t,carouselCardIndex:-1,isPreview:a,width:"77%"}),j]})})),w=({cards:r,cardCount:o,selectedCarouselIndex:s,sliderRef:n,isPreview:i,showArrows:d,channel:m,template:u,setIsCarouselHovered:w,showSampleValues:h})=>e(a,{cardCount:o,selectedCarouselIndex:s,onMouseEnter:()=>w?.(!0),onMouseLeave:()=>w?.(!1),children:e(t,{ref:n,swipeToSlide:!0,draggable:!0,swipe:!0,infinite:!1,focusOnSelect:!i,centerMode:!0,arrows:d,adaptiveHeight:!0,nextArrow:e(p,{isPreview:i??!1}),prevArrow:e(c,{isPreview:i??!1}),children:r?.map(((r,o)=>{const t={components:r.components,mapping:u?.mapping?.cards?.[o],content:u?.content,templateType:u?.templateType};return e(l,{channel:m,currentTemplate:t,carouselCardIndex:o,isPreview:i,width:"100%",showSampleValues:h},o)}))})});export{u as CarouselPreview};
|