@bikdotai/bik-component-library 0.9.0-bik-layout-beta → 0.11.0-bik-layout-beta

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 (33) hide show
  1. package/dist/cjs/assets/icons/Bik_logo.svg.js +1 -0
  2. package/dist/cjs/components/bik-layout/BikLayout.d.ts +3 -0
  3. package/dist/cjs/components/bik-layout/BikLayout.js +1 -1
  4. package/dist/cjs/components/bik-layout/BikSidebar.d.ts +18 -3
  5. package/dist/cjs/components/bik-layout/BikSidebar.js +1 -0
  6. package/dist/cjs/components/bik-layout/CommonStyles.d.ts +12 -0
  7. package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
  8. package/dist/cjs/components/bik-layout/FeatureModal.d.ts +7 -0
  9. package/dist/cjs/components/bik-layout/FeatureModal.js +1 -0
  10. package/dist/cjs/components/bik-layout/MockMenus.d.ts +44 -0
  11. package/dist/cjs/components/bik-layout/SidebarStyles.d.ts +19 -0
  12. package/dist/cjs/components/bik-layout/SidebarStyles.js +1 -0
  13. package/dist/cjs/components/bik-layout/SimpleSidebar.d.ts +18 -0
  14. package/dist/cjs/components/bik-layout/SimpleSidebar.js +1 -0
  15. package/dist/cjs/components/bik-layout/index.d.ts +2 -0
  16. package/dist/cjs/index.js +1 -1
  17. package/dist/esm/assets/icons/Bik_logo.svg.js +1 -0
  18. package/dist/esm/components/bik-layout/BikLayout.d.ts +3 -0
  19. package/dist/esm/components/bik-layout/BikLayout.js +1 -1
  20. package/dist/esm/components/bik-layout/BikSidebar.d.ts +18 -3
  21. package/dist/esm/components/bik-layout/BikSidebar.js +1 -0
  22. package/dist/esm/components/bik-layout/CommonStyles.d.ts +12 -0
  23. package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
  24. package/dist/esm/components/bik-layout/FeatureModal.d.ts +7 -0
  25. package/dist/esm/components/bik-layout/FeatureModal.js +1 -0
  26. package/dist/esm/components/bik-layout/MockMenus.d.ts +44 -0
  27. package/dist/esm/components/bik-layout/SidebarStyles.d.ts +19 -0
  28. package/dist/esm/components/bik-layout/SidebarStyles.js +1 -0
  29. package/dist/esm/components/bik-layout/SimpleSidebar.d.ts +18 -0
  30. package/dist/esm/components/bik-layout/SimpleSidebar.js +1 -0
  31. package/dist/esm/components/bik-layout/index.d.ts +2 -0
  32. package/dist/esm/index.js +1 -1
  33. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(e[c]=r[c])}return e},c.apply(this,arguments)}var a=e=>r.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 58 20"},e),t||(t=r.createElement("path",{fill:"#FEC02D",d:"M1.13 20a.76.76 0 0 1-.514-.2.742.742 0 0 1-.229-.543V.743c0-.21.076-.381.229-.514A.71.71 0 0 1 1.13 0h9.114c1.733 0 3.152.229 4.257.686 1.105.457 1.924 1.114 2.457 1.971.534.857.8 1.914.8 3.172 0 .647-.133 1.228-.4 1.742a4.455 4.455 0 0 1-.914 1.258c-.362.323-.705.561-1.028.714.742.324 1.39.876 1.942 1.657.553.762.829 1.638.829 2.629 0 1.333-.305 2.457-.914 3.371-.59.914-1.457 1.61-2.6 2.086-1.124.476-2.505.714-4.143.714h-9.4Zm5.4-4.314h3.343c.647 0 1.123-.19 1.428-.572.305-.4.457-.838.457-1.314 0-.495-.161-.924-.485-1.286-.324-.38-.79-.571-1.4-.571H6.53v3.743Zm0-7.943h3.057c.61 0 1.057-.172 1.343-.514.286-.343.428-.743.428-1.2 0-.458-.143-.858-.428-1.2-.286-.343-.733-.515-1.343-.515H6.53v3.429ZM22.237 20a.761.761 0 0 1-.514-.2.742.742 0 0 1-.229-.543V.743c0-.21.076-.381.229-.514A.71.71 0 0 1 22.237 0h4.857c.21 0 .381.076.514.229a.652.652 0 0 1 .229.514v18.514c0 .21-.076.39-.229.543a.696.696 0 0 1-.514.2h-4.857ZM32.686 20a.761.761 0 0 1-.515-.2.742.742 0 0 1-.228-.543V.743c0-.21.076-.381.228-.514A.71.71 0 0 1 32.686 0h4.542c.21 0 .381.076.515.229a.652.652 0 0 1 .228.514v6L42.23.6a1.98 1.98 0 0 1 .4-.4c.17-.133.409-.2.714-.2h5.228c.172 0 .315.067.429.2.133.114.2.257.2.429a.492.492 0 0 1-.114.314l-6 8.628 6.514 9.486a.425.425 0 0 1 .114.314.63.63 0 0 1-.2.458.582.582 0 0 1-.428.171h-5.4c-.362 0-.639-.086-.829-.257-.171-.172-.276-.295-.314-.372l-4.572-6.628v6.514c0 .21-.076.39-.228.543a.696.696 0 0 1-.515.2h-4.542ZM52.556 20a.797.797 0 0 1-.543-.2.797.797 0 0 1-.2-.543v-4.286c0-.21.066-.39.2-.542a.741.741 0 0 1 .543-.229h4.285c.21 0 .39.076.543.229a.742.742 0 0 1 .229.542v4.286c0 .21-.076.39-.229.543a.798.798 0 0 1-.543.2h-4.285Z"})));exports.default=a;
@@ -1,11 +1,14 @@
1
1
  /// <reference types="react" />
2
2
  export interface BikLayoutProps {
3
3
  isLoading: boolean;
4
+ isFeatureModalEnable?: boolean;
4
5
  isDisabled?: boolean;
5
6
  hidePadding?: boolean;
6
7
  loadingAnimation?: JSX.Element;
7
8
  height?: string;
8
9
  children?: React.ReactNode;
9
10
  containerStyles?: React.CSSProperties;
11
+ onClickingCrossOnFeatureModal?: () => void;
12
+ extraContentForModal?: JSX.Element;
10
13
  }
11
14
  export declare const BikLayout: React.FC<BikLayoutProps>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("./CommonStyles.js"),r=require("./PageLoader.js");exports.BikLayout=s=>{const{isLoading:a,isDisabled:n=!1,loadingAnimation:t,hidePadding:d=!1,height:o,children:l,containerStyles:c}=s;return a?e.jsx(i.BikLayoutContainer,{children:t||e.jsx(r.PageLoader,{})}):e.jsxs(i.BikLayoutContainer,{children:[e.jsx("div",{className:""+(n?"disabled--wrapper":"")}),e.jsx("div",Object.assign({className:""+(d?"inner-wrapper":"inner-wrapper pd-24"),style:Object.assign({height:`${o||""}`},null!=c?c:{})},{children:l}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("./CommonStyles.js"),i=require("./FeatureModal.js"),a=require("./PageLoader.js");exports.BikLayout=n=>{const{isLoading:s,isFeatureModalEnable:t=!1,isDisabled:o=!1,loadingAnimation:d,hidePadding:l=!1,height:u,children:c,containerStyles:j,onClickingCrossOnFeatureModal:g,extraContentForModal:h}=n;return s?e.jsx(r.BikLayoutContainer,{children:d||e.jsx(a.PageLoader,{})}):e.jsx(e.Fragment,{children:e.jsxs(r.BikLayoutContainer,{children:[e.jsx("div",{className:""+(o?"disabled--wrapper":"")}),e.jsx("div",Object.assign({className:""+(l?"inner-wrapper":"inner-wrapper pd-24"),style:Object.assign({height:`${u||""}`},null!=j?j:{})},{children:c})),t&&e.jsx(i.FeatureModal,{onClickingCross:()=>g?g():"",otherContent:h})]})})};
@@ -1,5 +1,20 @@
1
1
  /// <reference types="react" />
2
- export interface sidebarProps {
3
- routes: [];
2
+ import { Menu } from './SimpleSidebar';
3
+ export interface MainMenu {
4
+ key: string | number;
5
+ displayName: string;
6
+ icon: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
7
+ activeStateIcon: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
8
+ hoverStateIcon: React.FunctionComponent<React.SVGAttributes<SVGElement>>;
9
+ isLastSticky?: boolean;
10
+ is2ndLastSticky?: boolean;
11
+ children?: Menu[];
4
12
  }
5
- export declare const BikSidebar: React.FC<sidebarProps>;
13
+ export interface BikSidebarProps {
14
+ allMenuList: MainMenu[];
15
+ activeMainMenu?: MainMenu;
16
+ activeSubMenu?: Menu;
17
+ onClickingMainMenu: (menu: MainMenu) => void;
18
+ onClickingSubMenu: (subMenu: Menu) => void;
19
+ }
20
+ export declare const BikSidebar: React.FC<BikSidebarProps>;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),t=require("../../constants/Theme.js"),s=require("./SidebarStyles.js"),a=require("./SimpleSidebar.js");const l=i=>{const{icon:n,isActive:s,activeStateIcon:a,hoverStateIcon:l,isHovered:r}=i,o=n,d=a,c=l;return e.jsx(e.Fragment,{children:s?e.jsx(d,{width:20,height:20}):r?e.jsx(c,{width:20,height:20,color:t.COLORS.surface.standard}):e.jsx(o,{width:20,height:20,color:t.COLORS.surface.standard})})};exports.BikSidebar=t=>{const{allMenuList:r,activeMainMenu:o,activeSubMenu:d,onClickingMainMenu:c,onClickingSubMenu:u}=t,[v,h]=n.useState(null!=o?o:{}),[m,j]=n.useState(),[S,k]=n.useState(null!=d?d:{});return e.jsxs(s.SideBarContainer,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:e.jsx(i.default,{})})),e.jsx(s.SibeBarMenuItem,{children:null==r?void 0:r.map(((i,t)=>{var s,r,o;return e.jsxs(n.Fragment,{children:[e.jsx("div",Object.assign({className:"main--sidebar",onClick:()=>{var e;j(void 0),h(i),c(i),(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)?k(null==i?void 0:i.children[0]):k({})},onMouseOver:()=>{j(i)},onMouseEnter:()=>{j(i)},onMouseLeave:()=>{var e;!(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)&&j(void 0)},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:e.jsxs("div",Object.assign({className:`sidebar-menu-item ${(null==v?void 0:v.key)==i.key?" main-menu-active-class":""} ${i.isLastSticky?"sticky-menu-int":""} ${i.is2ndLastSticky?"sticky-menu":""}\n ${i.key==(null==m?void 0:m.key)?"sidebar-menu-item-hover":""}`},{children:[e.jsx(l,{icon:i.icon,isActive:i.key==(null==v?void 0:v.key),activeStateIcon:null!==(s=i.activeStateIcon)&&void 0!==s?s:{},hoverStateIcon:null!==(r=i.hoverStateIcon)&&void 0!==r?r:{},isHovered:i.key==(null==m?void 0:m.key)}),e.jsx("div",Object.assign({className:"menu-item-container"},{children:e.jsx("p",Object.assign({className:"menu-item-text "+((null==i?void 0:i.key)===(null==v?void 0:v.key)?"active-menu-item-text":"")},{children:i.displayName}))}))]}),t)}),t),e.jsx(e.Fragment,{children:(null===(o=null==m?void 0:m.children)||void 0===o?void 0:o.length)&&e.jsx(a.SimpleSidebar,{menuList:null==m?void 0:m.children,activeMenu:S,onMouseLeaveOnMenu:()=>j(void 0),left:88,header:m.displayName,theme:"brand",onMenuClick:e=>{k(e),h(m),j(void 0),u(e)}})})]},t)}))})]})};
@@ -1,4 +1,8 @@
1
1
  /// <reference types="react" />
2
+ export declare const GlobalContainer: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
2
6
  export declare const LoaderWrapper: import("@emotion/styled").StyledComponent<{
3
7
  theme?: import("@emotion/react").Theme | undefined;
4
8
  as?: import("react").ElementType<any> | undefined;
@@ -77,3 +81,11 @@ export declare const StyledBodyCaption: import("@emotion/styled").StyledComponen
77
81
  } & {
78
82
  isAvailable: boolean;
79
83
  }, {}, {}>;
84
+ export declare const FeatureModalContainer: import("@emotion/styled").StyledComponent<{
85
+ theme?: import("@emotion/react").Theme | undefined;
86
+ as?: import("react").ElementType<any> | undefined;
87
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
88
+ export declare const InnerModalContainer: import("@emotion/styled").StyledComponent<{
89
+ theme?: import("@emotion/react").Theme | undefined;
90
+ as?: import("react").ElementType<any> | undefined;
91
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;