@bikdotai/bik-component-library 0.8.0-bik-layout-beta → 0.10.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.
@@ -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,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)}))})]})};