New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/stepper

Package Overview
Dependencies
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/stepper - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

14

CHANGELOG.md
# @leafygreen-ui/stepper
## 3.0.2
### Patch Changes
- 96d1ff9c: Updates to propTypes, TSDocs, and Storybook controls
- Updated dependencies [6a89bc29]
- Updated dependencies [fd2f6de0]
- Updated dependencies [96d1ff9c]
- Updated dependencies [422dbfcd]
- Updated dependencies [9ff90d4b]
- @leafygreen-ui/palette@3.4.0
- @leafygreen-ui/typography@11.0.2
- @leafygreen-ui/lib@9.3.0
## 3.0.1

@@ -4,0 +18,0 @@

2

dist/esm/index.js

@@ -1,2 +0,2 @@

import e,{useState as n,useEffect as t,useContext as r,createContext as o}from"react";import{css as i,cx as l}from"@leafygreen-ui/emotion";import a from"@leafygreen-ui/icon/dist/Checkmark";import c from"@leafygreen-ui/icon/dist/Ellipsis";import{palette as d}from"@leafygreen-ui/palette";import{spacing as u}from"@leafygreen-ui/tokens";import{Overline as s,Body as p}from"@leafygreen-ui/typography";import{jsx as g}from"@emotion/react";import{createUniqueClassName as m}from"@leafygreen-ui/lib";import f,{Align as h,Justify as b}from"@leafygreen-ui/tooltip";function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function x(){return x=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},x.apply(this,arguments)}function v(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function k(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function C(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],l=!0,a=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==t.return||t.return()}finally{if(a)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return M(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var w,O="light",S="dark";!function(e){e.CompletedMultiple="completed-multiple",e.Completed="completed",e.Current="current",e.Upcoming="upcoming",e.UpcomingMultiple="upcoming-multiple"}(w||(w={}));var D,j,z,U,I,N,A,L,T,P,E,F,$,q,B,G,H,J,K,Q,R,V,W,X=o({}),Y=function(){return r(X)},Z=function(e){var r=e.darkMode,o=e.children,i=C(n(r),2),l=i[0],a=i[1];return t((function(){a(r)}),[r]),g(X.Provider,{value:{isDarkMode:l,setIsDarkMode:a}},o)},_=m(),ee=m(),ne=["state","size"],te=function(e){var n=e.state,t=e.content;return n===w.Completed?g(a,null):n===w.UpcomingMultiple||n===w.CompletedMultiple?g(c,null):g(s,{className:i(D||(D=k(["\n font-weight: 500;\n color: inherit;\n "])))},t)},re=i(j||(j=k(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),d.white,d.green.dark1,d.green.dark1),oe=i(z||(z=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),d.green.dark2,d.white,d.green.dark1),ie=i(U||(U=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),d.gray.dark1,d.white,d.gray.dark1),le=i(I||(I=k(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),d.black,d.green.base,d.green.base),ae=i(N||(N=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),d.green.base,d.black,d.green.base),ce=i(A||(A=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),d.gray.light1,d.black,d.gray.light1),de=(y(P={},S,(y(L={},w.CompletedMultiple,le),y(L,w.Completed,le),y(L,w.Current,ae),y(L,w.Upcoming,ce),y(L,w.UpcomingMultiple,ce),L)),y(P,O,(y(T={},w.CompletedMultiple,re),y(T,w.Completed,re),y(T,w.Current,oe),y(T,w.Upcoming,ie),y(T,w.UpcomingMultiple,ie),T)),P),ue=function(e){var n=e.state,t=e.size,r=v(e,ne),o=Y().isDarkMode,a=i(E||(E=k(["\n width: ","px;\n height: ","px;\n box-sizing: content-box;\n margin-bottom: ","px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid;\n // TODO: use centralized transition prop\n transition: 0.3s box-shadow ease;\n z-index: 1;\n\n svg {\n width: 100%;\n }\n "])),t,t,u[1]);return g("div",{className:l(ee,a,de[o?S:O][n])},g(te,x({state:n},r)))},se=function(e){var n,t=e.children,r=e.state,o=r===w.Current,a=Y().isDarkMode,c=i(F||(F=k(["\n color: ",";\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n "])),a?d.green.base:d.green.dark2),u=i($||($=k(["\n color: ",";\n "])),a?d.green.base:d.green.dark2),s=i(q||(q=k(["\n color: ",";\n "])),a?d.white:d.green.dark3),m=i(B||(B=k(["\n color: ",";\n "])),a?d.gray.light1:d.gray.dark1),f=i(G||(G=k(["\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n color: ",";\n "])),a?d.gray.light1:d.gray.dark1),h=(y(n={},w.CompletedMultiple,c),y(n,w.Completed,u),y(n,w.Current,s),y(n,w.Upcoming,m),y(n,w.UpcomingMultiple,f),n);return g(p,{className:l(h[r],_),weight:o?"medium":"regular"},t)},pe=["children","index","state","ariaLabel","shouldDisplayLine","iconSize","className"],ge=function(e){var n,t=e.children,r=e.index,o=e.state,a=e.ariaLabel,c=void 0===a?"step".concat(r||""):a,s=e.shouldDisplayLine,p=void 0===s||s,m=e.iconSize,f=void 0===m?20:m,h=e.className,b=v(e,pe),C=Y().isDarkMode,M=o===w.Current,O=o===w.Completed||o===w.CompletedMultiple,S=i(H||(H=k(["\n display: flex;\n margin: auto;\n flex-direction: column;\n align-items: center;\n padding-bottom: ","px;\n position: relative; // for the :after line\n\n &:focus-visible {\n outline: none;\n ."," {\n // TODO: should use box-shadow utility for this.\n box-shadow: 0px 0px 0px 2px\n ",",\n 0px 0px 0px 4px ",";\n }\n }\n "])),u[1],ee,C?d.black:d.white,d.blue.light1),D=i(J||(J=k(["\n &:after {\n content: '';\n height: 1px;\n width: 100%;\n position: absolute;\n top: ","px;\n left: 50%;\n z-index: 0;\n background-color: ",";\n }\n "])),f/2,C?d.gray.light1:d.gray.base),j=i(K||(K=k(["\n &:after {\n background-color: ",";\n }\n "])),C?d.green.base:d.green.dark1);return g("div",x({className:l(S,(n={},y(n,D,p),y(n,j,O&&p),n),h),"aria-label":c,"aria-current":M&&"step"},b),g(ue,{state:o,content:r,size:f}),g(se,{state:o},t))},me=["state","children","tooltipContent","startingStepIndex"],fe=function(n){var t,r=n.state,o=n.children,l=n.tooltipContent,a=n.startingStepIndex,c=v(n,me),s=Y().isDarkMode,p=i(Q||(Q=k(["\n // TODO: this is an arbitrary value. It would be nice to have a separate component for <ol> that handles this spacing.\n padding-inline-start: ","px;\n "])),u[4]),m=i(R||(R=k(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),ee,s?d.green.dark1:d.green.light2),C=i(V||(V=k(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),ee,s?d.gray.dark2:d.gray.light2),M=(y(t={},w.CompletedMultiple,m),y(t,w.UpcomingMultiple,C),t);return g(f,{align:h.Top,justify:b.Middle,darkMode:s,trigger:g("li",null,g(ge,x({className:M[r],state:r,tabIndex:0},c),o))},g("div",null,g("ol",{className:p},e.Children.map(l,(function(e,n){return g("li",{value:a+n},e)})))))},he=["children","currentStep","maxDisplayedSteps","completedStepsShown","darkMode","className"],be=i(W||(W=k(["\n list-style: none;\n padding-inline-start: 0;\n width: 100%;\n display: flex;\n & > * {\n flex: 1;\n }\n"]))),ye=function(n){var t=n.children,r=n.currentStep,o=n.maxDisplayedSteps,i=void 0===o?Array.isArray(t)?t.length:1:o,a=n.completedStepsShown,c=void 0===a?1:a,d=n.darkMode,u=void 0!==d&&d,s=n.className,p=v(n,he),m=e.Children.count(t);i=Math.min(i,m);var f=e.Children.toArray(t),h=Math.min(Math.max(r-c,0),m-i),b=h+i,y=h>0,k=b<m;y&&h++,k&&b--;var C=function(e){return e+1===m},M=function(e,n){return 1===n-e?"Steps ".concat(e," and ").concat(n):"Steps ".concat(e," to ").concat(n)};return g(Z,{darkMode:u},g("ol",x({className:l(be,s),"aria-label":"progress"},p),y&&g(fe,{state:w.CompletedMultiple,startingStepIndex:1,shouldDisplayLine:i>1,tooltipContent:f.slice(0,h)},M(1,h)),e.Children.map(f.slice(h,b),(function(e,n){return g("li",null,g(ge,{state:(t=h+n,t<r?w.Completed:t===r?w.Current:w.Upcoming),shouldDisplayLine:!C(h+n),index:h+n+1},e));var t})),k&&g(fe,{state:w.UpcomingMultiple,startingStepIndex:b+1,shouldDisplayLine:!1,tooltipContent:f.slice(b,m)},M(b+1,m))))},xe=e.Fragment;export{xe as Step,ye as default};
import e,{useState as n,useEffect as t,useContext as r,createContext as o}from"react";import i from"prop-types";import{css as a,cx as l}from"@leafygreen-ui/emotion";import c from"@leafygreen-ui/icon/dist/Checkmark";import d from"@leafygreen-ui/icon/dist/Ellipsis";import{palette as p}from"@leafygreen-ui/palette";import{spacing as u}from"@leafygreen-ui/tokens";import{Overline as s,Body as m}from"@leafygreen-ui/typography";import{jsx as g}from"@emotion/react";import{createUniqueClassName as f}from"@leafygreen-ui/lib";import h,{Align as b,Justify as y}from"@leafygreen-ui/tooltip";function x(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function v(){return v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},v.apply(this,arguments)}function k(e,n){if(null==e)return{};var t,r,o=function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function C(e,n){return n||(n=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(n)}}))}function w(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var r,o,i=[],a=!0,l=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(l)throw o}}return i}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return M(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return M(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var O,S="light",D="dark";!function(e){e.CompletedMultiple="completed-multiple",e.Completed="completed",e.Current="current",e.Upcoming="upcoming",e.UpcomingMultiple="upcoming-multiple"}(O||(O={}));var j,z,U,I,N,A,T,L,P,E,F,$,q,B,G,H,J,K,Q,R,V,W,X,Y=o({}),Z=function(){return r(Y)},_=function(e){var r=e.darkMode,o=e.children,i=w(n(r),2),a=i[0],l=i[1];return t((function(){l(r)}),[r]),g(Y.Provider,{value:{isDarkMode:a,setIsDarkMode:l}},o)},ee=f(),ne=f(),te=["state","size"],re=function(e){var n=e.state,t=e.content;return n===O.Completed?g(c,null):n===O.UpcomingMultiple||n===O.CompletedMultiple?g(d,null):g(s,{className:a(j||(j=C(["\n font-weight: 500;\n color: inherit;\n "])))},t)},oe=a(z||(z=C(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),p.white,p.green.dark1,p.green.dark1),ie=a(U||(U=C(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),p.green.dark2,p.white,p.green.dark1),ae=a(I||(I=C(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),p.gray.dark1,p.white,p.gray.dark1),le=a(N||(N=C(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),p.black,p.green.base,p.green.base),ce=a(A||(A=C(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),p.green.base,p.black,p.green.base),de=a(T||(T=C(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),p.gray.light1,p.black,p.gray.light1),pe=(x(E={},D,(x(L={},O.CompletedMultiple,le),x(L,O.Completed,le),x(L,O.Current,ce),x(L,O.Upcoming,de),x(L,O.UpcomingMultiple,de),L)),x(E,S,(x(P={},O.CompletedMultiple,oe),x(P,O.Completed,oe),x(P,O.Current,ie),x(P,O.Upcoming,ae),x(P,O.UpcomingMultiple,ae),P)),E),ue=function(e){var n=e.state,t=e.size,r=k(e,te),o=Z().isDarkMode,i=a(F||(F=C(["\n width: ","px;\n height: ","px;\n box-sizing: content-box;\n margin-bottom: ","px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid;\n // TODO: use centralized transition prop\n transition: 0.3s box-shadow ease;\n z-index: 1;\n\n svg {\n width: 100%;\n }\n "])),t,t,u[1]);return g("div",{className:l(ne,i,pe[o?D:S][n])},g(re,v({state:n},r)))},se=function(e){var n,t=e.children,r=e.state,o=r===O.Current,i=Z().isDarkMode,c=a($||($=C(["\n color: ",";\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n "])),i?p.green.base:p.green.dark2),d=a(q||(q=C(["\n color: ",";\n "])),i?p.green.base:p.green.dark2),u=a(B||(B=C(["\n color: ",";\n "])),i?p.white:p.green.dark3),s=a(G||(G=C(["\n color: ",";\n "])),i?p.gray.light1:p.gray.dark1),f=a(H||(H=C(["\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n color: ",";\n "])),i?p.gray.light1:p.gray.dark1),h=(x(n={},O.CompletedMultiple,c),x(n,O.Completed,d),x(n,O.Current,u),x(n,O.Upcoming,s),x(n,O.UpcomingMultiple,f),n);return g(m,{className:l(h[r],ee),weight:o?"medium":"regular"},t)},me=["children","index","state","ariaLabel","shouldDisplayLine","iconSize","className"],ge=function(e){var n,t=e.children,r=e.index,o=e.state,i=e.ariaLabel,c=void 0===i?"step".concat(r||""):i,d=e.shouldDisplayLine,s=void 0===d||d,m=e.iconSize,f=void 0===m?20:m,h=e.className,b=k(e,me),y=Z().isDarkMode,w=o===O.Current,M=o===O.Completed||o===O.CompletedMultiple,S=a(J||(J=C(["\n display: flex;\n margin: auto;\n flex-direction: column;\n align-items: center;\n padding-bottom: ","px;\n position: relative; // for the :after line\n\n &:focus-visible {\n outline: none;\n ."," {\n // TODO: should use box-shadow utility for this.\n box-shadow: 0px 0px 0px 2px\n ",",\n 0px 0px 0px 4px ",";\n }\n }\n "])),u[1],ne,y?p.black:p.white,p.blue.light1),D=a(K||(K=C(["\n &:after {\n content: '';\n height: 1px;\n width: 100%;\n position: absolute;\n top: ","px;\n left: 50%;\n z-index: 0;\n background-color: ",";\n }\n "])),f/2,y?p.gray.light1:p.gray.base),j=a(Q||(Q=C(["\n &:after {\n background-color: ",";\n }\n "])),y?p.green.base:p.green.dark1);return g("div",v({className:l(S,(n={},x(n,D,s),x(n,j,M&&s),n),h),"aria-label":c,"aria-current":w&&"step"},b),g(ue,{state:o,content:r,size:f}),g(se,{state:o},t))},fe=["state","children","tooltipContent","startingStepIndex"],he=function(n){var t,r=n.state,o=n.children,i=n.tooltipContent,l=n.startingStepIndex,c=k(n,fe),d=Z().isDarkMode,s=a(R||(R=C(["\n // TODO: this is an arbitrary value. It would be nice to have a separate component for <ol> that handles this spacing.\n padding-inline-start: ","px;\n "])),u[4]),m=a(V||(V=C(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),ne,d?p.green.dark1:p.green.light2),f=a(W||(W=C(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),ne,d?p.gray.dark2:p.gray.light2),w=(x(t={},O.CompletedMultiple,m),x(t,O.UpcomingMultiple,f),t);return g(h,{align:b.Top,justify:y.Middle,darkMode:d,trigger:g("li",null,g(ge,v({className:w[r],state:r,tabIndex:0},c),o))},g("div",null,g("ol",{className:s},e.Children.map(i,(function(e,n){return g("li",{value:l+n},e)})))))},be=["children","currentStep","maxDisplayedSteps","completedStepsShown","darkMode","className"],ye=a(X||(X=C(["\n list-style: none;\n padding-inline-start: 0;\n width: 100%;\n display: flex;\n & > * {\n flex: 1;\n }\n"]))),xe=function(n){var t=n.children,r=n.currentStep,o=n.maxDisplayedSteps,i=void 0===o?Array.isArray(t)?t.length:1:o,a=n.completedStepsShown,c=void 0===a?1:a,d=n.darkMode,p=void 0!==d&&d,u=n.className,s=k(n,be),m=e.Children.count(t);i=Math.min(i,m);var f=e.Children.toArray(t),h=Math.min(Math.max(r-c,0),m-i),b=h+i,y=h>0,x=b<m;y&&h++,x&&b--;var C=function(e){return e+1===m},w=function(e,n){return 1===n-e?"Steps ".concat(e," and ").concat(n):"Steps ".concat(e," to ").concat(n)};return g(_,{darkMode:p},g("ol",v({className:l(ye,u),"aria-label":"progress"},s),y&&g(he,{state:O.CompletedMultiple,startingStepIndex:1,shouldDisplayLine:i>1,tooltipContent:f.slice(0,h)},w(1,h)),e.Children.map(f.slice(h,b),(function(e,n){return g("li",null,g(ge,{state:(t=h+n,t<r?O.Completed:t===r?O.Current:O.Upcoming),shouldDisplayLine:!C(h+n),index:h+n+1},e));var t})),x&&g(he,{state:O.UpcomingMultiple,startingStepIndex:b+1,shouldDisplayLine:!1,tooltipContent:f.slice(b,m)},w(b+1,m))))};xe.propTypes={currentStep:i.number,maxDisplayedSteps:i.number,completedStepsShown:i.number};var ve=e.Fragment;export{ve as Step,xe as default};
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/icon/dist/Checkmark"),require("@leafygreen-ui/icon/dist/Ellipsis"),require("@leafygreen-ui/palette"),require("@leafygreen-ui/tokens"),require("@leafygreen-ui/typography"),require("@emotion/react"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/tooltip")):"function"==typeof define&&define.amd?define(["exports","react","@leafygreen-ui/emotion","@leafygreen-ui/icon/dist/Checkmark","@leafygreen-ui/icon/dist/Ellipsis","@leafygreen-ui/palette","@leafygreen-ui/tokens","@leafygreen-ui/typography","@emotion/react","@leafygreen-ui/lib","@leafygreen-ui/tooltip"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/stepper"]={},e.React,e["@leafygreen-ui/emotion"],e.Checkmark,e.Ellipsis,e["@leafygreen-ui/palette"],e["@leafygreen-ui/tokens"],e["@leafygreen-ui/typography"],e.react,e["@leafygreen-ui/lib"],e["@leafygreen-ui/tooltip"])}(this,(function(e,t,n,r,a,l,i,o,s,c,u){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=p(t),g=p(r),f=p(a),y=p(u);function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){return m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m.apply(this,arguments)}function h(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function b(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,l=[],i=!0,o=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==n.return||n.return()}finally{if(o)throw a}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j,C="light",M="dark";!function(e){e.CompletedMultiple="completed-multiple",e.Completed="completed",e.Current="current",e.Upcoming="upcoming",e.UpcomingMultiple="upcoming-multiple"}(j||(j={}));var w,O,S,D,U,z,N,q,I,A,T,L,P,E,_,B,F,J,R,$,G,H,K,Q=t.createContext({}),V=function(){return t.useContext(Q)},W=function(e){var n=e.darkMode,r=e.children,a=v(t.useState(n),2),l=a[0],i=a[1];return t.useEffect((function(){i(n)}),[n]),s.jsx(Q.Provider,{value:{isDarkMode:l,setIsDarkMode:i}},r)},X=c.createUniqueClassName(),Y=c.createUniqueClassName(),Z=["state","size"],ee=function(e){var t=e.state,r=e.content;return t===j.Completed?s.jsx(g.default,null):t===j.UpcomingMultiple||t===j.CompletedMultiple?s.jsx(f.default,null):s.jsx(o.Overline,{className:n.css(w||(w=b(["\n font-weight: 500;\n color: inherit;\n "])))},r)},te=n.css(O||(O=b(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),l.palette.white,l.palette.green.dark1,l.palette.green.dark1),ne=n.css(S||(S=b(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),l.palette.green.dark2,l.palette.white,l.palette.green.dark1),re=n.css(D||(D=b(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),l.palette.gray.dark1,l.palette.white,l.palette.gray.dark1),ae=n.css(U||(U=b(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),l.palette.black,l.palette.green.base,l.palette.green.base),le=n.css(z||(z=b(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),l.palette.green.base,l.palette.black,l.palette.green.base),ie=n.css(N||(N=b(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),l.palette.gray.light1,l.palette.black,l.palette.gray.light1),oe=(x(A={},M,(x(q={},j.CompletedMultiple,ae),x(q,j.Completed,ae),x(q,j.Current,le),x(q,j.Upcoming,ie),x(q,j.UpcomingMultiple,ie),q)),x(A,C,(x(I={},j.CompletedMultiple,te),x(I,j.Completed,te),x(I,j.Current,ne),x(I,j.Upcoming,re),x(I,j.UpcomingMultiple,re),I)),A),se=function(e){var t=e.state,r=e.size,a=h(e,Z),l=V().isDarkMode,o=n.css(T||(T=b(["\n width: ","px;\n height: ","px;\n box-sizing: content-box;\n margin-bottom: ","px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid;\n // TODO: use centralized transition prop\n transition: 0.3s box-shadow ease;\n z-index: 1;\n\n svg {\n width: 100%;\n }\n "])),r,r,i.spacing[1]);return s.jsx("div",{className:n.cx(Y,o,oe[l?M:C][t])},s.jsx(ee,m({state:t},a)))},ce=function(e){var t,r=e.children,a=e.state,i=a===j.Current,c=V().isDarkMode,u=n.css(L||(L=b(["\n color: ",";\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n "])),c?l.palette.green.base:l.palette.green.dark2),p=n.css(P||(P=b(["\n color: ",";\n "])),c?l.palette.green.base:l.palette.green.dark2),d=n.css(E||(E=b(["\n color: ",";\n "])),c?l.palette.white:l.palette.green.dark3),g=n.css(_||(_=b(["\n color: ",";\n "])),c?l.palette.gray.light1:l.palette.gray.dark1),f=n.css(B||(B=b(["\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n color: ",";\n "])),c?l.palette.gray.light1:l.palette.gray.dark1),y=(x(t={},j.CompletedMultiple,u),x(t,j.Completed,p),x(t,j.Current,d),x(t,j.Upcoming,g),x(t,j.UpcomingMultiple,f),t);return s.jsx(o.Body,{className:n.cx(y[a],X),weight:i?"medium":"regular"},r)},ue=["children","index","state","ariaLabel","shouldDisplayLine","iconSize","className"],pe=function(e){var t,r=e.children,a=e.index,o=e.state,c=e.ariaLabel,u=void 0===c?"step".concat(a||""):c,p=e.shouldDisplayLine,d=void 0===p||p,g=e.iconSize,f=void 0===g?20:g,y=e.className,v=h(e,ue),k=V().isDarkMode,C=o===j.Current,M=o===j.Completed||o===j.CompletedMultiple,w=n.css(F||(F=b(["\n display: flex;\n margin: auto;\n flex-direction: column;\n align-items: center;\n padding-bottom: ","px;\n position: relative; // for the :after line\n\n &:focus-visible {\n outline: none;\n ."," {\n // TODO: should use box-shadow utility for this.\n box-shadow: 0px 0px 0px 2px\n ",",\n 0px 0px 0px 4px ",";\n }\n }\n "])),i.spacing[1],Y,k?l.palette.black:l.palette.white,l.palette.blue.light1),O=n.css(J||(J=b(["\n &:after {\n content: '';\n height: 1px;\n width: 100%;\n position: absolute;\n top: ","px;\n left: 50%;\n z-index: 0;\n background-color: ",";\n }\n "])),f/2,k?l.palette.gray.light1:l.palette.gray.base),S=n.css(R||(R=b(["\n &:after {\n background-color: ",";\n }\n "])),k?l.palette.green.base:l.palette.green.dark1);return s.jsx("div",m({className:n.cx(w,(t={},x(t,O,d),x(t,S,M&&d),t),y),"aria-label":u,"aria-current":C&&"step"},v),s.jsx(se,{state:o,content:a,size:f}),s.jsx(ce,{state:o},r))},de=["state","children","tooltipContent","startingStepIndex"],ge=function(e){var t,r=e.state,a=e.children,o=e.tooltipContent,c=e.startingStepIndex,p=h(e,de),g=V().isDarkMode,f=n.css($||($=b(["\n // TODO: this is an arbitrary value. It would be nice to have a separate component for <ol> that handles this spacing.\n padding-inline-start: ","px;\n "])),i.spacing[4]),v=n.css(G||(G=b(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),Y,g?l.palette.green.dark1:l.palette.green.light2),k=n.css(H||(H=b(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),Y,g?l.palette.gray.dark2:l.palette.gray.light2),C=(x(t={},j.CompletedMultiple,v),x(t,j.UpcomingMultiple,k),t);return s.jsx(y.default,{align:u.Align.Top,justify:u.Justify.Middle,darkMode:g,trigger:s.jsx("li",null,s.jsx(pe,m({className:C[r],state:r,tabIndex:0},p),a))},s.jsx("div",null,s.jsx("ol",{className:f},d.default.Children.map(o,(function(e,t){return s.jsx("li",{value:c+t},e)})))))},fe=["children","currentStep","maxDisplayedSteps","completedStepsShown","darkMode","className"],ye=n.css(K||(K=b(["\n list-style: none;\n padding-inline-start: 0;\n width: 100%;\n display: flex;\n & > * {\n flex: 1;\n }\n"]))),xe=d.default.Fragment;e.Step=xe,e.default=function(e){var t=e.children,r=e.currentStep,a=e.maxDisplayedSteps,l=void 0===a?Array.isArray(t)?t.length:1:a,i=e.completedStepsShown,o=void 0===i?1:i,c=e.darkMode,u=void 0!==c&&c,p=e.className,g=h(e,fe),f=d.default.Children.count(t);l=Math.min(l,f);var y=d.default.Children.toArray(t),x=Math.min(Math.max(r-o,0),f-l),b=x+l,v=x>0,k=b<f;v&&x++,k&&b--;var C=function(e){return e+1===f},M=function(e,t){return 1===t-e?"Steps ".concat(e," and ").concat(t):"Steps ".concat(e," to ").concat(t)};return s.jsx(W,{darkMode:u},s.jsx("ol",m({className:n.cx(ye,p),"aria-label":"progress"},g),v&&s.jsx(ge,{state:j.CompletedMultiple,startingStepIndex:1,shouldDisplayLine:l>1,tooltipContent:y.slice(0,x)},M(1,x)),d.default.Children.map(y.slice(x,b),(function(e,t){return s.jsx("li",null,s.jsx(pe,{state:(n=x+t,n<r?j.Completed:n===r?j.Current:j.Upcoming),shouldDisplayLine:!C(x+t),index:x+t+1},e));var n})),k&&s.jsx(ge,{state:j.UpcomingMultiple,startingStepIndex:b+1,shouldDisplayLine:!1,tooltipContent:y.slice(b,f)},M(b+1,f))))},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("prop-types"),require("@leafygreen-ui/emotion"),require("@leafygreen-ui/icon/dist/Checkmark"),require("@leafygreen-ui/icon/dist/Ellipsis"),require("@leafygreen-ui/palette"),require("@leafygreen-ui/tokens"),require("@leafygreen-ui/typography"),require("@emotion/react"),require("@leafygreen-ui/lib"),require("@leafygreen-ui/tooltip")):"function"==typeof define&&define.amd?define(["exports","react","prop-types","@leafygreen-ui/emotion","@leafygreen-ui/icon/dist/Checkmark","@leafygreen-ui/icon/dist/Ellipsis","@leafygreen-ui/palette","@leafygreen-ui/tokens","@leafygreen-ui/typography","@emotion/react","@leafygreen-ui/lib","@leafygreen-ui/tooltip"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@leafygreen-ui/stepper"]={},e.React,e.PropTypes,e["@leafygreen-ui/emotion"],e.Checkmark,e.Ellipsis,e["@leafygreen-ui/palette"],e["@leafygreen-ui/tokens"],e["@leafygreen-ui/typography"],e.react,e["@leafygreen-ui/lib"],e["@leafygreen-ui/tooltip"])}(this,(function(e,t,n,r,a,l,o,i,s,p,u,c){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=d(t),f=d(n),y=d(a),m=d(l),x=d(c);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(){return b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b.apply(this,arguments)}function v(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function k(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,a,l=[],o=!0,i=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);o=!0);}catch(e){i=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(i)throw a}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return C(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var M,w="light",O="dark";!function(e){e.CompletedMultiple="completed-multiple",e.Completed="completed",e.Current="current",e.Upcoming="upcoming",e.UpcomingMultiple="upcoming-multiple"}(M||(M={}));var S,D,U,q,z,N,I,T,A,P,L,E,_,B,F,J,R,$,G,H,K,Q,V,W=t.createContext({}),X=function(){return t.useContext(W)},Y=function(e){var n=e.darkMode,r=e.children,a=j(t.useState(n),2),l=a[0],o=a[1];return t.useEffect((function(){o(n)}),[n]),p.jsx(W.Provider,{value:{isDarkMode:l,setIsDarkMode:o}},r)},Z=u.createUniqueClassName(),ee=u.createUniqueClassName(),te=["state","size"],ne=function(e){var t=e.state,n=e.content;return t===M.Completed?p.jsx(y.default,null):t===M.UpcomingMultiple||t===M.CompletedMultiple?p.jsx(m.default,null):p.jsx(s.Overline,{className:r.css(S||(S=k(["\n font-weight: 500;\n color: inherit;\n "])))},n)},re=r.css(D||(D=k(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),o.palette.white,o.palette.green.dark1,o.palette.green.dark1),ae=r.css(U||(U=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),o.palette.green.dark2,o.palette.white,o.palette.green.dark1),le=r.css(q||(q=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),o.palette.gray.dark1,o.palette.white,o.palette.gray.dark1),oe=r.css(z||(z=k(["\n color: ",";\n border-color: ",";\n background-color: ",";\n"])),o.palette.black,o.palette.green.base,o.palette.green.base),ie=r.css(N||(N=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),o.palette.green.base,o.palette.black,o.palette.green.base),se=r.css(I||(I=k(["\n color: ",";\n background-color: ",";\n border-color: ",";\n"])),o.palette.gray.light1,o.palette.black,o.palette.gray.light1),pe=(h(P={},O,(h(T={},M.CompletedMultiple,oe),h(T,M.Completed,oe),h(T,M.Current,ie),h(T,M.Upcoming,se),h(T,M.UpcomingMultiple,se),T)),h(P,w,(h(A={},M.CompletedMultiple,re),h(A,M.Completed,re),h(A,M.Current,ae),h(A,M.Upcoming,le),h(A,M.UpcomingMultiple,le),A)),P),ue=function(e){var t=e.state,n=e.size,a=v(e,te),l=X().isDarkMode,o=r.css(L||(L=k(["\n width: ","px;\n height: ","px;\n box-sizing: content-box;\n margin-bottom: ","px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n border: 1px solid;\n // TODO: use centralized transition prop\n transition: 0.3s box-shadow ease;\n z-index: 1;\n\n svg {\n width: 100%;\n }\n "])),n,n,i.spacing[1]);return p.jsx("div",{className:r.cx(ee,o,pe[l?O:w][t])},p.jsx(ne,b({state:t},a)))},ce=function(e){var t,n=e.children,a=e.state,l=a===M.Current,i=X().isDarkMode,u=r.css(E||(E=k(["\n color: ",";\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n "])),i?o.palette.green.base:o.palette.green.dark2),c=r.css(_||(_=k(["\n color: ",";\n "])),i?o.palette.green.base:o.palette.green.dark2),d=r.css(B||(B=k(["\n color: ",";\n "])),i?o.palette.white:o.palette.green.dark3),g=r.css(F||(F=k(["\n color: ",";\n "])),i?o.palette.gray.light1:o.palette.gray.dark1),f=r.css(J||(J=k(["\n text-decoration-line: underline;\n text-decoration-style: dotted;\n text-underline-position: under;\n color: ",";\n "])),i?o.palette.gray.light1:o.palette.gray.dark1),y=(h(t={},M.CompletedMultiple,u),h(t,M.Completed,c),h(t,M.Current,d),h(t,M.Upcoming,g),h(t,M.UpcomingMultiple,f),t);return p.jsx(s.Body,{className:r.cx(y[a],Z),weight:l?"medium":"regular"},n)},de=["children","index","state","ariaLabel","shouldDisplayLine","iconSize","className"],ge=function(e){var t,n=e.children,a=e.index,l=e.state,s=e.ariaLabel,u=void 0===s?"step".concat(a||""):s,c=e.shouldDisplayLine,d=void 0===c||c,g=e.iconSize,f=void 0===g?20:g,y=e.className,m=v(e,de),x=X().isDarkMode,j=l===M.Current,C=l===M.Completed||l===M.CompletedMultiple,w=r.css(R||(R=k(["\n display: flex;\n margin: auto;\n flex-direction: column;\n align-items: center;\n padding-bottom: ","px;\n position: relative; // for the :after line\n\n &:focus-visible {\n outline: none;\n ."," {\n // TODO: should use box-shadow utility for this.\n box-shadow: 0px 0px 0px 2px\n ",",\n 0px 0px 0px 4px ",";\n }\n }\n "])),i.spacing[1],ee,x?o.palette.black:o.palette.white,o.palette.blue.light1),O=r.css($||($=k(["\n &:after {\n content: '';\n height: 1px;\n width: 100%;\n position: absolute;\n top: ","px;\n left: 50%;\n z-index: 0;\n background-color: ",";\n }\n "])),f/2,x?o.palette.gray.light1:o.palette.gray.base),S=r.css(G||(G=k(["\n &:after {\n background-color: ",";\n }\n "])),x?o.palette.green.base:o.palette.green.dark1);return p.jsx("div",b({className:r.cx(w,(t={},h(t,O,d),h(t,S,C&&d),t),y),"aria-label":u,"aria-current":j&&"step"},m),p.jsx(ue,{state:l,content:a,size:f}),p.jsx(ce,{state:l},n))},fe=["state","children","tooltipContent","startingStepIndex"],ye=function(e){var t,n=e.state,a=e.children,l=e.tooltipContent,s=e.startingStepIndex,u=v(e,fe),d=X().isDarkMode,f=r.css(H||(H=k(["\n // TODO: this is an arbitrary value. It would be nice to have a separate component for <ol> that handles this spacing.\n padding-inline-start: ","px;\n "])),i.spacing[4]),y=r.css(K||(K=k(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),ee,d?o.palette.green.dark1:o.palette.green.light2),m=r.css(Q||(Q=k(["\n &:hover ."," {\n // TODO: use centralized box-shadow value\n box-shadow: 0px 0px 0px 3px\n ",";\n }\n "])),ee,d?o.palette.gray.dark2:o.palette.gray.light2),j=(h(t={},M.CompletedMultiple,y),h(t,M.UpcomingMultiple,m),t);return p.jsx(x.default,{align:c.Align.Top,justify:c.Justify.Middle,darkMode:d,trigger:p.jsx("li",null,p.jsx(ge,b({className:j[n],state:n,tabIndex:0},u),a))},p.jsx("div",null,p.jsx("ol",{className:f},g.default.Children.map(l,(function(e,t){return p.jsx("li",{value:s+t},e)})))))},me=["children","currentStep","maxDisplayedSteps","completedStepsShown","darkMode","className"],xe=r.css(V||(V=k(["\n list-style: none;\n padding-inline-start: 0;\n width: 100%;\n display: flex;\n & > * {\n flex: 1;\n }\n"]))),he=function(e){var t=e.children,n=e.currentStep,a=e.maxDisplayedSteps,l=void 0===a?Array.isArray(t)?t.length:1:a,o=e.completedStepsShown,i=void 0===o?1:o,s=e.darkMode,u=void 0!==s&&s,c=e.className,d=v(e,me),f=g.default.Children.count(t);l=Math.min(l,f);var y=g.default.Children.toArray(t),m=Math.min(Math.max(n-i,0),f-l),x=m+l,h=m>0,k=x<f;h&&m++,k&&x--;var j=function(e){return e+1===f},C=function(e,t){return 1===t-e?"Steps ".concat(e," and ").concat(t):"Steps ".concat(e," to ").concat(t)};return p.jsx(Y,{darkMode:u},p.jsx("ol",b({className:r.cx(xe,c),"aria-label":"progress"},d),h&&p.jsx(ye,{state:M.CompletedMultiple,startingStepIndex:1,shouldDisplayLine:l>1,tooltipContent:y.slice(0,m)},C(1,m)),g.default.Children.map(y.slice(m,x),(function(e,t){return p.jsx("li",null,p.jsx(ge,{state:(r=m+t,r<n?M.Completed:r===n?M.Current:M.Upcoming),shouldDisplayLine:!j(m+t),index:m+t+1},e));var r})),k&&p.jsx(ye,{state:M.UpcomingMultiple,startingStepIndex:x+1,shouldDisplayLine:!1,tooltipContent:y.slice(x,f)},C(x+1,f))))};he.propTypes={currentStep:f.default.number,maxDisplayedSteps:f.default.number,completedStepsShown:f.default.number};var be=g.default.Fragment;e.Step=be,e.default=he,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.js.map
import { OlHTMLAttributes, PropsWithChildren } from 'react';
import PropTypes from 'prop-types';
import { StepperProps } from './types';
declare const Stepper: ({ children, currentStep, maxDisplayedSteps, completedStepsShown, darkMode, className, ...rest }: PropsWithChildren<StepperProps & OlHTMLAttributes<HTMLOListElement>>) => JSX.Element;
declare const Stepper: {
({ children, currentStep, maxDisplayedSteps, completedStepsShown, darkMode, className, ...rest }: PropsWithChildren<StepperProps & OlHTMLAttributes<HTMLOListElement>>): JSX.Element;
propTypes: {
currentStep: PropTypes.Requireable<number>;
maxDisplayedSteps: PropTypes.Requireable<number>;
completedStepsShown: PropTypes.Requireable<number>;
};
};
export default Stepper;
//# sourceMappingURL=Stepper.d.ts.map

@@ -23,4 +23,19 @@ import React, { Dispatch } from 'react';

export interface StepperProps {
/**
* The index of the step that should be marked as current. (zero-indexed)
*
* * NOTE: Validations for this prop's value in relation to `completedStepsShown` and `maxDisplayedSteps` are not implemented yet.
*/
currentStep: number;
/**
* Maximum number of steps displayed in the stepper. Includes the ellipses steps.
*
* * NOTE: Validations for this prop's value in relation to `completedStepsShown` and `currentStep` are not implemented yet.
*/
maxDisplayedSteps?: number;
/**
* Number of completed steps shown before the upcoming steps are displayed. Includes the ellipses step for prior steps.
*
* * NOTE: Validations for this prop's value in relation to `maxDisplayedSteps` and `currentStep` are not implemented yet.
*/
completedStepsShown?: number;

@@ -27,0 +42,0 @@ darkMode?: boolean;

{
"name": "@leafygreen-ui/stepper",
"version": "3.0.1",
"version": "3.0.2",
"description": "leafyGreen UI Kit Stepper",

@@ -25,8 +25,16 @@ "main": "./dist/index.js",

"@leafygreen-ui/icon": "^11.9.0",
"@leafygreen-ui/lib": "^9.2.1",
"@leafygreen-ui/palette": "^3.2.2",
"@leafygreen-ui/lib": "^9.3.0",
"@leafygreen-ui/palette": "^3.4.0",
"@leafygreen-ui/tooltip": "^7.0.2",
"@leafygreen-ui/typography": "^11.0.0",
"@leafygreen-ui/typography": "^11.0.2",
"polished": "^4.1.3"
},
"homepage": "https://github.com/mongodb/leafygreen-ui/tree/main/packages/stepper",
"repository": {
"type": "git",
"url": "https://github.com/mongodb/leafygreen-ui"
},
"bugs": {
"url": "https://jira.mongodb.org/projects/PD/summary"
}
}
}

@@ -35,4 +35,19 @@ import React, { Dispatch } from 'react';

export interface StepperProps {
/**
* The index of the step that should be marked as current. (zero-indexed)
*
* * NOTE: Validations for this prop's value in relation to `completedStepsShown` and `maxDisplayedSteps` are not implemented yet.
*/
currentStep: number;
/**
* Maximum number of steps displayed in the stepper. Includes the ellipses steps.
*
* * NOTE: Validations for this prop's value in relation to `completedStepsShown` and `currentStep` are not implemented yet.
*/
maxDisplayedSteps?: number;
/**
* Number of completed steps shown before the upcoming steps are displayed. Includes the ellipses step for prior steps.
*
* * NOTE: Validations for this prop's value in relation to `maxDisplayedSteps` and `currentStep` are not implemented yet.
*/
completedStepsShown?: number;

@@ -39,0 +54,0 @@ darkMode?: boolean;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc