@k8slens/lds-carousel 0.1.0

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 (29) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -0
  3. package/lib/cjs/Carousel/Carousel.d.ts +17 -0
  4. package/lib/cjs/Carousel/Carousel.js +1 -0
  5. package/lib/cjs/Carousel/Carousel.module.css.js +1 -0
  6. package/lib/cjs/Carousel/CarouselDotButton.d.ts +11 -0
  7. package/lib/cjs/Carousel/CarouselDotButton.js +1 -0
  8. package/lib/cjs/_virtual/_tslib.js +1 -0
  9. package/lib/cjs/index.css +1 -0
  10. package/lib/cjs/index.d.ts +2 -0
  11. package/lib/cjs/index.js +1 -0
  12. package/lib/cjs/node_modules/embla-carousel/embla-carousel.esm.js +1 -0
  13. package/lib/cjs/node_modules/embla-carousel-autoplay/embla-carousel-autoplay.esm.js +1 -0
  14. package/lib/cjs/node_modules/embla-carousel-react/embla-carousel-react.esm.js +1 -0
  15. package/lib/cjs/node_modules/embla-carousel-reactive-utils/embla-carousel-reactive-utils.esm.js +1 -0
  16. package/lib/es/Carousel/Carousel.d.ts +17 -0
  17. package/lib/es/Carousel/Carousel.js +1 -0
  18. package/lib/es/Carousel/Carousel.module.css.js +1 -0
  19. package/lib/es/Carousel/CarouselDotButton.d.ts +11 -0
  20. package/lib/es/Carousel/CarouselDotButton.js +1 -0
  21. package/lib/es/_virtual/_tslib.js +1 -0
  22. package/lib/es/index.css +1 -0
  23. package/lib/es/index.d.ts +2 -0
  24. package/lib/es/index.js +1 -0
  25. package/lib/es/node_modules/embla-carousel/embla-carousel.esm.js +1 -0
  26. package/lib/es/node_modules/embla-carousel-autoplay/embla-carousel-autoplay.esm.js +1 -0
  27. package/lib/es/node_modules/embla-carousel-react/embla-carousel-react.esm.js +1 -0
  28. package/lib/es/node_modules/embla-carousel-reactive-utils/embla-carousel-reactive-utils.esm.js +1 -0
  29. package/package.json +59 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Lens - The Kubernetes IDE
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # Lens Design System – React Carousel component
2
+
3
+ ## Documentation
4
+ Browse the documentation at [lensapp.github.io/lens-design-system](http://lensapp.github.io/lens-design-system/?path=/docs/carousel).
5
+
6
+ ## Usage in React apps
7
+ - run `npm i -s @k8slens/lds @k8slens/lds-tokens @k8slens/lds-carousel`
8
+ - import `@k8slens/lds-tokens/lib/es/font-imports.css` in your React app to include fonts
9
+ - import `@k8slens/lds/lib/es/index.css` in your React app to include core styles
10
+ - import `@k8slens/lds-carousel/lib/es/index.css` in your React app to include Carousel styles
11
+ - Use in a component:
12
+
13
+ ```tsx
14
+ import Carousel from "@k8slens/lds-carousel";
15
+
16
+ export const Component = () => (
17
+ <Carousel>
18
+ <img src="src" alt="Alt text" />
19
+ <img src="src" alt="Alt text" />
20
+ <img src="src" alt="Alt text" />
21
+ </Carousel>
22
+ );
23
+ ```
24
+
25
+ ### Autoplay first slide when it's a video
26
+ ```tsx
27
+ import Carousel from "@k8slens/lds-carousel";
28
+
29
+ export const Component = () => {
30
+ const videoRef = React.useRef<HTMLVideoElement>(null);
31
+
32
+ const [isVideoPlaying, setIsVideoPlaying] = useState(false);
33
+ const [playing, setVideoPlaying] = useState(false);
34
+
35
+ useEffect(() => {
36
+ if (videoRef?.current && playing && !isVideoPlaying) {
37
+ videoRef.current.play().catch((e) => {
38
+ console.log(e);
39
+ });
40
+ }
41
+ }, [videoRef, playing, isVideoPlaying]);
42
+
43
+ return (
44
+ <Carousel>
45
+ <video
46
+ key="video-1" // Key needs to include the word "video"
47
+ ref={videoRef}
48
+ autoPlay={playing}
49
+ src="src"
50
+ muted // Mute video to avoid autoplay issues
51
+ onPlay={() => setIsVideoPlaying(true)}
52
+ onPause={() => setIsVideoPlaying(false)}
53
+ onEnded={() => setIsVideoPlaying(false)}
54
+ />
55
+ <img src="src" alt="Alt text" />
56
+ <img src="src" alt="Alt text" />
57
+ <img src="src" alt="Alt text" />
58
+ </Carousel>
59
+ );
60
+ }
61
+ ```
@@ -0,0 +1,17 @@
1
+ import { type HTMLAttributes, type PropsWithChildren } from "react";
2
+ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * A helper state to control video autoplay.
5
+ * If the first slide is a video (has a key containing the word "video"), this prop will be set to true automatically.
6
+ */
7
+ isVideoPlaying?: boolean;
8
+ /**
9
+ * A helper state to control video autoplay.
10
+ */
11
+ setVideoPlaying?: (arg0: boolean) => void;
12
+ }
13
+ /**
14
+ * Carousel component. Uses React Embla Carousel under the hood.
15
+ */
16
+ declare const Carousel: ({ isVideoPlaying, setVideoPlaying, className, children, ...props }: PropsWithChildren<CarouselProps>) => JSX.Element;
17
+ export default Carousel;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("../_virtual/_tslib.js"),t=require("react"),a=require("clsx"),l=require("../node_modules/embla-carousel-react/embla-carousel-react.esm.js"),n=require("./CarouselDotButton.js"),s=require("../node_modules/embla-carousel-autoplay/embla-carousel-autoplay.esm.js"),o=require("./Carousel.module.css.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=r(t),i=r(a);module.exports=function(a){var r=a.isVideoPlaying,c=a.setVideoPlaying,d=a.className,f=a.children,m=e.__rest(a,["isVideoPlaying","setVideoPlaying","className","children"]),p=l({align:"start",loop:!0},[s({delay:8e3,stopOnInteraction:!0})]),v=p[0],y=p[1],g=t.useCallback((function(e){var t=e.plugins().autoplay;t&&!1!==t.options.stopOnInteraction&&t.stop()}),[]),b=n.useDotButton(y,g),C=b.selectedIndex,E=b.scrollSnaps,N=b.onDotButtonClick;return t.useEffect((function(){if(y){var e=y.plugins().autoplay;e&&(r?e.stop():e.play())}}),[y,r]),t.useEffect((function(){y&&"function"==typeof c&&(String(Object(u.default.Children.toArray(f)[null==y?void 0:y.slidesInView(!0)[0]]).key).indexOf("video")>0?c(!0):c(!1))}),[y,null==y?void 0:y.slidesInView,f,c]),u.default.createElement("div",e.__assign({className:i.default(o.carousel,d)},m),u.default.createElement("div",{className:o.viewport,ref:v},u.default.createElement("div",{className:o.container},u.default.Children.map(f,(function(e,t){return u.default.createElement("div",{className:o.slide,key:t},e)})))),u.default.Children.count(f)>1&&u.default.createElement("div",{className:o.dots},E.map((function(e,t){var a;return u.default.createElement(n.DotButton,{key:t,onClick:function(){return N(t)},className:i.default(o.dot,(a={},a[o.dotSelected]=t===C,a))})}))))};
@@ -0,0 +1 @@
1
+ "use strict";module.exports={carousel:"lds-carousel",viewport:"lds-carousel--viewport",container:"lds-carousel--container",slide:"lds-carousel--slide",dots:"lds-carousel--dots",dot:"lds-carousel--dot",dotSelected:"lds-carousel--dot-selected"};
@@ -0,0 +1,11 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ import { type EmblaCarouselType } from "embla-carousel-react";
3
+ declare type UseDotButtonType = {
4
+ selectedIndex: number;
5
+ scrollSnaps: number[];
6
+ onDotButtonClick: (index: number) => void;
7
+ };
8
+ export declare const useDotButton: (emblaApi: EmblaCarouselType | undefined, onButtonClick?: ((emblaApi: EmblaCarouselType) => void) | undefined) => UseDotButtonType;
9
+ declare type PropType = PropsWithChildren<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
10
+ export declare const DotButton: React.FC<PropType>;
11
+ export {};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../_virtual/_tslib.js"),t=require("react");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);exports.DotButton=function(t){var n=t.children,o=e.__rest(t,["children"]);return r.default.createElement("button",e.__assign({type:"button"},o),n)},exports.useDotButton=function(e,n){var r=t.useState(0),o=r[0],u=r[1],l=t.useState([]),c=l[0],s=l[1],a=t.useCallback((function(t){e&&(e.scrollTo(t),n&&n(e))}),[e,n]),i=t.useCallback((function(e){s(e.scrollSnapList())}),[]),f=t.useCallback((function(e){u(e.selectedScrollSnap())}),[]);return t.useEffect((function(){e&&(i(e),f(e),e.on("reInit",i),e.on("reInit",f),e.on("select",f))}),[e,i,f]),{selectedIndex:o,scrollSnaps:c,onDotButtonClick:a}};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.__assign=function(){return exports.__assign=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},exports.__assign.apply(this,arguments)},exports.__rest=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]])}return r};
@@ -0,0 +1 @@
1
+ :root{--spacing-carousel-dot-padding:0.1125rem;--spacing-carousel-slide-width:100%;--opacity-carousel-dot-inactive:0.5;--opacity-carousel-dot-active:1;--spacing-carousel-dot-size:var(--spacing-lg);--spacing-carousel-dots-margin-top:var(--spacing-sm);--spacing-carousel-container-margin-bottom:var(--spacing-xs);--spacing-carousel-margin-bottom:var(--spacing-3xl);--color-background-carousel-dot:var(--alias-color-background-highlight-25)}.lds-carousel{--slide-spacing:1rem;margin-bottom:var(--spacing-carousel-margin-bottom)}.lds-carousel--viewport{overflow:hidden}.lds-carousel--container{backface-visibility:hidden;display:flex;margin-bottom:var(--spacing-carousel-container-margin-bottom);margin-left:calc(var(--slide-spacing)*-1);touch-action:pan-y}.lds-carousel--slide{flex:0 0 var(--spacing-carousel-slide-width);min-width:0;padding-left:var(--slide-spacing);position:relative}.lds-carousel--dots{align-items:center;display:flex;justify-content:center;left:0;margin-top:var(--spacing-carousel-dots-margin-top);position:relative;right:0;z-index:1}.lds-carousel--dot{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;cursor:pointer;display:inline-flex;display:flex;height:var(--spacing-carousel-dot-size);margin:0;padding:0;padding:var(--spacing-carousel-dot-padding);text-decoration:none;touch-action:manipulation;width:var(--spacing-carousel-dot-size)}.lds-carousel--dot:after{background:var(--color-background-carousel-dot);border-radius:var(--spacing-carousel-dot-size);content:"";height:100%;opacity:var(--opacity-carousel-dot-inactive);width:100%}.lds-carousel--dot-selected:after{opacity:var(--opacity-carousel-dot-active)}
@@ -0,0 +1,2 @@
1
+ import "./tokens.css";
2
+ export { default as Carousel } from "./Carousel/Carousel";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./Carousel/Carousel.js");exports.Carousel=e;
@@ -0,0 +1 @@
1
+ "use strict";function n(n){return"number"==typeof n}function t(n){return"string"==typeof n}function e(n){return"boolean"==typeof n}function r(n){return"[object Object]"===Object.prototype.toString.call(n)}function o(n){return Math.abs(n)}function i(n){return Math.sign(n)}function c(n,t){return o(n-t)}function u(n){return d(n).map(Number)}function s(n){return n[a(n)]}function a(n){return Math.max(0,n.length-1)}function d(n){return Object.keys(n)}function l(n,t){return[n,t].reduce(((n,t)=>(d(t).forEach((e=>{const o=n[e],i=t[e],c=r(o)&&r(i);n[e]=c?l(o,i):i})),n)),{})}function f(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function p(t,e){const r={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return e-n}return{measure:function(o){return n(t)?e*Number(t):r[t](o)}}}function m(n,t){const e=o(n-t);function r(t){return t<n}function i(n){return n>t}function c(n){return r(n)||i(n)}return{length:e,max:t,min:n,constrain:function(e){return c(e)?r(e)?n:t:e},reachedAny:c,reachedMax:i,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function g(n,t,e){const{constrain:r}=m(0,n),i=n+1;let c=u(t);function u(n){return e?o((i+n)%i):r(n)}function s(){return c}function a(){return g(n,s(),e)}const d={get:s,set:function(n){return c=u(n),d},add:function(n){return a().set(s()+n)},clone:a};return d}function h(){let n=[];const t={add:function(e,r,o,i={passive:!0}){return e.addEventListener(r,o,i),n.push((()=>e.removeEventListener(r,o,i))),t},clear:function(){n=n.filter((n=>n()))}};return t}function x(n,t,r,u,s,a,d,l,p,g,x,y,v,S,b,w,E,D,M){const{cross:A}=n,L=["INPUT","SELECT","TEXTAREA"],O={passive:!1},I=h(),P=h(),F=m(50,225).constrain(b.measure(20)),T={mouse:300,touch:400},z={mouse:500,touch:600},B=w?43:25;let k=!1,H=0,R=0,N=!1,V=!1,C=!1,j=!1;function q(n){const e=d.readPoint(n),r=d.readPoint(n,A),o=c(e,H),i=c(r,R);if(!V&&!j){if(!n.cancelable)return U(n);if(V=o>i,!V)return U(n)}const u=d.pointerMove(n);o>E&&(C=!0),x.useFriction(.3).useDuration(1),p.start(),a.add(t.apply(u)),n.preventDefault()}function U(n){const e=y.byDistance(0,!1).index!==v.get(),r=d.pointerUp(n)*(w?z:T)[j?"mouse":"touch"],u=function(n,t){const e=v.add(-1*i(n)),r=y.byDistance(n,!w).distance;return w||o(n)<F?r:D&&t?.5*r:y.byIndex(e.get(),0).distance}(t.apply(r),e),s=function(n,t){if(0===n||0===t)return 0;if(o(n)<=o(t))return 0;const e=c(o(n),o(t));return o(e/n)}(r,u),a=B-10*s,l=M+s/50;V=!1,N=!1,P.clear(),x.useDuration(a).useFriction(l),g.distance(u,!w),j=!1,S.emit("pointerUp")}function W(n){C&&(n.stopPropagation(),n.preventDefault())}return{init:function(n,t){if(!t)return;function o(o){(e(t)||t(n,o))&&function(n){const t=f(n,s);if(j=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return L.includes(t)}(n.target))return;C=w&&t&&!n.buttons&&k,k=c(a.get(),l.get())>=2,N=!0,d.pointerDown(n),x.useFriction(0).useDuration(0),a.set(l),function(){const n=j?u:r;P.add(n,"touchmove",q,O).add(n,"touchend",U).add(n,"mousemove",q,O).add(n,"mouseup",U)}(),H=d.readPoint(n),R=d.readPoint(n,A),S.emit("pointerDown")}(o)}const i=r;I.add(i,"dragstart",(n=>n.preventDefault()),O).add(i,"touchmove",(()=>{}),O).add(i,"touchend",(()=>{})).add(i,"touchstart",o).add(i,"mousedown",o).add(i,"touchcancel",U).add(i,"contextmenu",U).add(i,"click",W,!0)},pointerDown:function(){return N},destroy:function(){I.clear(),P.clear()}}}function y(n,t){let e,r;function i(n){return n.timeStamp}function c(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(f(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,c(n)},pointerMove:function(n){const t=c(n)-c(r),o=i(n)-i(e)>170;return r=n,o&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=c(r)-c(e),u=i(n)-i(e),s=i(n)-i(r)>170,a=t/u;return u&&!s&&o(a)>.1?a:0},readPoint:c}}function v(n,t,r,o,i){let c,u,s=[],a=!1;function d(n){return i.measureSize(n.getBoundingClientRect())}return{init:function(i,l){if(!l)return;u=d(n),s=o.map(d),c=new ResizeObserver((c=>{a||(e(l)||l(i,c))&&function(e){for(const c of e){const e=c.target===n,a=o.indexOf(c.target);if((e?u:s[a])!==d(e?n:o[a])){r.requestAnimationFrame((()=>{i.reInit(),t.emit("resize")}));break}}}(c)})),[n].concat(o).forEach((n=>c.observe(n)))},destroy:function(){c&&c.disconnect(),a=!0}}}function S(n,t,e,r,i){const c=i.measure(10),u=i.measure(50),s=m(.1,.99);let a=!1;return{constrain:function(i){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const d=n.reachedMin(t.get())?"min":"max",l=o(n[d]-t.get()),f=e.get()-t.get(),p=s.constrain(l/u);e.subtract(f*p),!i&&o(f)<c&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function b(n,t,e,r){const o=m(-t+n,e[0]),i=e.map(o.constrain).map((n=>parseFloat(n.toFixed(3))));return{snapsContained:function(){if(t<=n)return[o.max];if("keepSnaps"===r)return i;const{min:e,max:c}=function(){const n=i[0],t=s(i),e=i.lastIndexOf(n),r=i.indexOf(t)+1;return m(e,r)}();return i.slice(e,c)}()}}function w(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=m(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function E(n){const{max:t,length:e}=n;return{get:function(n){return(n-t)/-e}}}function D(n,t,e,r,c){const{reachedAny:u,removeOffset:s,constrain:a}=r;function d(n){return n.concat().sort(((n,t)=>o(n)-o(t)))[0]}function l(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return d(o);return d(o.filter((n=>i(n)===r)))}return{byDistance:function(e,r){const i=c.get()+e,{index:d,distance:f}=function(e){const r=n?s(e):a(e),i=t.map((n=>n-r)).map((n=>l(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>o(n.diff)-o(t.diff))),{index:c}=i[0];return{index:c,distance:r}}(i),p=!n&&u(i);return!r||p?{index:d,distance:e}:{index:d,distance:e+l(t[d]-f,0)}},byIndex:function(n,e){return{index:n,distance:l(t[n]-c.get(),e)}},shortcut:l}}function M(t){let e=t;function r(t){return n(t)?t:t.get()}return{get:function(){return e},set:function(n){e=r(n)},add:function(n){e+=r(n)},subtract:function(n){e-=r(n)}}}function A(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function L(n,t,e,r,o,i,c,s,a){const d=u(o),l=u(o).reverse(),f=function(){const n=i[0]-1;return g(m(l,n),"end")}().concat(function(){const n=e-i[0]-1;return g(m(d,n),"start")}());function p(n,t){return n.reduce(((n,t)=>n-o[t]),t)}function m(n,t){return n.reduce(((n,e)=>p(n,t)>0?n.concat([e]):n),[])}function g(e,o){const i="start"===o,u=i?-r:r,d=c.findSlideBounds([u]);return e.map((e=>{const o=i?0:-r,c=i?r:0,u=d.filter((n=>n.index===e))[0][i?"end":"start"];return{index:e,slideLocation:M(-1),translate:A(n,t,a[e]),target:()=>s.get()>u?o:c}}))}return{canLoop:function(){return f.every((({index:n})=>p(d.filter((t=>t!==n)),e)<=.1))},clear:function(){f.forEach((n=>n.translate.clear()))},loop:function(){f.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:f}}function O(n,t){let r,o=!1;return{init:function(i,c){c&&(r=new MutationObserver((n=>{o||(e(c)||c(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function I(n,t,e,r,o,i,c){const{removeOffset:u,constrain:s}=o,a=.5,d=i?[0,t,-t]:[0],l=f(d,c);function f(t,o){const i=t||d,c=function(n){const t=n||0;return e.map((n=>m(a,n-a).constrain(n*t)))}(o);return i.reduce(((t,o)=>{const i=r.map(((t,r)=>({start:t-e[r]+c[r]+o,end:t+n-c[r]+o,index:r})));return t.concat(i)}),[])}return{check:function(n,t){const e=i?u(n):s(n);return(t||l).reduce(((n,t)=>{const{index:r,start:o,end:i}=t;return!n.includes(r)&&(o<e&&i>e)?n.concat([r]):n}),[])},findSlideBounds:f}}function P(t,e,r){const o=n(r);return{groupSlides:function(n){return o?function(n,t){return u(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,r):function(n){return u(n).reduce(((n,r)=>{const o=e.slice(s(n),r+1).reduce(((n,t)=>n+t),0);return!r||o>t?n.concat(r):n}),[]).map(((t,e,r)=>n.slice(t,r[e+1])))}(n)}}}function F(n,t,e,r,c,d,l,f){const{align:F,axis:T,direction:z,startIndex:B,inViewThreshold:k,loop:H,duration:R,dragFree:N,dragThreshold:V,slidesToScroll:C,skipSnaps:j,containScroll:q}=d,U=t.getBoundingClientRect(),W=e.map((n=>n.getBoundingClientRect())),$=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(z),G=function(n,t){const e="y"===n?"y":"x";return{scroll:e,cross:"y"===n?"x":"y",startEdge:"y"===e?"top":"rtl"===t?"right":"left",endEdge:"y"===e?"bottom":"rtl"===t?"left":"right",measureSize:function(n){const{width:t,height:r}=n;return"x"===e?t:r}}}(T,z),Q=G.measureSize(U),X=function(n){return{measure:function(t){return n*(t/100)}}}(Q),Y=p(F,Q),J=!H&&!!q,K=H||!!q,{slideSizes:Z,slideSizesWithGaps:_}=function(n,t,e,r,i,c){const{measureSize:u,startEdge:d,endEdge:l}=n,f=e[0]&&i,p=function(){if(!f)return 0;const n=e[0];return o(t[d]-n[d])}(),m=function(){if(!f)return 0;const n=c.getComputedStyle(s(r));return parseFloat(n.getPropertyValue(`margin-${l}`))}(),g=e.map(u),h=e.map(((n,t,e)=>{const r=!t,o=t===a(e);return r?g[t]+p:o?g[t]+m:e[t+1][d]-n[d]})).map(o);return{slideSizes:g,slideSizesWithGaps:h}}(G,U,W,e,K,c),nn=P(Q,_,C),{snaps:tn,snapsAligned:en}=function(n,t,e,r,i,c,u){const{startEdge:d,endEdge:l}=n,{groupSlides:f}=c,p=f(r).map((n=>s(n)[l]-n[0][d])).map(o).map(t.measure),m=r.map((n=>e[d]-n[d])).map((n=>-o(n))),g=function(){const n=s(m)-s(i);return f(m).map((n=>n[0])).map(((t,e,r)=>{const o=!e,i=e===a(r);return u&&o?0:u&&i?n:t+p[e]}))}();return{snaps:m,snapsAligned:g}}(G,Y,U,W,_,nn,J),rn=-s(tn)+s(_),{snapsContained:on}=b(Q,rn,en,q),cn=J?on:en,{limit:un}=function(n,t,e){const r=t[0];return{limit:m(e?r-n:s(t),r)}}(rn,cn,H),sn=g(a(cn),B,H),an=sn.clone(),dn=u(e),ln={start:()=>f.start(Sn),stop:()=>f.stop(Sn),update:()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,eventHandler:r,animation:o,options:{loop:i}})=>{const c=n.pointerDown();i||e.constrain(c);const u=t.seek().settled();u&&!c&&(o.stop(),r.emit("settle")),u||r.emit("scroll")})(Sn),render:n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,options:{loop:c}},u)=>{const s=n.velocity();r.set(e.get()-s+s*u),c&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Sn,n)},fn=cn[sn.get()],pn=M(fn),mn=M(fn),gn=M(fn),hn=function(n,t,e,r){let c=!0,u=0,s=0,a=e,d=r,l=n.get(),f=0;function p(n){return a=n,g}function m(n){return d=n,g}const g={direction:function(){return s},duration:function(){return a},velocity:function(){return u},seek:function(){const e=t.get()-n.get();let r=0;return a?(u+=e/a,u*=d,l+=u,n.add(u),r=l-f):(u=0,n.set(t),r=e),s=i(r),f=l,c=o(e)<.001,g},settled:function(){return c},useBaseFriction:function(){return m(r)},useBaseDuration:function(){return p(e)},useFriction:m,useDuration:p};return g}(pn,gn,R,.68),xn=D(H,cn,rn,un,gn),yn=function(n,t,e,r,o,i,c){function u(r){const u=r.distance,s=r.index!==t.get();i.add(u),u&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(r.index),c.emit("select"))}return{distance:function(n,t){u(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);u(r.byIndex(o.get(),e))}}}(ln,sn,an,xn,hn,gn,l),vn=I(Q,rn,Z,tn,un,H,k),Sn={ownerDocument:r,ownerWindow:c,eventHandler:l,containerRect:U,slideRects:W,animation:ln,axis:G,direction:$,dragHandler:x(G,$,n,r,c,gn,y(G,c),pn,ln,yn,hn,xn,sn,l,X,N,V,j,.68),eventStore:h(),percentOfView:X,index:sn,indexPrevious:an,limit:un,location:pn,offsetLocation:mn,options:d,resizeHandler:v(t,l,c,e,G),scrollBody:hn,scrollBounds:S(un,pn,gn,hn,X),scrollLooper:w(rn,un,mn,[pn,mn,gn]),scrollProgress:E(un),scrollSnaps:cn,scrollTarget:xn,scrollTo:yn,slideLooper:L(G,$,Q,rn,_,cn,vn,mn,e),slidesHandler:O(t,l),slidesInView:vn,slideIndexes:dn,slidesToScroll:nn,target:gn,translate:A(G,$,t)};return Sn}const T={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function z(n){function t(n,t){return l(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=d(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>d(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function B(n,e,r){const i=n.ownerDocument,c=i.defaultView,u=z(c),s=function(n){let t=[];return{init:function(e,r){return t=e.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(r,n))),e.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(u),a=h(),d=h(),l=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{animationRealms:f}=B,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:g}=u,{on:x,off:y,emit:v}=l,S=k;let b,w,E,D,M=!1,A=p(T,B.globalOptions),L=p(A),O=[];function I(t,e){const r=F(n,E,D,i,c,t,l,e);if(t.loop&&!r.slideLooper.canLoop()){return I(Object.assign({},t,{loop:!1}),e)}return r}function P(e,r){if(M)return;const u=f.find((n=>n.window===c)),l=u||function(n){const t=1e3/60;let e=[],r=null,i=0,c=0;function u(s){r||(r=s);const a=s-r;for(r=s,i+=a;i>=t;)e.forEach((({animation:n})=>n.update())),i-=t;const d=o(i/t);e.forEach((({animation:n})=>n.render(d))),c&&n.requestAnimationFrame(u)}return{start:function(t){e.includes(t)||e.push(t),c||(c=n.requestAnimationFrame(u))},stop:function(t){e=e.filter((n=>n!==t)),e.length||(n.cancelAnimationFrame(c),r=null,i=0,c=0)},reset:function(){r=null,i=0},window:n}}(c);u||f.push(l),A=p(A,e),L=m(A),O=r||O,function(){const{container:e,slides:r}=L,o=t(e)?n.querySelector(e):e;E=o||n.children[0];const i=t(r)?E.querySelectorAll(r):r;D=[].slice.call(i||E.children)}(),b=I(L,l),g([A,...O.map((({options:n})=>n))]).forEach((n=>a.add(n,"change",k))),L.active&&(b.translate.to(b.location.get()),b.eventHandler.init(C),b.resizeHandler.init(C,L.watchResize),b.slidesHandler.init(C,L.watchSlides),d.add(i,"visibilitychange",(()=>{i.hidden&&l.reset()})),b.options.loop&&b.slideLooper.loop(),E.offsetParent&&D.length&&b.dragHandler.init(C,L.watchDrag),w=s.init(O,C))}function k(n,t){const e=V();H(),P(p({startIndex:e},n),t),l.emit("reInit")}function H(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),s.destroy(),a.clear(),d.clear()}function R(n){const t=b[n?"target":"location"].get(),e=L.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[e](t))}function N(n,t,e){L.active&&!M&&(b.scrollBody.useBaseFriction().useDuration(t?0:L.duration),b.scrollTo.index(n,e||0))}function V(){return b.index.get()}const C={canScrollNext:function(){return b.index.add(1).get()!==V()},canScrollPrev:function(){return b.index.add(-1).get()!==V()},containerNode:function(){return E},internalEngine:function(){return b},destroy:function(){M||(M=!0,a.clear(),H(),l.emit("destroy"))},off:y,on:x,emit:v,plugins:function(){return w},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:S,rootNode:function(){return n},scrollNext:function(n){N(b.index.add(1).get(),!0===n,-1)},scrollPrev:function(n){N(b.index.add(-1).get(),!0===n,1)},scrollProgress:function(){return b.scrollProgress.get(b.location.get())},scrollSnapList:function(){return b.scrollSnaps.map(b.scrollProgress.get)},scrollTo:N,selectedScrollSnap:V,slideNodes:function(){return D},slidesInView:R,slidesNotInView:function(n){const t=R(n);return b.slideIndexes.filter((n=>!t.includes(n)))}};return P(e,r),setTimeout((()=>l.emit("init")),0),C}B.animationRealms=[],B.globalOptions=void 0,module.exports=B;
@@ -0,0 +1 @@
1
+ "use strict";const n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function t(o={}){let e,i,s,r=0,a=!1;function p(){i.off("pointerDown",s),e.stopOnInteraction||i.off("pointerUp",c),d(),r=0}function l(n){d(),void 0!==n&&(a=n),r=window.setTimeout(u,e.delay)}function d(){r&&window.clearTimeout(r)}function c(){r&&(d(),l())}function u(){const{index:n}=i.internalEngine(),t=i.scrollSnapList().length-1;if(e.stopOnLastSnap&&n.get()===t)return p();i.canScrollNext()?i.scrollNext(a):i.scrollTo(0,a),l()}return{name:"autoplay",options:o,init:function(r,u){i=r;const{mergeOptions:O,optionsAtMedia:f}=u,m=O(n,t.globalOptions),g=O(m,o);e=f(g),a=e.jump,s=e.stopOnInteraction?p:d;const{eventStore:w,ownerDocument:y,ownerWindow:v}=i.internalEngine(),I=i.rootNode(),N=e.rootNode&&e.rootNode(I)||I;i.on("pointerDown",s),e.stopOnInteraction||i.on("pointerUp",c),e.stopOnMouseEnter&&(w.add(N,"mouseenter",s),e.stopOnInteraction||w.add(N,"mouseleave",c)),w.add(y,"visibilitychange",(()=>{if("hidden"===y.visibilityState)return d();c()})),w.add(v,"pagehide",(n=>{n.persisted&&d()})),e.playOnInit&&l()},destroy:p,play:l,stop:d,reset:c}}t.globalOptions=void 0,module.exports=t;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react"),r=require("../embla-carousel-reactive-utils/embla-carousel-reactive-utils.esm.js"),t=require("../embla-carousel/embla-carousel.esm.js");function u(s={},a=[]){const c=e.useRef(s),l=e.useRef(a),[n,o]=e.useState(),[i,f]=e.useState(),b=e.useCallback((()=>{n&&n.reInit(c.current,l.current)}),[n]);return e.useEffect((()=>{if(r.canUseDOM()&&i){t.globalOptions=u.globalOptions;const e=t(i,c.current,l.current);return o(e),()=>e.destroy()}o(void 0)}),[i,o]),e.useEffect((()=>{r.areOptionsEqual(c.current,s)||(c.current=s,b())}),[s,b]),e.useEffect((()=>{r.arePluginsEqual(l.current,a)||(l.current=a,b())}),[a,b]),[f,n]}u.globalOptions=void 0,module.exports=u;
@@ -0,0 +1 @@
1
+ "use strict";function e(e){return function(e){return"[object Object]"===Object.prototype.toString.call(e)}(e)||Array.isArray(e)}function t(n,r){const o=Object.keys(n),i=Object.keys(r);if(o.length!==i.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const i=n[o],s=r[o];return"function"==typeof i?`${i}`==`${s}`:e(i)&&e(s)?t(i,s):i===s}))}function n(e){return e.concat().sort(((e,t)=>e.name>t.name?1:-1)).map((e=>e.options))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.areOptionsEqual=t,exports.arePluginsEqual=function(e,r){if(e.length!==r.length)return!1;const o=n(e),i=n(r);return o.every(((e,n)=>t(e,i[n])))},exports.canUseDOM=function(){return!("undefined"==typeof window||!window.document||!window.document.createElement)},exports.sortAndMapPluginToOptions=n;
@@ -0,0 +1,17 @@
1
+ import { type HTMLAttributes, type PropsWithChildren } from "react";
2
+ export interface CarouselProps extends HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * A helper state to control video autoplay.
5
+ * If the first slide is a video (has a key containing the word "video"), this prop will be set to true automatically.
6
+ */
7
+ isVideoPlaying?: boolean;
8
+ /**
9
+ * A helper state to control video autoplay.
10
+ */
11
+ setVideoPlaying?: (arg0: boolean) => void;
12
+ }
13
+ /**
14
+ * Carousel component. Uses React Embla Carousel under the hood.
15
+ */
16
+ declare const Carousel: ({ isVideoPlaying, setVideoPlaying, className, children, ...props }: PropsWithChildren<CarouselProps>) => JSX.Element;
17
+ export default Carousel;
@@ -0,0 +1 @@
1
+ import{__rest as e,__assign as t}from"../_virtual/_tslib.js";import o,{useCallback as a,useEffect as l}from"react";import n from"clsx";import r from"../node_modules/embla-carousel-react/embla-carousel-react.esm.js";import{useDotButton as i,DotButton as s}from"./CarouselDotButton.js";import c from"../node_modules/embla-carousel-autoplay/embla-carousel-autoplay.esm.js";import m from"./Carousel.module.css.js";var u=function(u){var d=u.isVideoPlaying,p=u.setVideoPlaying,f=u.className,v=u.children,y=e(u,["isVideoPlaying","setVideoPlaying","className","children"]),g=r({align:"start",loop:!0},[c({delay:8e3,stopOnInteraction:!0})]),N=g[0],C=g[1],b=a((function(e){var t=e.plugins().autoplay;t&&!1!==t.options.stopOnInteraction&&t.stop()}),[]),j=i(C,b),E=j.selectedIndex,V=j.scrollSnaps,h=j.onDotButtonClick;return l((function(){if(C){var e=C.plugins().autoplay;e&&(d?e.stop():e.play())}}),[C,d]),l((function(){C&&"function"==typeof p&&(String(Object(o.Children.toArray(v)[null==C?void 0:C.slidesInView(!0)[0]]).key).indexOf("video")>0?p(!0):p(!1))}),[C,null==C?void 0:C.slidesInView,v,p]),o.createElement("div",t({className:n(m.carousel,f)},y),o.createElement("div",{className:m.viewport,ref:N},o.createElement("div",{className:m.container},o.Children.map(v,(function(e,t){return o.createElement("div",{className:m.slide,key:t},e)})))),o.Children.count(v)>1&&o.createElement("div",{className:m.dots},V.map((function(e,t){var a;return o.createElement(s,{key:t,onClick:function(){return h(t)},className:n(m.dot,(a={},a[m.dotSelected]=t===E,a))})}))))};export{u as default};
@@ -0,0 +1 @@
1
+ var e={carousel:"lds-carousel",viewport:"lds-carousel--viewport",container:"lds-carousel--container",slide:"lds-carousel--slide",dots:"lds-carousel--dots",dot:"lds-carousel--dot",dotSelected:"lds-carousel--dot-selected"};export{e as default};
@@ -0,0 +1,11 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ import { type EmblaCarouselType } from "embla-carousel-react";
3
+ declare type UseDotButtonType = {
4
+ selectedIndex: number;
5
+ scrollSnaps: number[];
6
+ onDotButtonClick: (index: number) => void;
7
+ };
8
+ export declare const useDotButton: (emblaApi: EmblaCarouselType | undefined, onButtonClick?: ((emblaApi: EmblaCarouselType) => void) | undefined) => UseDotButtonType;
9
+ declare type PropType = PropsWithChildren<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>>;
10
+ export declare const DotButton: React.FC<PropType>;
11
+ export {};
@@ -0,0 +1 @@
1
+ import{__rest as n,__assign as t}from"../_virtual/_tslib.js";import o,{useState as r,useCallback as e,useEffect as c}from"react";var l=function(n,t){var o=r(0),l=o[0],i=o[1],u=r([]),s=u[0],a=u[1],f=e((function(o){n&&(n.scrollTo(o),t&&t(n))}),[n,t]),p=e((function(n){a(n.scrollSnapList())}),[]),d=e((function(n){i(n.selectedScrollSnap())}),[]);return c((function(){n&&(p(n),d(n),n.on("reInit",p),n.on("reInit",d),n.on("select",d))}),[n,p,d]),{selectedIndex:l,scrollSnaps:s,onDotButtonClick:f}},i=function(r){var e=r.children,c=n(r,["children"]);return o.createElement("button",t({type:"button"},c),e)};export{i as DotButton,l as useDotButton};
@@ -0,0 +1 @@
1
+ var r=function(){return r=Object.assign||function(r){for(var t,e=1,n=arguments.length;e<n;e++)for(var o in t=arguments[e])Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o]);return r},r.apply(this,arguments)};function t(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(r);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(e[n[o]]=r[n[o]])}return e}export{r as __assign,t as __rest};
@@ -0,0 +1 @@
1
+ :root{--spacing-carousel-dot-padding:0.1125rem;--spacing-carousel-slide-width:100%;--opacity-carousel-dot-inactive:0.5;--opacity-carousel-dot-active:1;--spacing-carousel-dot-size:var(--spacing-lg);--spacing-carousel-dots-margin-top:var(--spacing-sm);--spacing-carousel-container-margin-bottom:var(--spacing-xs);--spacing-carousel-margin-bottom:var(--spacing-3xl);--color-background-carousel-dot:var(--alias-color-background-highlight-25)}.lds-carousel{--slide-spacing:1rem;margin-bottom:var(--spacing-carousel-margin-bottom)}.lds-carousel--viewport{overflow:hidden}.lds-carousel--container{backface-visibility:hidden;display:flex;margin-bottom:var(--spacing-carousel-container-margin-bottom);margin-left:calc(var(--slide-spacing)*-1);touch-action:pan-y}.lds-carousel--slide{flex:0 0 var(--spacing-carousel-slide-width);min-width:0;padding-left:var(--slide-spacing);position:relative}.lds-carousel--dots{align-items:center;display:flex;justify-content:center;left:0;margin-top:var(--spacing-carousel-dots-margin-top);position:relative;right:0;z-index:1}.lds-carousel--dot{align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;cursor:pointer;display:inline-flex;display:flex;height:var(--spacing-carousel-dot-size);margin:0;padding:0;padding:var(--spacing-carousel-dot-padding);text-decoration:none;touch-action:manipulation;width:var(--spacing-carousel-dot-size)}.lds-carousel--dot:after{background:var(--color-background-carousel-dot);border-radius:var(--spacing-carousel-dot-size);content:"";height:100%;opacity:var(--opacity-carousel-dot-inactive);width:100%}.lds-carousel--dot-selected:after{opacity:var(--opacity-carousel-dot-active)}
@@ -0,0 +1,2 @@
1
+ import "./tokens.css";
2
+ export { default as Carousel } from "./Carousel/Carousel";
@@ -0,0 +1 @@
1
+ export{default as Carousel}from"./Carousel/Carousel.js";
@@ -0,0 +1 @@
1
+ function n(n){return"number"==typeof n}function t(n){return"string"==typeof n}function e(n){return"boolean"==typeof n}function r(n){return"[object Object]"===Object.prototype.toString.call(n)}function o(n){return Math.abs(n)}function i(n){return Math.sign(n)}function c(n,t){return o(n-t)}function u(n){return d(n).map(Number)}function s(n){return n[a(n)]}function a(n){return Math.max(0,n.length-1)}function d(n){return Object.keys(n)}function l(n,t){return[n,t].reduce(((n,t)=>(d(t).forEach((e=>{const o=n[e],i=t[e],c=r(o)&&r(i);n[e]=c?l(o,i):i})),n)),{})}function f(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function p(t,e){const r={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return e-n}return{measure:function(o){return n(t)?e*Number(t):r[t](o)}}}function m(n,t){const e=o(n-t);function r(t){return t<n}function i(n){return n>t}function c(n){return r(n)||i(n)}return{length:e,max:t,min:n,constrain:function(e){return c(e)?r(e)?n:t:e},reachedAny:c,reachedMax:i,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function g(n,t,e){const{constrain:r}=m(0,n),i=n+1;let c=u(t);function u(n){return e?o((i+n)%i):r(n)}function s(){return c}function a(){return g(n,s(),e)}const d={get:s,set:function(n){return c=u(n),d},add:function(n){return a().set(s()+n)},clone:a};return d}function h(){let n=[];const t={add:function(e,r,o,i={passive:!0}){return e.addEventListener(r,o,i),n.push((()=>e.removeEventListener(r,o,i))),t},clear:function(){n=n.filter((n=>n()))}};return t}function x(n,t,r,u,s,a,d,l,p,g,x,y,v,S,b,w,E,D,M){const{cross:A}=n,L=["INPUT","SELECT","TEXTAREA"],O={passive:!1},I=h(),P=h(),F=m(50,225).constrain(b.measure(20)),T={mouse:300,touch:400},z={mouse:500,touch:600},B=w?43:25;let k=!1,H=0,R=0,N=!1,V=!1,C=!1,j=!1;function q(n){const e=d.readPoint(n),r=d.readPoint(n,A),o=c(e,H),i=c(r,R);if(!V&&!j){if(!n.cancelable)return U(n);if(V=o>i,!V)return U(n)}const u=d.pointerMove(n);o>E&&(C=!0),x.useFriction(.3).useDuration(1),p.start(),a.add(t.apply(u)),n.preventDefault()}function U(n){const e=y.byDistance(0,!1).index!==v.get(),r=d.pointerUp(n)*(w?z:T)[j?"mouse":"touch"],u=function(n,t){const e=v.add(-1*i(n)),r=y.byDistance(n,!w).distance;return w||o(n)<F?r:D&&t?.5*r:y.byIndex(e.get(),0).distance}(t.apply(r),e),s=function(n,t){if(0===n||0===t)return 0;if(o(n)<=o(t))return 0;const e=c(o(n),o(t));return o(e/n)}(r,u),a=B-10*s,l=M+s/50;V=!1,N=!1,P.clear(),x.useDuration(a).useFriction(l),g.distance(u,!w),j=!1,S.emit("pointerUp")}function W(n){C&&(n.stopPropagation(),n.preventDefault())}return{init:function(n,t){if(!t)return;function o(o){(e(t)||t(n,o))&&function(n){const t=f(n,s);if(j=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return L.includes(t)}(n.target))return;C=w&&t&&!n.buttons&&k,k=c(a.get(),l.get())>=2,N=!0,d.pointerDown(n),x.useFriction(0).useDuration(0),a.set(l),function(){const n=j?u:r;P.add(n,"touchmove",q,O).add(n,"touchend",U).add(n,"mousemove",q,O).add(n,"mouseup",U)}(),H=d.readPoint(n),R=d.readPoint(n,A),S.emit("pointerDown")}(o)}const i=r;I.add(i,"dragstart",(n=>n.preventDefault()),O).add(i,"touchmove",(()=>{}),O).add(i,"touchend",(()=>{})).add(i,"touchstart",o).add(i,"mousedown",o).add(i,"touchcancel",U).add(i,"contextmenu",U).add(i,"click",W,!0)},pointerDown:function(){return N},destroy:function(){I.clear(),P.clear()}}}function y(n,t){let e,r;function i(n){return n.timeStamp}function c(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(f(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,c(n)},pointerMove:function(n){const t=c(n)-c(r),o=i(n)-i(e)>170;return r=n,o&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=c(r)-c(e),u=i(n)-i(e),s=i(n)-i(r)>170,a=t/u;return u&&!s&&o(a)>.1?a:0},readPoint:c}}function v(n,t,r,o,i){let c,u,s=[],a=!1;function d(n){return i.measureSize(n.getBoundingClientRect())}return{init:function(i,l){if(!l)return;u=d(n),s=o.map(d),c=new ResizeObserver((c=>{a||(e(l)||l(i,c))&&function(e){for(const c of e){const e=c.target===n,a=o.indexOf(c.target);if((e?u:s[a])!==d(e?n:o[a])){r.requestAnimationFrame((()=>{i.reInit(),t.emit("resize")}));break}}}(c)})),[n].concat(o).forEach((n=>c.observe(n)))},destroy:function(){c&&c.disconnect(),a=!0}}}function S(n,t,e,r,i){const c=i.measure(10),u=i.measure(50),s=m(.1,.99);let a=!1;return{constrain:function(i){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const d=n.reachedMin(t.get())?"min":"max",l=o(n[d]-t.get()),f=e.get()-t.get(),p=s.constrain(l/u);e.subtract(f*p),!i&&o(f)<c&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function b(n,t,e,r){const o=m(-t+n,e[0]),i=e.map(o.constrain).map((n=>parseFloat(n.toFixed(3))));return{snapsContained:function(){if(t<=n)return[o.max];if("keepSnaps"===r)return i;const{min:e,max:c}=function(){const n=i[0],t=s(i),e=i.lastIndexOf(n),r=i.indexOf(t)+1;return m(e,r)}();return i.slice(e,c)}()}}function w(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=m(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function E(n){const{max:t,length:e}=n;return{get:function(n){return(n-t)/-e}}}function D(n,t,e,r,c){const{reachedAny:u,removeOffset:s,constrain:a}=r;function d(n){return n.concat().sort(((n,t)=>o(n)-o(t)))[0]}function l(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return d(o);return d(o.filter((n=>i(n)===r)))}return{byDistance:function(e,r){const i=c.get()+e,{index:d,distance:f}=function(e){const r=n?s(e):a(e),i=t.map((n=>n-r)).map((n=>l(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>o(n.diff)-o(t.diff))),{index:c}=i[0];return{index:c,distance:r}}(i),p=!n&&u(i);return!r||p?{index:d,distance:e}:{index:d,distance:e+l(t[d]-f,0)}},byIndex:function(n,e){return{index:n,distance:l(t[n]-c.get(),e)}},shortcut:l}}function M(t){let e=t;function r(t){return n(t)?t:t.get()}return{get:function(){return e},set:function(n){e=r(n)},add:function(n){e+=r(n)},subtract:function(n){e-=r(n)}}}function A(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function L(n,t,e,r,o,i,c,s,a){const d=u(o),l=u(o).reverse(),f=function(){const n=i[0]-1;return g(m(l,n),"end")}().concat(function(){const n=e-i[0]-1;return g(m(d,n),"start")}());function p(n,t){return n.reduce(((n,t)=>n-o[t]),t)}function m(n,t){return n.reduce(((n,e)=>p(n,t)>0?n.concat([e]):n),[])}function g(e,o){const i="start"===o,u=i?-r:r,d=c.findSlideBounds([u]);return e.map((e=>{const o=i?0:-r,c=i?r:0,u=d.filter((n=>n.index===e))[0][i?"end":"start"];return{index:e,slideLocation:M(-1),translate:A(n,t,a[e]),target:()=>s.get()>u?o:c}}))}return{canLoop:function(){return f.every((({index:n})=>p(d.filter((t=>t!==n)),e)<=.1))},clear:function(){f.forEach((n=>n.translate.clear()))},loop:function(){f.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:f}}function O(n,t){let r,o=!1;return{init:function(i,c){c&&(r=new MutationObserver((n=>{o||(e(c)||c(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function I(n,t,e,r,o,i,c){const{removeOffset:u,constrain:s}=o,a=.5,d=i?[0,t,-t]:[0],l=f(d,c);function f(t,o){const i=t||d,c=function(n){const t=n||0;return e.map((n=>m(a,n-a).constrain(n*t)))}(o);return i.reduce(((t,o)=>{const i=r.map(((t,r)=>({start:t-e[r]+c[r]+o,end:t+n-c[r]+o,index:r})));return t.concat(i)}),[])}return{check:function(n,t){const e=i?u(n):s(n);return(t||l).reduce(((n,t)=>{const{index:r,start:o,end:i}=t;return!n.includes(r)&&(o<e&&i>e)?n.concat([r]):n}),[])},findSlideBounds:f}}function P(t,e,r){const o=n(r);return{groupSlides:function(n){return o?function(n,t){return u(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,r):function(n){return u(n).reduce(((n,r)=>{const o=e.slice(s(n),r+1).reduce(((n,t)=>n+t),0);return!r||o>t?n.concat(r):n}),[]).map(((t,e,r)=>n.slice(t,r[e+1])))}(n)}}}function F(n,t,e,r,c,d,l,f){const{align:F,axis:T,direction:z,startIndex:B,inViewThreshold:k,loop:H,duration:R,dragFree:N,dragThreshold:V,slidesToScroll:C,skipSnaps:j,containScroll:q}=d,U=t.getBoundingClientRect(),W=e.map((n=>n.getBoundingClientRect())),$=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(z),G=function(n,t){const e="y"===n?"y":"x";return{scroll:e,cross:"y"===n?"x":"y",startEdge:"y"===e?"top":"rtl"===t?"right":"left",endEdge:"y"===e?"bottom":"rtl"===t?"left":"right",measureSize:function(n){const{width:t,height:r}=n;return"x"===e?t:r}}}(T,z),Q=G.measureSize(U),X=function(n){return{measure:function(t){return n*(t/100)}}}(Q),Y=p(F,Q),J=!H&&!!q,K=H||!!q,{slideSizes:Z,slideSizesWithGaps:_}=function(n,t,e,r,i,c){const{measureSize:u,startEdge:d,endEdge:l}=n,f=e[0]&&i,p=function(){if(!f)return 0;const n=e[0];return o(t[d]-n[d])}(),m=function(){if(!f)return 0;const n=c.getComputedStyle(s(r));return parseFloat(n.getPropertyValue(`margin-${l}`))}(),g=e.map(u),h=e.map(((n,t,e)=>{const r=!t,o=t===a(e);return r?g[t]+p:o?g[t]+m:e[t+1][d]-n[d]})).map(o);return{slideSizes:g,slideSizesWithGaps:h}}(G,U,W,e,K,c),nn=P(Q,_,C),{snaps:tn,snapsAligned:en}=function(n,t,e,r,i,c,u){const{startEdge:d,endEdge:l}=n,{groupSlides:f}=c,p=f(r).map((n=>s(n)[l]-n[0][d])).map(o).map(t.measure),m=r.map((n=>e[d]-n[d])).map((n=>-o(n))),g=function(){const n=s(m)-s(i);return f(m).map((n=>n[0])).map(((t,e,r)=>{const o=!e,i=e===a(r);return u&&o?0:u&&i?n:t+p[e]}))}();return{snaps:m,snapsAligned:g}}(G,Y,U,W,_,nn,J),rn=-s(tn)+s(_),{snapsContained:on}=b(Q,rn,en,q),cn=J?on:en,{limit:un}=function(n,t,e){const r=t[0];return{limit:m(e?r-n:s(t),r)}}(rn,cn,H),sn=g(a(cn),B,H),an=sn.clone(),dn=u(e),ln={start:()=>f.start(Sn),stop:()=>f.stop(Sn),update:()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,eventHandler:r,animation:o,options:{loop:i}})=>{const c=n.pointerDown();i||e.constrain(c);const u=t.seek().settled();u&&!c&&(o.stop(),r.emit("settle")),u||r.emit("scroll")})(Sn),render:n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,options:{loop:c}},u)=>{const s=n.velocity();r.set(e.get()-s+s*u),c&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Sn,n)},fn=cn[sn.get()],pn=M(fn),mn=M(fn),gn=M(fn),hn=function(n,t,e,r){let c=!0,u=0,s=0,a=e,d=r,l=n.get(),f=0;function p(n){return a=n,g}function m(n){return d=n,g}const g={direction:function(){return s},duration:function(){return a},velocity:function(){return u},seek:function(){const e=t.get()-n.get();let r=0;return a?(u+=e/a,u*=d,l+=u,n.add(u),r=l-f):(u=0,n.set(t),r=e),s=i(r),f=l,c=o(e)<.001,g},settled:function(){return c},useBaseFriction:function(){return m(r)},useBaseDuration:function(){return p(e)},useFriction:m,useDuration:p};return g}(pn,gn,R,.68),xn=D(H,cn,rn,un,gn),yn=function(n,t,e,r,o,i,c){function u(r){const u=r.distance,s=r.index!==t.get();i.add(u),u&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(r.index),c.emit("select"))}return{distance:function(n,t){u(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);u(r.byIndex(o.get(),e))}}}(ln,sn,an,xn,hn,gn,l),vn=I(Q,rn,Z,tn,un,H,k),Sn={ownerDocument:r,ownerWindow:c,eventHandler:l,containerRect:U,slideRects:W,animation:ln,axis:G,direction:$,dragHandler:x(G,$,n,r,c,gn,y(G,c),pn,ln,yn,hn,xn,sn,l,X,N,V,j,.68),eventStore:h(),percentOfView:X,index:sn,indexPrevious:an,limit:un,location:pn,offsetLocation:mn,options:d,resizeHandler:v(t,l,c,e,G),scrollBody:hn,scrollBounds:S(un,pn,gn,hn,X),scrollLooper:w(rn,un,mn,[pn,mn,gn]),scrollProgress:E(un),scrollSnaps:cn,scrollTarget:xn,scrollTo:yn,slideLooper:L(G,$,Q,rn,_,cn,vn,mn,e),slidesHandler:O(t,l),slidesInView:vn,slideIndexes:dn,slidesToScroll:nn,target:gn,translate:A(G,$,t)};return Sn}const T={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function z(n){function t(n,t){return l(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=d(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>d(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function B(n,e,r){const i=n.ownerDocument,c=i.defaultView,u=z(c),s=function(n){let t=[];return{init:function(e,r){return t=e.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(r,n))),e.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(u),a=h(),d=h(),l=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{animationRealms:f}=B,{mergeOptions:p,optionsAtMedia:m,optionsMediaQueries:g}=u,{on:x,off:y,emit:v}=l,S=k;let b,w,E,D,M=!1,A=p(T,B.globalOptions),L=p(A),O=[];function I(t,e){const r=F(n,E,D,i,c,t,l,e);if(t.loop&&!r.slideLooper.canLoop()){return I(Object.assign({},t,{loop:!1}),e)}return r}function P(e,r){if(M)return;const u=f.find((n=>n.window===c)),l=u||function(n){const t=1e3/60;let e=[],r=null,i=0,c=0;function u(s){r||(r=s);const a=s-r;for(r=s,i+=a;i>=t;)e.forEach((({animation:n})=>n.update())),i-=t;const d=o(i/t);e.forEach((({animation:n})=>n.render(d))),c&&n.requestAnimationFrame(u)}return{start:function(t){e.includes(t)||e.push(t),c||(c=n.requestAnimationFrame(u))},stop:function(t){e=e.filter((n=>n!==t)),e.length||(n.cancelAnimationFrame(c),r=null,i=0,c=0)},reset:function(){r=null,i=0},window:n}}(c);u||f.push(l),A=p(A,e),L=m(A),O=r||O,function(){const{container:e,slides:r}=L,o=t(e)?n.querySelector(e):e;E=o||n.children[0];const i=t(r)?E.querySelectorAll(r):r;D=[].slice.call(i||E.children)}(),b=I(L,l),g([A,...O.map((({options:n})=>n))]).forEach((n=>a.add(n,"change",k))),L.active&&(b.translate.to(b.location.get()),b.eventHandler.init(C),b.resizeHandler.init(C,L.watchResize),b.slidesHandler.init(C,L.watchSlides),d.add(i,"visibilitychange",(()=>{i.hidden&&l.reset()})),b.options.loop&&b.slideLooper.loop(),E.offsetParent&&D.length&&b.dragHandler.init(C,L.watchDrag),w=s.init(O,C))}function k(n,t){const e=V();H(),P(p({startIndex:e},n),t),l.emit("reInit")}function H(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),s.destroy(),a.clear(),d.clear()}function R(n){const t=b[n?"target":"location"].get(),e=L.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[e](t))}function N(n,t,e){L.active&&!M&&(b.scrollBody.useBaseFriction().useDuration(t?0:L.duration),b.scrollTo.index(n,e||0))}function V(){return b.index.get()}const C={canScrollNext:function(){return b.index.add(1).get()!==V()},canScrollPrev:function(){return b.index.add(-1).get()!==V()},containerNode:function(){return E},internalEngine:function(){return b},destroy:function(){M||(M=!0,a.clear(),H(),l.emit("destroy"))},off:y,on:x,emit:v,plugins:function(){return w},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:S,rootNode:function(){return n},scrollNext:function(n){N(b.index.add(1).get(),!0===n,-1)},scrollPrev:function(n){N(b.index.add(-1).get(),!0===n,1)},scrollProgress:function(){return b.scrollProgress.get(b.location.get())},scrollSnapList:function(){return b.scrollSnaps.map(b.scrollProgress.get)},scrollTo:N,selectedScrollSnap:V,slideNodes:function(){return D},slidesInView:R,slidesNotInView:function(n){const t=R(n);return b.slideIndexes.filter((n=>!t.includes(n)))}};return P(e,r),setTimeout((()=>l.emit("init")),0),C}B.animationRealms=[],B.globalOptions=void 0;export{B as default};
@@ -0,0 +1 @@
1
+ const n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function t(o={}){let e,i,r,s=0,a=!1;function p(){i.off("pointerDown",r),e.stopOnInteraction||i.off("pointerUp",c),d(),s=0}function l(n){d(),void 0!==n&&(a=n),s=window.setTimeout(u,e.delay)}function d(){s&&window.clearTimeout(s)}function c(){s&&(d(),l())}function u(){const{index:n}=i.internalEngine(),t=i.scrollSnapList().length-1;if(e.stopOnLastSnap&&n.get()===t)return p();i.canScrollNext()?i.scrollNext(a):i.scrollTo(0,a),l()}return{name:"autoplay",options:o,init:function(s,u){i=s;const{mergeOptions:f,optionsAtMedia:O}=u,g=f(n,t.globalOptions),m=f(g,o);e=O(m),a=e.jump,r=e.stopOnInteraction?p:d;const{eventStore:w,ownerDocument:y,ownerWindow:v}=i.internalEngine(),I=i.rootNode(),N=e.rootNode&&e.rootNode(I)||I;i.on("pointerDown",r),e.stopOnInteraction||i.on("pointerUp",c),e.stopOnMouseEnter&&(w.add(N,"mouseenter",r),e.stopOnInteraction||w.add(N,"mouseleave",c)),w.add(y,"visibilitychange",(()=>{if("hidden"===y.visibilityState)return d();c()})),w.add(v,"pagehide",(n=>{n.persisted&&d()})),e.playOnInit&&l()},destroy:p,play:l,stop:d,reset:c}}t.globalOptions=void 0;export{t as default};
@@ -0,0 +1 @@
1
+ import{useRef as r,useState as e,useCallback as t,useEffect as o}from"react";import{canUseDOM as c,areOptionsEqual as n,arePluginsEqual as u}from"../embla-carousel-reactive-utils/embla-carousel-reactive-utils.esm.js";import l from"../embla-carousel/embla-carousel.esm.js";function s(a={},i=[]){const m=r(a),b=r(i),[p,f]=e(),[d,v]=e(),g=t((()=>{p&&p.reInit(m.current,b.current)}),[p]);return o((()=>{if(c()&&d){l.globalOptions=s.globalOptions;const r=l(d,m.current,b.current);return f(r),()=>r.destroy()}f(void 0)}),[d,f]),o((()=>{n(m.current,a)||(m.current=a,g())}),[a,g]),o((()=>{u(b.current,i)||(b.current=i,g())}),[i,g]),[v,p]}s.globalOptions=void 0;export{s as default};
@@ -0,0 +1 @@
1
+ function t(t){return function(t){return"[object Object]"===Object.prototype.toString.call(t)}(t)||Array.isArray(t)}function n(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function e(n,r){const o=Object.keys(n),c=Object.keys(r);if(o.length!==c.length)return!1;return JSON.stringify(Object.keys(n.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const c=n[o],i=r[o];return"function"==typeof c?`${c}`==`${i}`:t(c)&&t(i)?e(c,i):c===i}))}function r(t){return t.concat().sort(((t,n)=>t.name>n.name?1:-1)).map((t=>t.options))}function o(t,n){if(t.length!==n.length)return!1;const o=r(t),c=r(n);return o.every(((t,n)=>e(t,c[n])))}export{e as areOptionsEqual,o as arePluginsEqual,n as canUseDOM,r as sortAndMapPluginToOptions};
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@k8slens/lds-carousel",
3
+ "version": "0.1.0",
4
+ "description": "Lens Design System – React Carousel component",
5
+ "author": "Mirantis Inc",
6
+ "license": "MIT",
7
+ "private": false,
8
+ "publishConfig": {
9
+ "access": "public",
10
+ "registry": "https://registry.npmjs.org/"
11
+ },
12
+ "sideEffects": false,
13
+ "main": "./lib/cjs/index.js",
14
+ "module": "./lib/es/index.js",
15
+ "types": "./lib/es/index.d.ts",
16
+ "type": "module",
17
+ "files": [
18
+ "lib/"
19
+ ],
20
+ "scripts": {
21
+ "start": "npm run rollup-watch",
22
+ "build": "npm run clean && npm run rollup",
23
+ "rollup-watch": "rollup -c --watch --waitForBundleInput",
24
+ "rollup": "rollup -c",
25
+ "clean": "rimraf lib",
26
+ "test": "echo \"Warning: no test specified yet\" && exit 0",
27
+ "lint": "eslint .",
28
+ "format": "eslint --fix ."
29
+ },
30
+ "dependencies": {
31
+ "@k8slens/lds": "^0.35.0",
32
+ "embla-carousel-autoplay": "8.0.0-rc11",
33
+ "embla-carousel-react": "8.0.0-rc11"
34
+ },
35
+ "devDependencies": {
36
+ "@k8slens/lds-tokens": "^0.36.0",
37
+ "@rollup/plugin-node-resolve": "15.0.2",
38
+ "@storybook/react": "6.5.16",
39
+ "@testing-library/react": "14.0.0"
40
+ },
41
+ "peerDependencies": {
42
+ "@types/react": "^18.2.0",
43
+ "@types/react-dom": "^18.2.1",
44
+ "clsx": "^1.2.1",
45
+ "react": "^18.2.0",
46
+ "react-dom": "^18.2.0"
47
+ },
48
+ "jest": {
49
+ "testEnvironment": "jsdom",
50
+ "transform": {
51
+ "^.+\\.(ts|tsx|js|jsx)$": "ts-jest"
52
+ },
53
+ "moduleNameMapper": {
54
+ "\\.(css|less)$": "<rootDir>/../../__mocks__/CSSStub.js",
55
+ "\\.svg": "<rootDir>/../../__mocks__/SVGStub.js"
56
+ }
57
+ },
58
+ "gitHead": "c392d8cc898fe2f03ce75a3499fba092b2dbb885"
59
+ }