@bikdotai/bik-component-library 0.0.353 → 0.0.354

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronLeft.svg.js"),r=require("../../assets/icons/chevronRight.svg.js"),s=require("react"),n=require("../button/Button.js"),o=require("./CarouselSecondary.style.js");exports.CarouselSecondary=i=>{let{pages:a,onComplete:u,textAlign:l}=i;const[c,d]=s.useState(0),g=s.useRef(null);return s.useEffect((()=>{g.current&&g.current.scrollTo({left:g.current.offsetWidth*c,behavior:"smooth"})}),[c]),e.jsxs(o.CarouselContainer,{children:[e.jsx(o.CarouselBody,Object.assign({ref:g,textAlign:l},{children:a.map(((t,r)=>e.jsx(o.CarouselPage,Object.assign({isActive:r===c},{children:t}),r)))})),e.jsxs(o.CarouselFooter,{children:[e.jsx(n.Button,{buttonText:"Back",buttonType:"tertiaryGray",onClick:()=>{d((e=>0===e?e:e-1))},size:"medium",LeadingIcon:t.default,disabled:!c}),e.jsx(o.PageIndicator,{children:a.map(((t,r)=>e.jsx(o.Indicator,{isActive:r===c,onClick:()=>{d(r)}},r)))}),e.jsx(n.Button,{buttonText:c===a.length-1?"Get start":"Next",buttonType:c===a.length-1?"tertiary":"tertiaryGray",onClick:()=>{d((e=>e===a.length-1?e:e+1)),c===a.length-1&&u()},size:"medium",TrailingIcon:c<a.length-1?r.default:void 0,style:{background:"transparent"}})]})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronLeft.svg.js"),r=require("../../assets/icons/chevronRight.svg.js"),s=require("react"),n=require("../button/Button.js"),o=require("./CarouselSecondary.style.js");exports.CarouselSecondary=i=>{let{pages:a,onComplete:u,textAlign:l}=i;const[c,d]=s.useState(0),g=s.useRef(null);return s.useEffect((()=>{g.current&&g.current.scrollTo({left:g.current.offsetWidth*c,behavior:"smooth"})}),[c]),e.jsxs(o.CarouselContainer,{children:[e.jsx(o.CarouselBody,Object.assign({ref:g,textAlign:l},{children:a.map(((t,r)=>e.jsx(o.CarouselPage,Object.assign({isActive:r===c},{children:t}),r)))})),e.jsxs(o.CarouselFooter,{children:[e.jsx(n.Button,{buttonText:"Back",buttonType:"tertiaryGray",onClick:()=>{d((e=>0===e?e:e-1))},size:"medium",LeadingIcon:t.default,disabled:!c}),e.jsx(o.PageIndicator,{children:a.map(((t,r)=>e.jsx(o.Indicator,{isActive:r===c,onClick:()=>{d(r)}},r)))}),e.jsx(n.Button,{buttonText:c===a.length-1?"Get started":"Next",buttonType:c===a.length-1?"tertiary":"tertiaryGray",onClick:()=>{d((e=>e===a.length-1?e:e+1)),c===a.length-1&&u()},size:"medium",TrailingIcon:c<a.length-1?r.default:void 0,style:{background:"transparent"}})]})]})};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1 +1 @@
1
- import{jsxs as t,jsx as e}from"react/jsx-runtime";import r from"../../assets/icons/chevronLeft.svg.js";import n from"../../assets/icons/chevronRight.svg.js";import{useState as o,useRef as i,useEffect as s}from"react";import{Button as c}from"../button/Button.js";import{CarouselContainer as l,CarouselBody as a,CarouselPage as m,CarouselFooter as g,PageIndicator as h,Indicator as u}from"./CarouselSecondary.style.js";const d=d=>{let{pages:p,onComplete:f,textAlign:b}=d;const[y,v]=o(0),j=i(null);return s((()=>{j.current&&j.current.scrollTo({left:j.current.offsetWidth*y,behavior:"smooth"})}),[y]),t(l,{children:[e(a,Object.assign({ref:j,textAlign:b},{children:p.map(((t,r)=>e(m,Object.assign({isActive:r===y},{children:t}),r)))})),t(g,{children:[e(c,{buttonText:"Back",buttonType:"tertiaryGray",onClick:()=>{v((t=>0===t?t:t-1))},size:"medium",LeadingIcon:r,disabled:!y}),e(h,{children:p.map(((t,r)=>e(u,{isActive:r===y,onClick:()=>{v(r)}},r)))}),e(c,{buttonText:y===p.length-1?"Get start":"Next",buttonType:y===p.length-1?"tertiary":"tertiaryGray",onClick:()=>{v((t=>t===p.length-1?t:t+1)),y===p.length-1&&f()},size:"medium",TrailingIcon:y<p.length-1?n:void 0,style:{background:"transparent"}})]})]})};export{d as CarouselSecondary};
1
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import r from"../../assets/icons/chevronLeft.svg.js";import n from"../../assets/icons/chevronRight.svg.js";import{useState as o,useRef as i,useEffect as s}from"react";import{Button as c}from"../button/Button.js";import{CarouselContainer as l,CarouselBody as a,CarouselPage as m,CarouselFooter as g,PageIndicator as h,Indicator as u}from"./CarouselSecondary.style.js";const d=d=>{let{pages:p,onComplete:f,textAlign:b}=d;const[y,v]=o(0),j=i(null);return s((()=>{j.current&&j.current.scrollTo({left:j.current.offsetWidth*y,behavior:"smooth"})}),[y]),t(l,{children:[e(a,Object.assign({ref:j,textAlign:b},{children:p.map(((t,r)=>e(m,Object.assign({isActive:r===y},{children:t}),r)))})),t(g,{children:[e(c,{buttonText:"Back",buttonType:"tertiaryGray",onClick:()=>{v((t=>0===t?t:t-1))},size:"medium",LeadingIcon:r,disabled:!y}),e(h,{children:p.map(((t,r)=>e(u,{isActive:r===y,onClick:()=>{v(r)}},r)))}),e(c,{buttonText:y===p.length-1?"Get started":"Next",buttonType:y===p.length-1?"tertiary":"tertiaryGray",onClick:()=>{v((t=>t===p.length-1?t:t+1)),y===p.length-1&&f()},size:"medium",TrailingIcon:y<p.length-1?n:void 0,style:{background:"transparent"}})]})]})};export{d as CarouselSecondary};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.353",
3
+ "version": "0.0.354",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",