@bikdotai/bik-component-library 0.0.159-beta.9 → 0.0.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  2. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  3. package/dist/cjs/components/carousel-secondary/CarouselSecondary.d.ts +5 -0
  4. package/dist/cjs/components/carousel-secondary/CarouselSecondary.js +1 -0
  5. package/dist/cjs/components/carousel-secondary/CarouselSecondary.style.d.ts +29 -0
  6. package/dist/cjs/components/carousel-secondary/CarouselSecondary.style.js +1 -0
  7. package/dist/cjs/components/carousel-secondary/index.d.ts +1 -0
  8. package/dist/cjs/components/colourInput/ColourInput.js +1 -1
  9. package/dist/cjs/components/country-code-picker/CountryCodePicker.d.ts +3 -0
  10. package/dist/cjs/components/country-code-picker/CountryCodePicker.js +1 -1
  11. package/dist/cjs/components/curtain/Curtain.js +1 -1
  12. package/dist/cjs/components/discount-modal/DiscountModal.d.ts +1 -0
  13. package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
  14. package/dist/cjs/components/discount-modal/DiscountModal.styled.d.ts +0 -4
  15. package/dist/cjs/components/discount-modal/DiscountModal.styled.js +1 -1
  16. package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.d.ts +1 -0
  17. package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  18. package/dist/cjs/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
  19. package/dist/cjs/components/discount-modal/type.d.ts +1 -0
  20. package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
  21. package/dist/cjs/components/dropdown/type.d.ts +2 -1
  22. package/dist/cjs/components/modals/styledModal.js +1 -1
  23. package/dist/cjs/components/plans/SubscriptionPlanSelector.d.ts +1 -0
  24. package/dist/cjs/components/plans/SubscriptionPlanSelector.js +1 -1
  25. package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +0 -1
  26. package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
  27. package/dist/cjs/components/product-picker-v2/modal.d.ts +1 -4
  28. package/dist/cjs/components/product-picker-v2/modal.js +1 -1
  29. package/dist/cjs/components/product-picker-v2/productScreen.d.ts +2 -3
  30. package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
  31. package/dist/cjs/components/product-picker-v2/reducers.js +1 -1
  32. package/dist/cjs/components/product-picker-v2/selectedScreen.d.ts +1 -0
  33. package/dist/cjs/components/product-picker-v2/selectedScreen.js +1 -1
  34. package/dist/cjs/components/states/StateComponent.d.ts +1 -1
  35. package/dist/cjs/components/states/StateComponent.js +1 -1
  36. package/dist/cjs/components/states-modal/StateModalComponent.d.ts +1 -1
  37. package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
  38. package/dist/cjs/index.d.ts +1 -0
  39. package/dist/cjs/index.js +1 -1
  40. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  41. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
  42. package/dist/esm/components/carousel-secondary/CarouselSecondary.d.ts +5 -0
  43. package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -0
  44. package/dist/esm/components/carousel-secondary/CarouselSecondary.style.d.ts +29 -0
  45. package/dist/esm/components/carousel-secondary/CarouselSecondary.style.js +1 -0
  46. package/dist/esm/components/carousel-secondary/index.d.ts +1 -0
  47. package/dist/esm/components/colourInput/ColourInput.js +1 -1
  48. package/dist/esm/components/country-code-picker/CountryCodePicker.d.ts +3 -0
  49. package/dist/esm/components/country-code-picker/CountryCodePicker.js +1 -1
  50. package/dist/esm/components/curtain/Curtain.js +1 -1
  51. package/dist/esm/components/discount-modal/DiscountModal.d.ts +1 -0
  52. package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
  53. package/dist/esm/components/discount-modal/DiscountModal.styled.d.ts +0 -4
  54. package/dist/esm/components/discount-modal/DiscountModal.styled.js +1 -1
  55. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.d.ts +1 -0
  56. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  57. package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
  58. package/dist/esm/components/discount-modal/type.d.ts +1 -0
  59. package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
  60. package/dist/esm/components/dropdown/type.d.ts +2 -1
  61. package/dist/esm/components/modals/styledModal.js +1 -1
  62. package/dist/esm/components/plans/SubscriptionPlanSelector.d.ts +1 -0
  63. package/dist/esm/components/plans/SubscriptionPlanSelector.js +1 -1
  64. package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +0 -1
  65. package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
  66. package/dist/esm/components/product-picker-v2/modal.d.ts +1 -4
  67. package/dist/esm/components/product-picker-v2/modal.js +1 -1
  68. package/dist/esm/components/product-picker-v2/productScreen.d.ts +2 -3
  69. package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
  70. package/dist/esm/components/product-picker-v2/reducers.js +1 -1
  71. package/dist/esm/components/product-picker-v2/selectedScreen.d.ts +1 -0
  72. package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
  73. package/dist/esm/components/states/StateComponent.d.ts +1 -1
  74. package/dist/esm/components/states/StateComponent.js +1 -1
  75. package/dist/esm/components/states-modal/StateModalComponent.d.ts +1 -1
  76. package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
  77. package/dist/esm/index.d.ts +1 -0
  78. package/dist/esm/index.js +1 -1
  79. package/package.json +1 -1
  80. package/dist/cjs/assets/icons/box_round.svg.js +0 -1
  81. package/dist/cjs/components/product-picker-v2/emptyState.d.ts +0 -7
  82. package/dist/cjs/components/product-picker-v2/emptyState.js +0 -7
  83. package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +0 -15
  84. package/dist/cjs/components/product-picker-v2/searchScreen.js +0 -1
  85. package/dist/cjs/components/product-picker-v2/utility.d.ts +0 -1
  86. package/dist/cjs/components/product-picker-v2/utility.js +0 -1
  87. package/dist/esm/assets/icons/box_round.svg.js +0 -1
  88. package/dist/esm/components/product-picker-v2/emptyState.d.ts +0 -7
  89. package/dist/esm/components/product-picker-v2/emptyState.js +0 -7
  90. package/dist/esm/components/product-picker-v2/searchScreen.d.ts +0 -15
  91. package/dist/esm/components/product-picker-v2/searchScreen.js +0 -1
  92. package/dist/esm/components/product-picker-v2/utility.d.ts +0 -1
  93. package/dist/esm/components/product-picker-v2/utility.js +0 -1
@@ -1,7 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/box_round.svg.js"),r=require("styled-components"),s=require("../../constants/Theme.js"),n=require("../TypographyStyle.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const o=i(r).default.div`
2
- height: 400px;
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- justify-content: center;
7
- `;exports.EmptyState=r=>{let{title:i,subtitle:l}=r;return e.jsxs(o,{children:[e.jsx(t.default,{width:48,height:48}),e.jsx(n.TitleRegular,Object.assign({style:{marginTop:8}},{children:i})),e.jsx(n.BodySecondary,Object.assign({style:{color:s.COLORS.content.secondary,marginTop:4}},{children:l}))]})};
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import { Collection, SelectedItems } from '.';
3
- import { SelectedCollectionsActions } from './reducers';
4
- interface SearchScreenInterface {
5
- selectedCollections: SelectedItems;
6
- searchedCollections: SelectedItems;
7
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
8
- setScreen: React.Dispatch<React.SetStateAction<string>>;
9
- collections: {
10
- [key: string]: Collection;
11
- };
12
- onBackPress: () => void;
13
- }
14
- export declare const SearchScreen: (props: SearchScreenInterface) => JSX.Element;
15
- export {};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),o=require("../icon-button/IconButton.js"),l=require("../TypographyStyle.js"),r=require("./emptyState.js"),i=require("./productScreen.js"),s=require("./style.js"),d=require("./utility.js");exports.SearchScreen=c=>{const{selectedCollections:n,searchedCollections:u,selectedCollectionsDispatch:a,setScreen:v,collections:p,onBackPress:j}=c,h=(e,t)=>{var o,l,r,i,s,d,c,u,a;let v=0,j=0;return!!((null===(l=null===(o=null==n?void 0:n[e])||void 0===o?void 0:o.products)||void 0===l?void 0:l[t])&&(null===(d=Object.keys((null===(s=null===(i=null===(r=null==p?void 0:p[e])||void 0===r?void 0:r.products)||void 0===i?void 0:i[t])||void 0===s?void 0:s.variants)||[]))||void 0===d||d.forEach((()=>j++)),Object.keys((null===(a=null===(u=null===(c=null==n?void 0:n[e])||void 0===c?void 0:c.products)||void 0===u?void 0:u[t])||void 0===a?void 0:a.variants)||[]).forEach((()=>v++)),v>0&&j!==v))};return e.jsxs("div",{children:[e.jsxs(s.SelectedScreenHeader,{children:[e.jsx(o.IconButton,{Icon:t.default,onClick:()=>{v("collections"),j()}}),e.jsx(l.BodyCaption,{children:"Searched Products"})]}),e.jsx("div",{children:Object.keys(u).length?e.jsx(e.Fragment,{children:Object.keys(u).map((t=>{var o;return Object.keys((null===(o=null==u?void 0:u[t])||void 0===o?void 0:o.products)||[]).map((o=>{let l=!1;return(null==u?void 0:u.isCustom)&&(l=!0),e.jsx(i.ProductGroup,{collectionId:t,upliftAdditions:(e,o)=>((e,t,o)=>{const l=d.liftTheStateUp(o,u[e]);a({type:t,data:l})})(t,e,o),productId:o,data:u[t].products[o],isProductPartiallyChecked:h(t,o),selectedData:n,selectedCollectionsDispatch:a,viewOnly:l},o)}))}))}):e.jsx(r.EmptyState,{title:"No search results found",subtitle:"We couldn’t find the product you were looking for."})})]})};
@@ -1 +0,0 @@
1
- export declare const liftTheStateUp: (payload: any, data: any) => any;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("lodash");exports.liftTheStateUp=(t,a)=>{const s=e.cloneDeep(a);if(delete s.products,(t=Object.assign(Object.assign({},t),{catalogOnlyData:s})).productId&&a.products){const c=e.cloneDeep(a.products[t.productId]);(null==c?void 0:c.variants)&&delete c.variants,t=Object.assign(Object.assign({},t),{catalogOnlyData:s,productOnlyData:c})}return t};
@@ -1 +0,0 @@
1
- import*as e from"react";var l,t;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var l=1;l<arguments.length;l++){var t=arguments[l];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},a.apply(this,arguments)}var r=r=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 49 48"},r),l||(l=e.createElement("rect",{width:48,height:48,x:.5,fill:"#F0F0F0",rx:24})),t||(t=e.createElement("path",{fill:"#9E9E9E",fillRule:"evenodd",d:"M23.002 13.403a3 3 0 0 1 2.996 0H26l7 4a3 3 0 0 1 .937.85 1 1 0 0 1 .249.413 3 3 0 0 1 .314 1.333V28a3 3 0 0 1-1.5 2.595l-.004.002L26 34.596l-.002.001a3.001 3.001 0 0 1-1.023.363.996.996 0 0 1-.95 0 3 3 0 0 1-1.023-.363L23 34.596l-6.996-3.998-.004-.002A3 3 0 0 1 14.5 28v-8.002a3 3 0 0 1 .314-1.333 1.006 1.006 0 0 1 .249-.414 3 3 0 0 1 .937-.848l.004-.002 6.998-4ZM25.5 32.578l6.5-3.714.002-.001a1.001 1.001 0 0 0 .498-.864v-7.462l-7 4.05v7.991Zm-2-7.991v7.991L17 28.864l-.002-.001a1.001 1.001 0 0 1-.498-.864v-7.462l7 4.05Zm1.504-9.449 6.457 3.69-6.961 4.027-6.961-4.027 6.457-3.69.004-.002a1 1 0 0 1 1 0l.004.002Z",clipRule:"evenodd"})));export{r as default};
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- interface EmptyStateProps {
3
- title: string;
4
- subtitle: string;
5
- }
6
- export declare const EmptyState: ({ title, subtitle }: EmptyStateProps) => JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/box_round.svg.js";import r from"styled-components";import{COLORS as i}from"../../constants/Theme.js";import{TitleRegular as n,BodySecondary as s}from"../TypographyStyle.js";const c=r=>{let{title:c,subtitle:l}=r;return t(m,{children:[e(o,{width:48,height:48}),e(n,Object.assign({style:{marginTop:8}},{children:c})),e(s,Object.assign({style:{color:i.content.secondary,marginTop:4}},{children:l}))]})},m=r.div`
2
- height: 400px;
3
- display: flex;
4
- flex-direction: column;
5
- align-items: center;
6
- justify-content: center;
7
- `;export{c as EmptyState};
@@ -1,15 +0,0 @@
1
- /// <reference types="react" />
2
- import { Collection, SelectedItems } from '.';
3
- import { SelectedCollectionsActions } from './reducers';
4
- interface SearchScreenInterface {
5
- selectedCollections: SelectedItems;
6
- searchedCollections: SelectedItems;
7
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
8
- setScreen: React.Dispatch<React.SetStateAction<string>>;
9
- collections: {
10
- [key: string]: Collection;
11
- };
12
- onBackPress: () => void;
13
- }
14
- export declare const SearchScreen: (props: SearchScreenInterface) => JSX.Element;
15
- export {};
@@ -1 +0,0 @@
1
- import{jsxs as o,jsx as t,Fragment as e}from"react/jsx-runtime";import l from"../../assets/icons/arrow_left.svg.js";import{IconButton as i}from"../icon-button/IconButton.js";import{BodyCaption as r}from"../TypographyStyle.js";import{EmptyState as d}from"./emptyState.js";import{ProductGroup as c}from"./productScreen.js";import{SelectedScreenHeader as n}from"./style.js";import{liftTheStateUp as s}from"./utility.js";const u=u=>{const{selectedCollections:v,searchedCollections:a,selectedCollectionsDispatch:p,setScreen:m,collections:h,onBackPress:f}=u,y=(o,t)=>{var e,l,i,r,d,c,n,s,u;let a=0,p=0;return!!((null===(l=null===(e=null==v?void 0:v[o])||void 0===e?void 0:e.products)||void 0===l?void 0:l[t])&&(null===(c=Object.keys((null===(d=null===(r=null===(i=null==h?void 0:h[o])||void 0===i?void 0:i.products)||void 0===r?void 0:r[t])||void 0===d?void 0:d.variants)||[]))||void 0===c||c.forEach((()=>p++)),Object.keys((null===(u=null===(s=null===(n=null==v?void 0:v[o])||void 0===n?void 0:n.products)||void 0===s?void 0:s[t])||void 0===u?void 0:u.variants)||[]).forEach((()=>a++)),a>0&&p!==a))};return o("div",{children:[o(n,{children:[t(i,{Icon:l,onClick:()=>{m("collections"),f()}}),t(r,{children:"Searched Products"})]}),t("div",{children:Object.keys(a).length?t(e,{children:Object.keys(a).map((o=>{var e;return Object.keys((null===(e=null==a?void 0:a[o])||void 0===e?void 0:e.products)||[]).map((e=>{let l=!1;return(null==a?void 0:a.isCustom)&&(l=!0),t(c,{collectionId:o,upliftAdditions:(t,e)=>((o,t,e)=>{const l=s(e,a[o]);p({type:t,data:l})})(o,t,e),productId:e,data:a[o].products[e],isProductPartiallyChecked:y(o,e),selectedData:v,selectedCollectionsDispatch:p,viewOnly:l},e)}))}))}):t(d,{title:"No search results found",subtitle:"We couldn’t find the product you were looking for."})})]})};export{u as SearchScreen};
@@ -1 +0,0 @@
1
- export declare const liftTheStateUp: (payload: any, data: any) => any;
@@ -1 +0,0 @@
1
- import{cloneDeep as t}from"lodash";const a=(a,s)=>{const o=t(s);if(delete o.products,(a=Object.assign(Object.assign({},a),{catalogOnlyData:o})).productId&&s.products){const c=t(s.products[a.productId]);(null==c?void 0:c.variants)&&delete c.variants,a=Object.assign(Object.assign({},a),{catalogOnlyData:o,productOnlyData:c})}return a};export{a as liftTheStateUp};