@onewelcome/react-lib-components 4.2.0 → 4.3.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.
- package/dist/esm/Stepper/Step.esm.js +2 -0
- package/dist/esm/Stepper/Step.esm.js.map +1 -0
- package/dist/esm/Stepper/Step.module.esm.js +2 -0
- package/dist/esm/Stepper/Step.module.esm.js.map +1 -0
- package/dist/esm/Stepper/Stepper.esm.js +2 -0
- package/dist/esm/Stepper/Stepper.esm.js.map +1 -0
- package/dist/esm/Stepper/Stepper.module.esm.js +2 -0
- package/dist/esm/Stepper/Stepper.module.esm.js.map +1 -0
- package/dist/esm/_BaseStyling_/BaseStyling.esm.js +1 -1
- package/dist/esm/src/components/Stepper/Step.d.ts +13 -0
- package/dist/esm/src/components/Stepper/Stepper.d.ts +7 -0
- package/dist/esm/src/components/Stepper/Stepper.test.d.ts +1 -0
- package/dist/esm/src/components/_BaseStyling_/BaseStyling.d.ts +32 -1
- package/dist/esm/src/index.d.ts +2 -0
- package/dist/esm/src/index.esm.js +1 -1
- package/package.json +1 -1
- package/src/components/Stepper/Step.module.scss +231 -0
- package/src/components/Stepper/Step.tsx +112 -0
- package/src/components/Stepper/Stepper.module.scss +13 -0
- package/src/components/Stepper/Stepper.test.tsx +83 -0
- package/src/components/Stepper/Stepper.tsx +45 -0
- package/src/components/_BaseStyling_/BaseStyling.tsx +63 -1
- package/src/index.ts +2 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e,{useState as t,useRef as r,useLayoutEffect as n}from"react";import{Icon as c,Icons as a}from"../Icon/Icon.esm.js";import i from"./Step.module.esm.js";const l=({label:l,caption:s,status:o,index:u,direction:d,disabled:m,lastStep:p,...h},g)=>{const f=null!=u?u:0,v=[i[o]],[w,E]=t(28),[b,C]=t(28);"vertical"===d&&v.push(i.vertical);const N=r(null),R=r(null),x=r(null);return n((()=>{if(N.current&&x.current&&R.current&&p){if("vertical"==d){const e=N.current.getBoundingClientRect().height,t=x.current.getBoundingClientRect().height;E(e+t)}if("horizontal"==d){const e=N.current.getBoundingClientRect().width,t=R.current.getBoundingClientRect().width;C(e>t?e+36:t+36)}}}),[]),e.createElement("button",{...h,ref:g,disabled:m,"aria-current":"current"===o?"step":void 0,className:`${i["step-wrapper"]} ${v.join(" ")}`},e.createElement("div",{style:{height:p&&"vertical"==d?`${w}px`:"auto",width:p&&"horizontal"==d?`${b}px`:"auto"}},e.createElement("div",{ref:x,className:i["step-content"]},e.createElement("div",{"aria-hidden":!0,className:i.step},((t,r)=>{switch(r){case"waiting":case"current":return String(t+1);case"done":return e.createElement(c,{icon:a.Checkmark});case"error":return"!"}})(f,o)),e.createElement("span",{ref:R,className:i.label},l,e.createElement("span",{ref:N,className:i.caption},s)))))},s=e.forwardRef(l);export{s as Step,l as StepComponent};
|
|
2
|
+
//# sourceMappingURL=Step.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var containers=[],styleTags=[];const e = function(e,t){if(e&&"undefined"!=typeof document){var n,s=!0===t.prepend?"prepend":"append",r=!0===t.singleTag,a="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(r){var i=containers.indexOf(a);-1===i&&(i=containers.push(a)-1,styleTags[i]={}),n=styleTags[i]&&styleTags[i][s]?styleTags[i][s]:styleTags[i][s]=c()}else n=c();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),r=0;r<n.length;r++)e.setAttribute(n[r],t.attributes[n[r]]);var i="prepend"===s?"afterbegin":"beforeend";return a.insertAdjacentElement(i,e),e}};var _='.Step_module_srOnly__244993cd{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.Step_module_hidden__244993cd{display:none}.Step_module_slideIn__244993cd{animation:Step_module_slideIn__244993cd .5s forwards}@media (prefers-reduced-motion:reduce){.Step_module_slideIn__244993cd{animation-duration:.1ms}}.Step_module_slideOut__244993cd{animation:Step_module_slideOut__244993cd .5s forwards}@media (prefers-reduced-motion:reduce){.Step_module_slideOut__244993cd{animation-duration:.1ms}}@keyframes Step_module_slideIn__244993cd{0%{transform:translateY(100vh)}to{transform:translateY(0)}}@keyframes Step_module_slideOut__244993cd{0%{transform:translateY(0)}to{transform:translateY(100vh)}}.Step_module_stepWrapper__244993cd{align-items:center;background-color:transparent;border:0;cursor:pointer;display:flex;flex:1;flex-direction:row;justify-content:center;margin:0;padding:0}.Step_module_stepWrapper__244993cd:focus-visible{border-radius:var(--focus-border-radius);outline:.125rem solid var(--color-focus);outline-offset:0}.Step_module_stepWrapper__244993cd .Step_module_stepContent__244993cd{align-items:center;display:flex;justify-content:center}.Step_module_stepWrapper__244993cd:last-child{flex-basis:fit-content;flex-grow:0}.Step_module_stepWrapper__244993cd:not(:last-child):after{border-bottom:2px solid var(--stepper-line-color);content:"";flex-grow:1;margin:0 .5rem;min-width:.5rem}.Step_module_stepWrapper__244993cd.Step_module_vertical__244993cd{display:flex;flex-direction:column;flex-grow:1}.Step_module_stepWrapper__244993cd.Step_module_vertical__244993cd:last-child{flex-basis:fit-content;flex-grow:0}.Step_module_stepWrapper__244993cd.Step_module_vertical__244993cd:not(:last-child):after{border-bottom:none;border-left:2px solid var(--stepper-line-color);content:"";height:100%;margin:.5rem 0 .5rem 1.6875rem;min-height:.5rem;width:100%}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd .Step_module_stepContent__244993cd .Step_module_step__244993cd{color:var(--stepper-default-text-color);color:var(--stepper-waiting-color)}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd:hover .Step_module_stepContent__244993cd .Step_module_step__244993cd{border:2px solid var(--stepper-waiting-hover-color);color:var(--stepper-waiting-hover-color)}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd:active .Step_module_stepContent__244993cd .Step_module_step__244993cd{border:2px solid var(--stepper-waiting-active-color);color:var(--stepper-waiting-active-color)}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd:disabled{cursor:not-allowed}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_step__244993cd{border:2px solid var(--stepper-waiting-disabled-color);color:var(--stepper-waiting-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd{color:var(--stepper-label-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd .Step_module_caption__244993cd{color:var(--stepper-caption-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_waiting__244993cd:disabled:not(:last-child):after{border-color:var(--stepper-line-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-current-color);border-color:var(--stepper-current-color);color:var(--stepper-default-text-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:not(:last-child):after{border-color:var(--stepper-line-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:hover .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-current-hover-color);border-color:var(--stepper-current-hover-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:active .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-current-active-color);border-color:var(--stepper-current-active-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:disabled{cursor:not-allowed}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-current-disabled-color);border-color:var(--stepper-current-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd{color:var(--stepper-label-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd .Step_module_caption__244993cd{color:var(--stepper-caption-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd:disabled:not(:last-child):after{border-color:var(--stepper-line-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd .Step_module_stepContent__244993cd .Step_module_label__244993cd{font-weight:700}.Step_module_stepWrapper__244993cd.Step_module_current__244993cd .Step_module_stepContent__244993cd .Step_module_label__244993cd .Step_module_caption__244993cd{font-weight:400}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-done-color);border-color:var(--stepper-done-color);color:var(--stepper-default-text-color)}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:not(:last-child):after{border-color:var(--stepper-line-bold-color)}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:hover .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-done-hover-color);border-color:var(--stepper-done-hover-color)}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:active .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-done-active-color);border-color:var(--stepper-done-active-color)}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:disabled{cursor:not-allowed}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-done-disabled-color);border-color:var(--stepper-done-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd{color:var(--stepper-label-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd .Step_module_caption__244993cd{color:var(--stepper-caption-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_done__244993cd:disabled:not(:last-child):after{border-color:var(--stepper-line-bold-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-error-color);border-color:var(--stepper-error-color);color:var(--stepper-default-text-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:not(:last-child):after{border-color:var(--stepper-line-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:hover .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-error-hover-color);border-color:var(--stepper-error-hover-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:active .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-error-active-color);border-color:var(--stepper-error-active-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:disabled{cursor:not-allowed}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_step__244993cd{background-color:var(--stepper-error-disabled-color);border-color:var(--stepper-error-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd{color:var(--stepper-label-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:disabled .Step_module_stepContent__244993cd .Step_module_label__244993cd .Step_module_caption__244993cd{color:var(--stepper-caption-error-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd:disabled:not(:last-child):after{border-color:var(--stepper-line-disabled-color)}.Step_module_stepWrapper__244993cd.Step_module_error__244993cd .Step_module_stepContent__244993cd .Step_module_label__244993cd .Step_module_caption__244993cd{color:var(--stepper-caption-error-color)}.Step_module_step__244993cd{align-items:center;border:2px solid var(--stepper-waiting-color);border-radius:50%;box-sizing:border-box;display:flex;flex-shrink:0;font-family:var(--font-family);font-size:var(--font-size-form-label);font-weight:700;height:1.75rem;justify-content:center;width:1.75rem}.Step_module_label__244993cd{color:var(--stepper-label-color);flex-shrink:0;margin-left:.5rem;position:relative}.Step_module_caption__244993cd{color:var(--stepper-caption-color);font-size:.75rem;left:0;position:absolute;top:1.25rem}',o={"sr-only":"Step_module_srOnly__244993cd",hidden:"Step_module_hidden__244993cd","slide-in":"Step_module_slideIn__244993cd","slide-out":"Step_module_slideOut__244993cd","step-wrapper":"Step_module_stepWrapper__244993cd","step-content":"Step_module_stepContent__244993cd",vertical:"Step_module_vertical__244993cd",waiting:"Step_module_waiting__244993cd",step:"Step_module_step__244993cd",label:"Step_module_label__244993cd",caption:"Step_module_caption__244993cd",current:"Step_module_current__244993cd",done:"Step_module_done__244993cd",error:"Step_module_error__244993cd"};e(_,{});export{_ as css,o as default};
|
|
2
|
+
//# sourceMappingURL=Step.module.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Step.module.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e from"react";import{Step as t}from"./Step.esm.js";import r from"./Stepper.module.esm.js";const o=({steps:o,direction:a="horizontal",...i})=>e.createElement("div",{...i,className:`${r.stepper} ${"horizontal"===a?r.horizontal:r.vertical}`},o.map(((r,i)=>e.createElement(t,{...r,key:r.label.toLowerCase().replace(/\s/,"-"),index:i,direction:a,lastStep:i+1===o.length}))));export{o as Stepper};
|
|
2
|
+
//# sourceMappingURL=Stepper.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var containers=[],styleTags=[];const e = function(e,t){if(e&&"undefined"!=typeof document){var n,s=!0===t.prepend?"prepend":"append",r=!0===t.singleTag,a="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(r){var i=containers.indexOf(a);-1===i&&(i=containers.push(a)-1,styleTags[i]={}),n=styleTags[i]&&styleTags[i][s]?styleTags[i][s]:styleTags[i][s]=c()}else n=c();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),r=0;r<n.length;r++)e.setAttribute(n[r],t.attributes[n[r]]);var i="prepend"===s?"afterbegin":"beforeend";return a.insertAdjacentElement(i,e),e}};var t=".Stepper_module_stepper__366b573e{align-items:center;display:flex;justify-content:center;width:100%}.Stepper_module_stepper__366b573e.Stepper_module_vertical__366b573e{flex-direction:column;height:100%;justify-content:flex-start;width:auto}",p={stepper:"Stepper_module_stepper__366b573e",vertical:"Stepper_module_vertical__366b573e"};e(t,{});export{t as css,p as default};
|
|
2
|
+
//# sourceMappingURL=Stepper.module.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.module.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r,{useState as o,useRef as e,useEffect as l}from"react";const a=({children:a,properties:t={}})=>{const c={colorPrimary300:"#6871BF",colorPrimary500:"#041295",colorPrimary600:"#030F77",colorPrimary700:"#020B59",colorPrimary900:"#01041E",colorBlueGrey25:"#F7F7F9",colorBlueGrey25Transparent:"rgba(247, 247, 249, .8)",colorBlueGrey50:"#EEEFF3",colorBlueGrey100:"#DEDEE6",colorBlueGrey200:"#BCBECE",colorBlueGrey400:"#797D9C",colorBlueGrey500:"#5D607E",colorBlueGrey700:"#383A4B",colorBlueGrey800:"#252733",colorBlueGrey900:"#131319",colorGreen100:"#D1E6DA",colorGreen500:"#178244",colorGreen600:"#126836",colorGreen700:"#0E4E29",colorLightBlue500:"#00BCDD",colorLightBlue600:"#0096B1",colorOrange500:"#E07900",colorOrange600:"#B36100",colorOrange700:"#864900",colorRed500:"#E01E00",colorRed600:"#B31800",colorRed700:"#861200",colorBlack100:"#000000",colorBlack20:"rgba(0, 0, 0, 0.2)",colorBlack10:"rgba(0, 0, 0, 0.1)",colorShadowBlue:"#7078C3",colorWhite:"#FFFFFF",colorFocus:"var(--color-primary300)",colorPrimary:"var(--color-primary500)",colorSecondary:"var(--color-green500)",colorTertiary:"var(--color-light-blue600)",defaultPressedColor:"var(--color-blue-grey100)",defaultHoverColor:"var(--color-blue-grey25)",defaultLineHeight:"1.5",defaultBorderRadius:"0.25rem",focusBorderRadius:"0.125rem",buttonBorderRadius:"var(--default-border-radius)",buttonBorderWidth:"2px",buttonFontSize:"1rem",buttonBorderStyle:"solid",buttonFillTextColor:"var(--light)",buttonPrimaryDefaultColor:"var(--color-primary500)",buttonPrimaryHoverColor:"var(--color-primary600)",buttonPrimaryFocusedColor:"var(--color-primary500)",buttonPrimaryPressedColor:"var(--color-primary700)",buttonSecondaryDefaultColor:"var(--color-green500)",buttonSecondaryHoverColor:"var(--color-green600)",buttonSecondaryFocusedColor:"var(--color-green500)",buttonSecondaryPressedColor:"var(--color-green700)",buttonWarningDefaultColor:"var(--color-orange500)",buttonWarningHoverColor:"var(--color-orange600)",buttonWarningFocusedColor:"var(--color-orange500)",buttonWarningPressedColor:"var(--color-orange700)",buttonDangerDefaultColor:"var(--color-red500)",buttonDangerHoverColor:"var(--color-red600)",buttonDangerFocusedColor:"var(--color-red500)",buttonDangerPressedColor:"var(--color-red700)",buttonDefaultColor:"var(--color-blue-grey700)",buttonDefaultHoverColor:"var(--color-blue-grey800)",buttonDefaultFocusedColor:"var(--color-blue-grey700)",buttonDefaultPressedColor:"var(--color-blue-grey800)",buttonOutlineHoverTextColor:"var(--color-primary600)",checkboxUncheckedHoverColor:"var(--color-blue-grey50)",checkboxUncheckedPressedColor:"var(--default-pressed-color)",checkboxCheckedHoverColor:"var(--color-primary600)",checkboxCheckedPressedColor:"var(--color-primary700)",radioHoverBackgroundColor:"var(--color-blue-grey50)",radioPressedBackgroundColor:"var(--default-pressed-color)",radioHoverColor:"var(--color-primary600)",radioPressedColor:"var(--color-primary700)",inputBorderRadius:"2px",inputBorderWidth:"1px",inputBorderWidthFocus:"1px",inputBorderStyle:"solid",inputBorderColor:"var(--color-blue-grey500)",inputBackgroundColor:"var(--light)",inputHelperTextColor:"var(--color-blue-grey500)",inputHoverBackgroundColor:"var(--default-hover-color)",inputDisabledBackgroundColor:"var(--input-hover-background-color)",dragBackgroundColor:"var(--color-blue-grey25-transparent)",dragBorderStyle:"solid",modalShadowColor:"rgba(0, 0, 0, 0.16)",modalBackgroundColor:"var(--light)",modalBackdropColor:"var(--default)",skeletonBackgroundColor:"var(--disabled)",skeletonAnimationColorRgb:"255, 255, 255",snackbarTextColor:"var(--light)",snackbarInfoBackgroundColor:"var(--color-primary500)",snackbarSuccessBackgroundColor:"var(--color-green500)",snackbarErrorBackgroundColor:"var(--color-red500)",snackbarWarningBackgroundColor:"var(--color-orange500)",snackbarBorderRadius:"2px",bannerBorderRadius:"2px",bannerBorderWidth:"0 0 0 4px",dataGridRowBackgroundColor:"transparent",dataGridRowHoverBackgroundColor:"var(--default-hover-color)",progressBarBackgroundColor:"var(--disabled)",tabsBackgroundColor:"var(--light)",tabActiveBorderHeight:"0.25rem",tabActiveBorderColor:"var(--color-primary)",tabActiveTextColor:"var(--color-primary)",tablistBorderWidth:"0.0625rem",tablistBorderStyle:"solid",tablistBorderColor:"var(--color-blue-grey100)",tabTextColor:"var(--color-blue-grey900)",tabHoverColor:"var(--default-hover-color)",tabPressedColor:"var(--default-pressed-color)",toggleBackgroundColor:"var(--color-blue-grey100)",tooltipBackgroundColor:"var(--default)",wizardStepIndicatorFutureColor:"var(--color-blue-grey200)",contextMenuHoverColor:"var(--default-hover-color)",contextMenuPressedColor:"var(--default-pressed-color)",default:"var(--color-blue-grey900)",success:"var(--color-green500)",error:"var(--color-red500)",info:"var(--color-primary500)",disabled:"var(--color-blue-grey100)",greyedOut:"var(--color-blue-grey400)",lightGreyBorder:"var(--color-blue-grey100)",warning:"var(--color-orange500)",light:"var(--color-white)",fontFamily:"Roboto, sans-serif",fontFamilyCode:"'Roboto Mono', monospace",fontSizeFormLabel:"0.875rem",fontSize:"1rem",fontSizeH1:"2.5rem",fontSizeH2:"1.625rem",fontSizeH3:"1.5rem",fontSizeH4:"1.25rem",fontSizeSub:".75rem",fontSizeCode:"1rem",formControlFontSize:"0.875rem"},[n,u]=o(!0),d=e(null),i=r=>{for(const[o,e]of Object.entries(r)){const r=o.replace(/([A-Z])/g,(r=>`-${r.toLowerCase()}`));d.current.style.setProperty(`--${r}`,e)}};return l((()=>{if(0!==Object.keys(t).length&&d.current){const r={...c,...t};i(r)}else d.current&&i(c);u(!1)}),[t,d.current]),r.createElement("div",{className:"basestyling-wrapper",ref:d},n?null:a)};export{a as BaseStyling};
|
|
1
|
+
import r,{useState as o,useRef as e,useEffect as l}from"react";const a=({children:a,properties:t={}})=>{const c={colorPrimary100:"#CDD0EA",colorPrimary300:"#6871BF",colorPrimary500:"#041295",colorPrimary600:"#030F77",colorPrimary700:"#020B59",colorPrimary900:"#01041E",colorBlueGrey25:"#F7F7F9",colorBlueGrey25Transparent:"rgba(247, 247, 249, .8)",colorBlueGrey50:"#EEEFF3",colorBlueGrey100:"#DEDEE6",colorBlueGrey200:"#BCBECE",colorBlueGrey300:"#9A9DB5",colorBlueGrey400:"#797D9C",colorBlueGrey500:"#5D607E",colorBlueGrey700:"#383A4B",colorBlueGrey800:"#252733",colorBlueGrey900:"#131319",colorGreen100:"#D1E6DA",colorGreen200:"#A2CDB4",colorGreen500:"#178244",colorGreen600:"#126836",colorGreen700:"#0E4E29",colorLightBlue500:"#00BCDD",colorLightBlue600:"#0096B1",colorOrange500:"#E07900",colorOrange600:"#B36100",colorOrange700:"#864900",colorRed200:"#F3A599",colorRed500:"#E01E00",colorRed600:"#B31800",colorRed700:"#861200",colorBlack100:"#000000",colorBlack20:"rgba(0, 0, 0, 0.2)",colorBlack10:"rgba(0, 0, 0, 0.1)",colorShadowBlue:"#7078C3",colorWhite:"#FFFFFF",colorFocus:"var(--color-primary300)",colorPrimary:"var(--color-primary500)",colorSecondary:"var(--color-green500)",colorTertiary:"var(--color-light-blue600)",defaultPressedColor:"var(--color-blue-grey100)",defaultHoverColor:"var(--color-blue-grey25)",defaultLineHeight:"1.5",defaultBorderRadius:"0.25rem",focusBorderRadius:"0.125rem",buttonBorderRadius:"var(--default-border-radius)",buttonBorderWidth:"2px",buttonFontSize:"1rem",buttonBorderStyle:"solid",buttonFillTextColor:"var(--light)",buttonPrimaryDefaultColor:"var(--color-primary500)",buttonPrimaryHoverColor:"var(--color-primary600)",buttonPrimaryFocusedColor:"var(--color-primary500)",buttonPrimaryPressedColor:"var(--color-primary700)",buttonSecondaryDefaultColor:"var(--color-green500)",buttonSecondaryHoverColor:"var(--color-green600)",buttonSecondaryFocusedColor:"var(--color-green500)",buttonSecondaryPressedColor:"var(--color-green700)",buttonWarningDefaultColor:"var(--color-orange500)",buttonWarningHoverColor:"var(--color-orange600)",buttonWarningFocusedColor:"var(--color-orange500)",buttonWarningPressedColor:"var(--color-orange700)",buttonDangerDefaultColor:"var(--color-red500)",buttonDangerHoverColor:"var(--color-red600)",buttonDangerFocusedColor:"var(--color-red500)",buttonDangerPressedColor:"var(--color-red700)",buttonDefaultColor:"var(--color-blue-grey700)",buttonDefaultHoverColor:"var(--color-blue-grey800)",buttonDefaultFocusedColor:"var(--color-blue-grey700)",buttonDefaultPressedColor:"var(--color-blue-grey800)",buttonOutlineHoverTextColor:"var(--color-primary600)",checkboxUncheckedHoverColor:"var(--color-blue-grey50)",checkboxUncheckedPressedColor:"var(--default-pressed-color)",checkboxCheckedHoverColor:"var(--color-primary600)",checkboxCheckedPressedColor:"var(--color-primary700)",radioHoverBackgroundColor:"var(--color-blue-grey50)",radioPressedBackgroundColor:"var(--default-pressed-color)",radioHoverColor:"var(--color-primary600)",radioPressedColor:"var(--color-primary700)",inputBorderRadius:"2px",inputBorderWidth:"1px",inputBorderWidthFocus:"1px",inputBorderStyle:"solid",inputBorderColor:"var(--color-blue-grey500)",inputBackgroundColor:"var(--light)",inputHelperTextColor:"var(--color-blue-grey500)",inputHoverBackgroundColor:"var(--default-hover-color)",inputDisabledBackgroundColor:"var(--input-hover-background-color)",dragBackgroundColor:"var(--color-blue-grey25-transparent)",dragBorderStyle:"solid",modalShadowColor:"rgba(0, 0, 0, 0.16)",modalBackgroundColor:"var(--light)",modalBackdropColor:"var(--default)",skeletonBackgroundColor:"var(--disabled)",skeletonAnimationColorRgb:"255, 255, 255",snackbarTextColor:"var(--light)",snackbarInfoBackgroundColor:"var(--color-primary500)",snackbarSuccessBackgroundColor:"var(--color-green500)",snackbarErrorBackgroundColor:"var(--color-red500)",snackbarWarningBackgroundColor:"var(--color-orange500)",snackbarBorderRadius:"2px",stepperWaitingColor:"var(--color-blue-grey200)",stepperWaitingHoverColor:"var(--color-blue-grey300)",stepperWaitingActiveColor:"var(--color-blue-grey400)",stepperWaitingDisabledColor:"var(--color-blue-grey100)",stepperCurrentColor:"var(--color-primary500)",stepperCurrentHoverColor:"var(--color-primary600)",stepperCurrentActiveColor:"var(--color-primary700)",stepperCurrentDisabledColor:"var(--color-primary100)",stepperDoneColor:"var(--color-green500)",stepperDoneHoverColor:"var(--color-green600)",stepperDoneActiveColor:"var(--color-green700)",stepperDoneDisabledColor:"var(--color-green200)",stepperErrorColor:"var(--color-red500)",stepperErrorHoverColor:"var(--color-red600)",stepperErrorActiveColor:"var(--color-red700)",stepperErrorDisabledColor:"var(--color-red200)",stepperDefaultTextColor:"var(--color-white)",stepperLineColor:"var(--color-blue-grey300)",stepperLineBoldColor:"var(--color-blue-grey700)",stepperLineDisabledColor:"var(--color-blue-grey100)",stepperLineBoldDisabledColor:"var(--color-blue-grey300)",stepperLabelColor:"var(--color-blue-grey900)",stepperCaptionColor:"var(--color-blue-grey500)",stepperCaptionErrorColor:"var(--color-red500)",stepperLabelDisabledColor:"var(--color-blue-grey400)",stepperCaptionDisabledColor:"var(--color-blue-grey400)",stepperCaptionErrorDisabledColor:"var(--color-red200)",bannerBorderRadius:"2px",bannerBorderWidth:"0 0 0 4px",dataGridRowBackgroundColor:"transparent",dataGridRowHoverBackgroundColor:"var(--default-hover-color)",progressBarBackgroundColor:"var(--disabled)",tabsBackgroundColor:"var(--light)",tabActiveBorderHeight:"0.25rem",tabActiveBorderColor:"var(--color-primary)",tabActiveTextColor:"var(--color-primary)",tablistBorderWidth:"0.0625rem",tablistBorderStyle:"solid",tablistBorderColor:"var(--color-blue-grey100)",tabTextColor:"var(--color-blue-grey900)",tabHoverColor:"var(--default-hover-color)",tabPressedColor:"var(--default-pressed-color)",toggleBackgroundColor:"var(--color-blue-grey100)",tooltipBackgroundColor:"var(--default)",wizardStepIndicatorFutureColor:"var(--color-blue-grey200)",contextMenuHoverColor:"var(--default-hover-color)",contextMenuPressedColor:"var(--default-pressed-color)",default:"var(--color-blue-grey900)",success:"var(--color-green500)",error:"var(--color-red500)",info:"var(--color-primary500)",disabled:"var(--color-blue-grey100)",greyedOut:"var(--color-blue-grey400)",lightGreyBorder:"var(--color-blue-grey100)",warning:"var(--color-orange500)",light:"var(--color-white)",fontFamily:"Roboto, sans-serif",fontFamilyCode:"'Roboto Mono', monospace",fontSizeFormLabel:"0.875rem",fontSize:"1rem",fontSizeH1:"2.5rem",fontSizeH2:"1.625rem",fontSizeH3:"1.5rem",fontSizeH4:"1.25rem",fontSizeSub:".75rem",fontSizeCode:"1rem",formControlFontSize:"0.875rem"},[n,u]=o(!0),d=e(null),i=r=>{for(const[o,e]of Object.entries(r)){const r=o.replace(/([A-Z])/g,(r=>`-${r.toLowerCase()}`));d.current.style.setProperty(`--${r}`,e)}};return l((()=>{if(0!==Object.keys(t).length&&d.current){const r={...c,...t};i(r)}else d.current&&i(c);u(!1)}),[t,d.current]),r.createElement("div",{className:"basestyling-wrapper",ref:d},n?null:a)};export{a as BaseStyling};
|
|
2
2
|
//# sourceMappingURL=BaseStyling.esm.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ComponentPropsWithRef, ForwardRefRenderFunction } from "react";
|
|
2
|
+
export type StepStatus = "waiting" | "current" | "done" | "error";
|
|
3
|
+
export interface Props extends ComponentPropsWithRef<"button"> {
|
|
4
|
+
status: StepStatus;
|
|
5
|
+
label: string;
|
|
6
|
+
caption?: string;
|
|
7
|
+
index?: number;
|
|
8
|
+
lastStep?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
direction?: "horizontal" | "vertical";
|
|
11
|
+
}
|
|
12
|
+
export declare const StepComponent: ForwardRefRenderFunction<HTMLButtonElement, Props>;
|
|
13
|
+
export declare const Step: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { Props as StepProps } from "./Step";
|
|
3
|
+
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
4
|
+
steps: StepProps[];
|
|
5
|
+
direction: "horizontal" | "vertical";
|
|
6
|
+
}
|
|
7
|
+
export declare const Stepper: ({ steps, direction, ...rest }: Props) => React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,6 +8,7 @@ interface CSSProperties {
|
|
|
8
8
|
colorPrimary?: string;
|
|
9
9
|
colorSecondary?: string;
|
|
10
10
|
colorTertiary?: string;
|
|
11
|
+
colorPrimary100?: string;
|
|
11
12
|
colorPrimary300?: string;
|
|
12
13
|
colorPrimary500?: string;
|
|
13
14
|
colorPrimary600?: string;
|
|
@@ -15,6 +16,7 @@ interface CSSProperties {
|
|
|
15
16
|
colorPrimary900?: string;
|
|
16
17
|
colorBlueGrey100?: string;
|
|
17
18
|
colorBlueGrey200?: string;
|
|
19
|
+
colorBlueGrey300?: string;
|
|
18
20
|
colorBlueGrey400?: string;
|
|
19
21
|
colorBlueGrey25?: string;
|
|
20
22
|
colorBlueGrey25Transparent?: string;
|
|
@@ -24,6 +26,7 @@ interface CSSProperties {
|
|
|
24
26
|
colorBlueGrey800?: string;
|
|
25
27
|
colorBlueGrey900?: string;
|
|
26
28
|
colorGreen100?: string;
|
|
29
|
+
colorGreen200?: string;
|
|
27
30
|
colorGreen500?: string;
|
|
28
31
|
colorGreen600?: string;
|
|
29
32
|
colorGreen700?: string;
|
|
@@ -33,10 +36,11 @@ interface CSSProperties {
|
|
|
33
36
|
colorOrange500?: string;
|
|
34
37
|
colorOrange600?: string;
|
|
35
38
|
colorOrange700?: string;
|
|
39
|
+
colorRed200?: string;
|
|
36
40
|
colorRed500?: string;
|
|
37
|
-
colorWhite?: string;
|
|
38
41
|
colorRed600?: string;
|
|
39
42
|
colorRed700?: string;
|
|
43
|
+
colorWhite?: string;
|
|
40
44
|
colorBlack100?: string;
|
|
41
45
|
colorBlack20?: string;
|
|
42
46
|
colorBlack10?: string;
|
|
@@ -102,6 +106,33 @@ interface CSSProperties {
|
|
|
102
106
|
snackbarErrorBackgroundColor?: string;
|
|
103
107
|
snackbarWarningBackgroundColor?: string;
|
|
104
108
|
snackbarBorderRadius?: string;
|
|
109
|
+
stepperWaitingColor?: string;
|
|
110
|
+
stepperWaitingHoverColor?: string;
|
|
111
|
+
stepperWaitingActiveColor?: string;
|
|
112
|
+
stepperWaitingDisabledColor?: string;
|
|
113
|
+
stepperCurrentColor?: string;
|
|
114
|
+
stepperCurrentHoverColor?: string;
|
|
115
|
+
stepperCurrentActiveColor?: string;
|
|
116
|
+
stepperCurrentDisabledColor?: string;
|
|
117
|
+
stepperDoneColor?: string;
|
|
118
|
+
stepperDoneHoverColor?: string;
|
|
119
|
+
stepperDoneActiveColor?: string;
|
|
120
|
+
stepperDoneDisabledColor?: string;
|
|
121
|
+
stepperErrorColor?: string;
|
|
122
|
+
stepperErrorHoverColor?: string;
|
|
123
|
+
stepperErrorActiveColor?: string;
|
|
124
|
+
stepperErrorDisabledColor?: string;
|
|
125
|
+
stepperDefaultTextColor?: string;
|
|
126
|
+
stepperLineColor?: string;
|
|
127
|
+
stepperLineBoldColor?: string;
|
|
128
|
+
stepperLineDisabledColor?: string;
|
|
129
|
+
stepperLineBoldDisabledColor?: string;
|
|
130
|
+
stepperLabelColor?: string;
|
|
131
|
+
stepperCaptionColor?: string;
|
|
132
|
+
stepperCaptionErrorColor?: string;
|
|
133
|
+
stepperLabelDisabledColor?: string;
|
|
134
|
+
stepperCaptionDisabledColor?: string;
|
|
135
|
+
stepperCaptionErrorDisabledColor?: string;
|
|
105
136
|
bannerBorderRadius?: string;
|
|
106
137
|
bannerBorderWidth?: string;
|
|
107
138
|
dataGridRowBackgroundColor?: string;
|
package/dist/esm/src/index.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export { Skeleton } from "./components/Skeleton/Skeleton";
|
|
|
35
35
|
export type { Props as SkeletonProps } from "./components/Skeleton/Skeleton";
|
|
36
36
|
export { StatusIndicator } from "./components/StatusIndicator/StatusIndicator";
|
|
37
37
|
export type { Props as StatusIndicatorProps } from "./components/StatusIndicator/StatusIndicator";
|
|
38
|
+
export { Stepper } from "./components/Stepper/Stepper";
|
|
39
|
+
export type { Props as StepperProps } from "./components/Stepper/Stepper";
|
|
38
40
|
export { Pagination } from "./components/Pagination/Pagination";
|
|
39
41
|
export type { Props as PaginationProps, PageChangeLabels, PaginationTranslations, PageSize } from "./components/Pagination/Pagination";
|
|
40
42
|
export { useRepeater } from "./hooks/useRepeater";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{BaseStyling}from"../_BaseStyling_/BaseStyling.esm.js";export{Button}from"../Button/Button.esm.js";export{Breadcrumbs}from"../Breadcrumbs/Breadcrumbs.esm.js";export{ContextMenu}from"../ContextMenu/ContextMenu.esm.js";export{ContextMenuItem}from"../ContextMenu/ContextMenuItem.esm.js";export{Link}from"../Link/Link.esm.js";export{Icon,Icons}from"../Icon/Icon.esm.js";export{IconButton}from"../Button/IconButton.esm.js";export{Tab}from"../Tabs/Tab.esm.js";export{Tabs}from"../Tabs/Tabs.esm.js";export{Tag}from"../Tag/Tag.esm.js";export{TextEllipsis}from"../TextEllipsis/TextEllipsis.esm.js";export{Tile}from"../Tiles/Tile.esm.js";export{Tiles}from"../Tiles/Tiles.esm.js";export{Tooltip}from"../Tooltip/Tooltip.esm.js";export{Typography}from"../Typography/Typography.esm.js";export{ProgressBar}from"../ProgressBar/ProgressBar.esm.js";export{Skeleton}from"../Skeleton/Skeleton.esm.js";export{StatusIndicator}from"../StatusIndicator/StatusIndicator.esm.js";export{Pagination}from"../Pagination/Pagination.esm.js";export{useRepeater}from"./hooks/useRepeater.esm.js";export{useDebouncedCallback}from"./hooks/useDebouncedCallback.esm.js";export{debounce,generateID,throttle}from"./util/helper.esm.js";export{BaseModal as Modal}from"../Notifications/BaseModal/BaseModal.esm.js";export{useSnackbar}from"../Notifications/Snackbar/useSnackbar.esm.js";export{Dialog}from"../Notifications/Dialog/Dialog.esm.js";export{DiscardChangesModal}from"../Notifications/DiscardChangesModal/DiscardChangesModal.esm.js";export{BaseModalActions as ModalActions}from"../Notifications/BaseModal/BaseModalActions/BaseModalActions.esm.js";export{BaseModalContent as ModalContent}from"../Notifications/BaseModal/BaseModalContent/BaseModalContent.esm.js";export{BaseModalHeader as ModalHeader}from"../Notifications/BaseModal/BaseModalHeader/BaseModalHeader.esm.js";export{NotificationProvider,useNotificationContext}from"../Notifications/NotificationProvider/NotificationContext.esm.js";export{SlideInModal}from"../Notifications/SlideInModal/SlideInModal.esm.js";export{SnackbarProvider}from"../Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js";export{Checkbox}from"../Form/Checkbox/Checkbox.esm.js";export{Fieldset}from"../Form/Fieldset/Fieldset.esm.js";export{Form}from"../Form/Form.esm.js";export{FormControl}from"../Form/FormControl/FormControl.esm.js";export{FormGroup}from"../Form/FormGroup/FormGroup.esm.js";export{FormHelperText}from"../Form/FormHelperText/FormHelperText.esm.js";export{Input}from"../Form/Input/Input.esm.js";export{InputWrapper}from"../Form/Wrapper/InputWrapper/InputWrapper.esm.js";export{Label}from"../Form/Label/Label.esm.js";export{Option}from"../Form/Select/Option.esm.js";export{Radio}from"../Form/Radio/Radio.esm.js";export{RadioWrapper}from"../Form/Wrapper/RadioWrapper/RadioWrapper.esm.js";export{Select}from"../Form/Select/Select.esm.js";export{Textarea}from"../Form/Textarea/Textarea.esm.js";export{Toggle}from"../Form/Toggle/Toggle.esm.js";export{CheckboxWrapper}from"../Form/Wrapper/CheckboxWrapper/CheckboxWrapper.esm.js";export{TextareaWrapper}from"../Form/Wrapper/TextareaWrapper/TextareaWrapper.esm.js";export{SelectWrapper}from"../Form/Wrapper/SelectWrapper/SelectWrapper.esm.js";export{Wizard}from"../Wizard/Wizard.esm.js";export{WizardActions}from"../Wizard/WizardActions/WizardActions.esm.js";export{WizardSteps}from"../Wizard/WizardSteps/WizardSteps.esm.js";export{BaseWizardSteps}from"../Wizard/BaseWizardSteps/BaseWizardSteps.esm.js";export{DataGrid}from"../DataGrid/DataGrid.esm.js";export{DataGridRow}from"../DataGrid/DataGridBody/DataGridRow.esm.js";export{DataGridCell}from"../DataGrid/DataGridBody/DataGridCell.esm.js";export{Banner}from"../Notifications/Banner/Banner.esm.js";
|
|
1
|
+
export{BaseStyling}from"../_BaseStyling_/BaseStyling.esm.js";export{Button}from"../Button/Button.esm.js";export{Breadcrumbs}from"../Breadcrumbs/Breadcrumbs.esm.js";export{ContextMenu}from"../ContextMenu/ContextMenu.esm.js";export{ContextMenuItem}from"../ContextMenu/ContextMenuItem.esm.js";export{Link}from"../Link/Link.esm.js";export{Icon,Icons}from"../Icon/Icon.esm.js";export{IconButton}from"../Button/IconButton.esm.js";export{Tab}from"../Tabs/Tab.esm.js";export{Tabs}from"../Tabs/Tabs.esm.js";export{Tag}from"../Tag/Tag.esm.js";export{TextEllipsis}from"../TextEllipsis/TextEllipsis.esm.js";export{Tile}from"../Tiles/Tile.esm.js";export{Tiles}from"../Tiles/Tiles.esm.js";export{Tooltip}from"../Tooltip/Tooltip.esm.js";export{Typography}from"../Typography/Typography.esm.js";export{ProgressBar}from"../ProgressBar/ProgressBar.esm.js";export{Skeleton}from"../Skeleton/Skeleton.esm.js";export{StatusIndicator}from"../StatusIndicator/StatusIndicator.esm.js";export{Stepper}from"../Stepper/Stepper.esm.js";export{Pagination}from"../Pagination/Pagination.esm.js";export{useRepeater}from"./hooks/useRepeater.esm.js";export{useDebouncedCallback}from"./hooks/useDebouncedCallback.esm.js";export{debounce,generateID,throttle}from"./util/helper.esm.js";export{BaseModal as Modal}from"../Notifications/BaseModal/BaseModal.esm.js";export{useSnackbar}from"../Notifications/Snackbar/useSnackbar.esm.js";export{Dialog}from"../Notifications/Dialog/Dialog.esm.js";export{DiscardChangesModal}from"../Notifications/DiscardChangesModal/DiscardChangesModal.esm.js";export{BaseModalActions as ModalActions}from"../Notifications/BaseModal/BaseModalActions/BaseModalActions.esm.js";export{BaseModalContent as ModalContent}from"../Notifications/BaseModal/BaseModalContent/BaseModalContent.esm.js";export{BaseModalHeader as ModalHeader}from"../Notifications/BaseModal/BaseModalHeader/BaseModalHeader.esm.js";export{NotificationProvider,useNotificationContext}from"../Notifications/NotificationProvider/NotificationContext.esm.js";export{SlideInModal}from"../Notifications/SlideInModal/SlideInModal.esm.js";export{SnackbarProvider}from"../Notifications/Snackbar/SnackbarProvider/SnackbarProvider.esm.js";export{Checkbox}from"../Form/Checkbox/Checkbox.esm.js";export{Fieldset}from"../Form/Fieldset/Fieldset.esm.js";export{Form}from"../Form/Form.esm.js";export{FormControl}from"../Form/FormControl/FormControl.esm.js";export{FormGroup}from"../Form/FormGroup/FormGroup.esm.js";export{FormHelperText}from"../Form/FormHelperText/FormHelperText.esm.js";export{Input}from"../Form/Input/Input.esm.js";export{InputWrapper}from"../Form/Wrapper/InputWrapper/InputWrapper.esm.js";export{Label}from"../Form/Label/Label.esm.js";export{Option}from"../Form/Select/Option.esm.js";export{Radio}from"../Form/Radio/Radio.esm.js";export{RadioWrapper}from"../Form/Wrapper/RadioWrapper/RadioWrapper.esm.js";export{Select}from"../Form/Select/Select.esm.js";export{Textarea}from"../Form/Textarea/Textarea.esm.js";export{Toggle}from"../Form/Toggle/Toggle.esm.js";export{CheckboxWrapper}from"../Form/Wrapper/CheckboxWrapper/CheckboxWrapper.esm.js";export{TextareaWrapper}from"../Form/Wrapper/TextareaWrapper/TextareaWrapper.esm.js";export{SelectWrapper}from"../Form/Wrapper/SelectWrapper/SelectWrapper.esm.js";export{Wizard}from"../Wizard/Wizard.esm.js";export{WizardActions}from"../Wizard/WizardActions/WizardActions.esm.js";export{WizardSteps}from"../Wizard/WizardSteps/WizardSteps.esm.js";export{BaseWizardSteps}from"../Wizard/BaseWizardSteps/BaseWizardSteps.esm.js";export{DataGrid}from"../DataGrid/DataGrid.esm.js";export{DataGridRow}from"../DataGrid/DataGridBody/DataGridRow.esm.js";export{DataGridCell}from"../DataGrid/DataGridBody/DataGridCell.esm.js";export{Banner}from"../Notifications/Banner/Banner.esm.js";
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/package.json
CHANGED
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
@use "../../mixins.module.scss";
|
|
18
|
+
|
|
19
|
+
@mixin stepState($status: "waiting") {
|
|
20
|
+
& .step-content .step {
|
|
21
|
+
color: var(--stepper-default-text-color);
|
|
22
|
+
|
|
23
|
+
@if $status == "current" {
|
|
24
|
+
background-color: var(--stepper-current-color);
|
|
25
|
+
border-color: var(--stepper-current-color);
|
|
26
|
+
} @else if $status == "done" {
|
|
27
|
+
background-color: var(--stepper-done-color);
|
|
28
|
+
border-color: var(--stepper-done-color);
|
|
29
|
+
} @else if $status == "error" {
|
|
30
|
+
background-color: var(--stepper-error-color);
|
|
31
|
+
border-color: var(--stepper-error-color);
|
|
32
|
+
} @else if $status == "waiting" {
|
|
33
|
+
color: var(--stepper-waiting-color);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:not(:last-child)::after {
|
|
38
|
+
@if $status == "current" or $status == "error" {
|
|
39
|
+
border-color: var(--stepper-line-color);
|
|
40
|
+
} @else if $status == "done" {
|
|
41
|
+
border-color: var(--stepper-line-bold-color);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
& .step-content .step {
|
|
47
|
+
@if $status == "current" {
|
|
48
|
+
border-color: var(--stepper-current-hover-color);
|
|
49
|
+
background-color: var(--stepper-current-hover-color);
|
|
50
|
+
} @else if $status == "done" {
|
|
51
|
+
border-color: var(--stepper-done-hover-color);
|
|
52
|
+
background-color: var(--stepper-done-hover-color);
|
|
53
|
+
} @else if $status == "error" {
|
|
54
|
+
border-color: var(--stepper-error-hover-color);
|
|
55
|
+
background-color: var(--stepper-error-hover-color);
|
|
56
|
+
} @else if $status == "waiting" {
|
|
57
|
+
border: 2px solid var(--stepper-waiting-hover-color);
|
|
58
|
+
color: var(--stepper-waiting-hover-color);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:active {
|
|
64
|
+
& .step-content .step {
|
|
65
|
+
@if $status == "current" {
|
|
66
|
+
border-color: var(--stepper-current-active-color);
|
|
67
|
+
background-color: var(--stepper-current-active-color);
|
|
68
|
+
} @else if $status == "done" {
|
|
69
|
+
border-color: var(--stepper-done-active-color);
|
|
70
|
+
background-color: var(--stepper-done-active-color);
|
|
71
|
+
} @else if $status == "error" {
|
|
72
|
+
border-color: var(--stepper-error-active-color);
|
|
73
|
+
background-color: var(--stepper-error-active-color);
|
|
74
|
+
} @else if $status == "waiting" {
|
|
75
|
+
border: 2px solid var(--stepper-waiting-active-color);
|
|
76
|
+
color: var(--stepper-waiting-active-color);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:disabled {
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
|
|
84
|
+
& .step-content .step {
|
|
85
|
+
@if $status == "current" {
|
|
86
|
+
border-color: var(--stepper-current-disabled-color);
|
|
87
|
+
background-color: var(--stepper-current-disabled-color);
|
|
88
|
+
} @else if $status == "done" {
|
|
89
|
+
border-color: var(--stepper-done-disabled-color);
|
|
90
|
+
background-color: var(--stepper-done-disabled-color);
|
|
91
|
+
} @else if $status == "error" {
|
|
92
|
+
border-color: var(--stepper-error-disabled-color);
|
|
93
|
+
background-color: var(--stepper-error-disabled-color);
|
|
94
|
+
} @else if $status == "waiting" {
|
|
95
|
+
border: 2px solid var(--stepper-waiting-disabled-color);
|
|
96
|
+
color: var(--stepper-waiting-disabled-color);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
& .step-content .label {
|
|
101
|
+
color: var(--stepper-label-disabled-color);
|
|
102
|
+
|
|
103
|
+
& .caption {
|
|
104
|
+
color: if(
|
|
105
|
+
$status == "error",
|
|
106
|
+
var(--stepper-caption-error-disabled-color),
|
|
107
|
+
var(--stepper-caption-disabled-color)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
&:not(:last-child)::after {
|
|
112
|
+
border-color: if(
|
|
113
|
+
$status == "done",
|
|
114
|
+
var(--stepper-line-bold-disabled-color),
|
|
115
|
+
var(--stepper-line-disabled-color)
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.step-wrapper {
|
|
122
|
+
display: flex;
|
|
123
|
+
flex: 1;
|
|
124
|
+
flex-direction: row;
|
|
125
|
+
justify-content: center;
|
|
126
|
+
align-items: center;
|
|
127
|
+
background-color: transparent;
|
|
128
|
+
border: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
margin: 0;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
|
|
133
|
+
@include mixins.focusVisibleOutline($outlineOffset: 0px);
|
|
134
|
+
|
|
135
|
+
.step-content {
|
|
136
|
+
display: flex;
|
|
137
|
+
justify-content: center;
|
|
138
|
+
align-items: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:last-child {
|
|
142
|
+
flex-grow: 0;
|
|
143
|
+
flex-basis: fit-content;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&:not(:last-child)::after {
|
|
147
|
+
content: "";
|
|
148
|
+
margin: 0 0.5rem;
|
|
149
|
+
flex-grow: 1;
|
|
150
|
+
min-width: 0.5rem;
|
|
151
|
+
border-bottom: 2px solid var(--stepper-line-color);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.vertical {
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-direction: column;
|
|
157
|
+
flex-grow: 1;
|
|
158
|
+
|
|
159
|
+
&:last-child {
|
|
160
|
+
flex-grow: 0;
|
|
161
|
+
flex-basis: fit-content;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&:not(:last-child)::after {
|
|
165
|
+
content: "";
|
|
166
|
+
border-bottom: none;
|
|
167
|
+
margin: 0.5rem 0 0.5rem 1.6875rem;
|
|
168
|
+
border-left: 2px solid var(--stepper-line-color);
|
|
169
|
+
min-height: 0.5rem;
|
|
170
|
+
height: 100%;
|
|
171
|
+
width: 100%;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&.waiting {
|
|
176
|
+
@include stepState($status: "waiting");
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&.current {
|
|
180
|
+
@include stepState($status: "current");
|
|
181
|
+
|
|
182
|
+
& .step-content .label {
|
|
183
|
+
font-weight: 700;
|
|
184
|
+
& .caption {
|
|
185
|
+
font-weight: 400;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&.done {
|
|
191
|
+
@include stepState($status: "done");
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&.error {
|
|
195
|
+
@include stepState($status: "error");
|
|
196
|
+
|
|
197
|
+
& .step-content .label .caption {
|
|
198
|
+
color: var(--stepper-caption-error-color);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.step {
|
|
204
|
+
flex-shrink: 0;
|
|
205
|
+
box-sizing: border-box;
|
|
206
|
+
display: flex;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
align-items: center;
|
|
209
|
+
width: 1.75rem;
|
|
210
|
+
height: 1.75rem;
|
|
211
|
+
border: 2px solid var(--stepper-waiting-color);
|
|
212
|
+
border-radius: 50%;
|
|
213
|
+
font-size: var(--font-size-form-label);
|
|
214
|
+
font-family: var(--font-family);
|
|
215
|
+
font-weight: 700;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.label {
|
|
219
|
+
flex-shrink: 0;
|
|
220
|
+
position: relative;
|
|
221
|
+
margin-left: 0.5rem;
|
|
222
|
+
color: var(--stepper-label-color);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.caption {
|
|
226
|
+
position: absolute;
|
|
227
|
+
top: 1.25rem;
|
|
228
|
+
left: 0;
|
|
229
|
+
color: var(--stepper-caption-color);
|
|
230
|
+
font-size: 0.75rem;
|
|
231
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, {
|
|
18
|
+
ComponentPropsWithRef,
|
|
19
|
+
ForwardRefRenderFunction,
|
|
20
|
+
useLayoutEffect,
|
|
21
|
+
useRef,
|
|
22
|
+
useState
|
|
23
|
+
} from "react";
|
|
24
|
+
import { Icon, Icons } from "../Icon/Icon";
|
|
25
|
+
import classes from "./Step.module.scss";
|
|
26
|
+
|
|
27
|
+
export type StepStatus = "waiting" | "current" | "done" | "error";
|
|
28
|
+
|
|
29
|
+
export interface Props extends ComponentPropsWithRef<"button"> {
|
|
30
|
+
status: StepStatus;
|
|
31
|
+
label: string;
|
|
32
|
+
caption?: string;
|
|
33
|
+
index?: number;
|
|
34
|
+
lastStep?: boolean;
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
direction?: "horizontal" | "vertical";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const getStepContent = (index: number, status: StepStatus) => {
|
|
40
|
+
switch (status) {
|
|
41
|
+
case "waiting":
|
|
42
|
+
return String(index + 1);
|
|
43
|
+
case "current":
|
|
44
|
+
return String(index + 1);
|
|
45
|
+
case "done":
|
|
46
|
+
return <Icon icon={Icons.Checkmark} />;
|
|
47
|
+
case "error":
|
|
48
|
+
return "!";
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const StepComponent: ForwardRefRenderFunction<HTMLButtonElement, Props> = (
|
|
53
|
+
{ label, caption, status, index, direction, disabled, lastStep, ...rest }: Props,
|
|
54
|
+
ref
|
|
55
|
+
) => {
|
|
56
|
+
const stepIndex = index ?? 0;
|
|
57
|
+
const additionalClasses = [classes[status]];
|
|
58
|
+
const [stepContentHeight, setStepContentHeight] = useState<number>(28);
|
|
59
|
+
const [stepContentWidth, setStepContentWidth] = useState<number>(28);
|
|
60
|
+
direction === "vertical" && additionalClasses.push(classes["vertical"]);
|
|
61
|
+
|
|
62
|
+
const captionRef = useRef<HTMLSpanElement>(null);
|
|
63
|
+
const labelRef = useRef<HTMLSpanElement>(null);
|
|
64
|
+
const stepContentRef = useRef<HTMLDivElement>(null);
|
|
65
|
+
|
|
66
|
+
useLayoutEffect(() => {
|
|
67
|
+
if (captionRef.current && stepContentRef.current && labelRef.current && lastStep) {
|
|
68
|
+
if (direction == "vertical") {
|
|
69
|
+
const capionHeight = captionRef.current.getBoundingClientRect().height;
|
|
70
|
+
const stepContentHeight = stepContentRef.current.getBoundingClientRect().height;
|
|
71
|
+
setStepContentHeight(capionHeight + stepContentHeight);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (direction == "horizontal") {
|
|
75
|
+
const captionWidth = captionRef.current.getBoundingClientRect().width;
|
|
76
|
+
const labelWidth = labelRef.current.getBoundingClientRect().width;
|
|
77
|
+
setStepContentWidth(captionWidth > labelWidth ? captionWidth + 36 : labelWidth + 36);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, []);
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<button
|
|
84
|
+
{...rest}
|
|
85
|
+
ref={ref}
|
|
86
|
+
disabled={disabled}
|
|
87
|
+
aria-current={status === "current" ? "step" : undefined}
|
|
88
|
+
className={`${classes["step-wrapper"]} ${additionalClasses.join(" ")}`}
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
style={{
|
|
92
|
+
height: lastStep && direction == "vertical" ? `${stepContentHeight}px` : "auto",
|
|
93
|
+
width: lastStep && direction == "horizontal" ? `${stepContentWidth}px` : "auto"
|
|
94
|
+
}}
|
|
95
|
+
>
|
|
96
|
+
<div ref={stepContentRef} className={classes["step-content"]}>
|
|
97
|
+
<div aria-hidden className={classes["step"]}>
|
|
98
|
+
{getStepContent(stepIndex, status)}
|
|
99
|
+
</div>
|
|
100
|
+
<span ref={labelRef} className={classes["label"]}>
|
|
101
|
+
{label}
|
|
102
|
+
<span ref={captionRef} className={classes["caption"]}>
|
|
103
|
+
{caption}
|
|
104
|
+
</span>
|
|
105
|
+
</span>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</button>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const Step = React.forwardRef(StepComponent);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Stepper, Props } from "./Stepper";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
|
|
5
|
+
const defaultParams: Props = {
|
|
6
|
+
steps: [],
|
|
7
|
+
direction: "horizontal"
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const createStepper = (params?: (defaultParams: Props) => Props) => {
|
|
11
|
+
let parameters: Props = defaultParams;
|
|
12
|
+
if (params) {
|
|
13
|
+
parameters = params(defaultParams);
|
|
14
|
+
}
|
|
15
|
+
const queries = render(<Stepper {...parameters} data-testid="Stepper" />);
|
|
16
|
+
const StepperComponent = queries.getByTestId("Stepper");
|
|
17
|
+
|
|
18
|
+
return {
|
|
19
|
+
...queries,
|
|
20
|
+
StepperComponent
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
describe("<Stepper/> should render", () => {
|
|
25
|
+
it("should render without crashing", () => {
|
|
26
|
+
const { StepperComponent } = createStepper();
|
|
27
|
+
|
|
28
|
+
expect(StepperComponent).toBeDefined();
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it("should render given steps", () => {
|
|
32
|
+
const { StepperComponent, getAllByText } = createStepper(params => ({
|
|
33
|
+
...params,
|
|
34
|
+
steps: [
|
|
35
|
+
{
|
|
36
|
+
label: "Step 1",
|
|
37
|
+
status: "waiting",
|
|
38
|
+
caption: "Caption"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: "Step 2",
|
|
42
|
+
status: "current",
|
|
43
|
+
caption: "Caption"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: "Step 3",
|
|
47
|
+
status: "done",
|
|
48
|
+
caption: "Caption"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: "Step 4",
|
|
52
|
+
status: "error",
|
|
53
|
+
caption: "Caption"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}));
|
|
57
|
+
|
|
58
|
+
expect(StepperComponent).toBeDefined();
|
|
59
|
+
|
|
60
|
+
expect(getAllByText(/Step/i)).toHaveLength(4);
|
|
61
|
+
expect(getAllByText(/Caption/i)).toHaveLength(4);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("should render the horizontal stepper", () => {
|
|
65
|
+
const { StepperComponent, getAllByText } = createStepper(params => ({
|
|
66
|
+
...params,
|
|
67
|
+
direction: "horizontal"
|
|
68
|
+
}));
|
|
69
|
+
|
|
70
|
+
expect(StepperComponent).toBeDefined();
|
|
71
|
+
expect(StepperComponent.classList.contains("horizontal")).toBe(true);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it("should render the vertical stepper", () => {
|
|
75
|
+
const { StepperComponent } = createStepper(params => ({
|
|
76
|
+
...params,
|
|
77
|
+
direction: "vertical"
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
expect(StepperComponent).toBeDefined();
|
|
81
|
+
expect(StepperComponent.classList.contains("vertical")).toBe(true);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2022 OneWelcome B.V.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import React, { ComponentPropsWithRef } from "react";
|
|
18
|
+
import { Step, Props as StepProps } from "./Step";
|
|
19
|
+
import classes from "./Stepper.module.scss";
|
|
20
|
+
|
|
21
|
+
export interface Props extends ComponentPropsWithRef<"div"> {
|
|
22
|
+
steps: StepProps[];
|
|
23
|
+
direction: "horizontal" | "vertical";
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const Stepper = ({ steps, direction = "horizontal", ...rest }: Props) => {
|
|
27
|
+
return (
|
|
28
|
+
<div
|
|
29
|
+
{...rest}
|
|
30
|
+
className={`${classes["stepper"]} ${
|
|
31
|
+
direction === "horizontal" ? classes["horizontal"] : classes["vertical"]
|
|
32
|
+
}`}
|
|
33
|
+
>
|
|
34
|
+
{steps.map((step, index) => (
|
|
35
|
+
<Step
|
|
36
|
+
{...step}
|
|
37
|
+
key={step.label.toLowerCase().replace(/\s/, "-")}
|
|
38
|
+
index={index}
|
|
39
|
+
direction={direction}
|
|
40
|
+
lastStep={index + 1 === steps.length}
|
|
41
|
+
/>
|
|
42
|
+
))}
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
@@ -26,6 +26,7 @@ interface CSSProperties {
|
|
|
26
26
|
colorPrimary?: string;
|
|
27
27
|
colorSecondary?: string;
|
|
28
28
|
colorTertiary?: string;
|
|
29
|
+
colorPrimary100?: string;
|
|
29
30
|
colorPrimary300?: string;
|
|
30
31
|
colorPrimary500?: string;
|
|
31
32
|
colorPrimary600?: string;
|
|
@@ -33,6 +34,7 @@ interface CSSProperties {
|
|
|
33
34
|
colorPrimary900?: string;
|
|
34
35
|
colorBlueGrey100?: string;
|
|
35
36
|
colorBlueGrey200?: string;
|
|
37
|
+
colorBlueGrey300?: string;
|
|
36
38
|
colorBlueGrey400?: string;
|
|
37
39
|
colorBlueGrey25?: string;
|
|
38
40
|
colorBlueGrey25Transparent?: string;
|
|
@@ -42,6 +44,7 @@ interface CSSProperties {
|
|
|
42
44
|
colorBlueGrey800?: string;
|
|
43
45
|
colorBlueGrey900?: string;
|
|
44
46
|
colorGreen100?: string;
|
|
47
|
+
colorGreen200?: string;
|
|
45
48
|
colorGreen500?: string;
|
|
46
49
|
colorGreen600?: string;
|
|
47
50
|
colorGreen700?: string;
|
|
@@ -51,10 +54,11 @@ interface CSSProperties {
|
|
|
51
54
|
colorOrange500?: string;
|
|
52
55
|
colorOrange600?: string;
|
|
53
56
|
colorOrange700?: string;
|
|
57
|
+
colorRed200?: string;
|
|
54
58
|
colorRed500?: string;
|
|
55
|
-
colorWhite?: string;
|
|
56
59
|
colorRed600?: string;
|
|
57
60
|
colorRed700?: string;
|
|
61
|
+
colorWhite?: string;
|
|
58
62
|
colorBlack100?: string;
|
|
59
63
|
colorBlack20?: string;
|
|
60
64
|
colorBlack10?: string;
|
|
@@ -120,6 +124,33 @@ interface CSSProperties {
|
|
|
120
124
|
snackbarErrorBackgroundColor?: string;
|
|
121
125
|
snackbarWarningBackgroundColor?: string;
|
|
122
126
|
snackbarBorderRadius?: string;
|
|
127
|
+
stepperWaitingColor?: string;
|
|
128
|
+
stepperWaitingHoverColor?: string;
|
|
129
|
+
stepperWaitingActiveColor?: string;
|
|
130
|
+
stepperWaitingDisabledColor?: string;
|
|
131
|
+
stepperCurrentColor?: string;
|
|
132
|
+
stepperCurrentHoverColor?: string;
|
|
133
|
+
stepperCurrentActiveColor?: string;
|
|
134
|
+
stepperCurrentDisabledColor?: string;
|
|
135
|
+
stepperDoneColor?: string;
|
|
136
|
+
stepperDoneHoverColor?: string;
|
|
137
|
+
stepperDoneActiveColor?: string;
|
|
138
|
+
stepperDoneDisabledColor?: string;
|
|
139
|
+
stepperErrorColor?: string;
|
|
140
|
+
stepperErrorHoverColor?: string;
|
|
141
|
+
stepperErrorActiveColor?: string;
|
|
142
|
+
stepperErrorDisabledColor?: string;
|
|
143
|
+
stepperDefaultTextColor?: string;
|
|
144
|
+
stepperLineColor?: string;
|
|
145
|
+
stepperLineBoldColor?: string;
|
|
146
|
+
stepperLineDisabledColor?: string;
|
|
147
|
+
stepperLineBoldDisabledColor?: string;
|
|
148
|
+
stepperLabelColor?: string;
|
|
149
|
+
stepperCaptionColor?: string;
|
|
150
|
+
stepperCaptionErrorColor?: string;
|
|
151
|
+
stepperLabelDisabledColor?: string;
|
|
152
|
+
stepperCaptionDisabledColor?: string;
|
|
153
|
+
stepperCaptionErrorDisabledColor?: string;
|
|
123
154
|
bannerBorderRadius?: string;
|
|
124
155
|
bannerBorderWidth?: string;
|
|
125
156
|
dataGridRowBackgroundColor?: string;
|
|
@@ -169,6 +200,7 @@ export interface Props extends HTMLAttributes<HTMLDivElement> {
|
|
|
169
200
|
|
|
170
201
|
export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
171
202
|
const defaultProperties: CSSProperties = {
|
|
203
|
+
colorPrimary100: "#CDD0EA",
|
|
172
204
|
colorPrimary300: "#6871BF",
|
|
173
205
|
colorPrimary500: "#041295",
|
|
174
206
|
colorPrimary600: "#030F77",
|
|
@@ -179,12 +211,14 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
179
211
|
colorBlueGrey50: "#EEEFF3",
|
|
180
212
|
colorBlueGrey100: "#DEDEE6",
|
|
181
213
|
colorBlueGrey200: "#BCBECE",
|
|
214
|
+
colorBlueGrey300: "#9A9DB5",
|
|
182
215
|
colorBlueGrey400: "#797D9C",
|
|
183
216
|
colorBlueGrey500: "#5D607E",
|
|
184
217
|
colorBlueGrey700: "#383A4B",
|
|
185
218
|
colorBlueGrey800: "#252733",
|
|
186
219
|
colorBlueGrey900: "#131319",
|
|
187
220
|
colorGreen100: "#D1E6DA",
|
|
221
|
+
colorGreen200: "#A2CDB4",
|
|
188
222
|
colorGreen500: "#178244",
|
|
189
223
|
colorGreen600: "#126836",
|
|
190
224
|
colorGreen700: "#0E4E29",
|
|
@@ -193,6 +227,7 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
193
227
|
colorOrange500: "#E07900",
|
|
194
228
|
colorOrange600: "#B36100",
|
|
195
229
|
colorOrange700: "#864900",
|
|
230
|
+
colorRed200: "#F3A599",
|
|
196
231
|
colorRed500: "#E01E00",
|
|
197
232
|
colorRed600: "#B31800",
|
|
198
233
|
colorRed700: "#861200",
|
|
@@ -266,6 +301,33 @@ export const BaseStyling = ({ children, properties = {} }: Props) => {
|
|
|
266
301
|
snackbarErrorBackgroundColor: "var(--color-red500)",
|
|
267
302
|
snackbarWarningBackgroundColor: "var(--color-orange500)",
|
|
268
303
|
snackbarBorderRadius: "2px",
|
|
304
|
+
stepperWaitingColor: "var(--color-blue-grey200)",
|
|
305
|
+
stepperWaitingHoverColor: "var(--color-blue-grey300)",
|
|
306
|
+
stepperWaitingActiveColor: "var(--color-blue-grey400)",
|
|
307
|
+
stepperWaitingDisabledColor: "var(--color-blue-grey100)",
|
|
308
|
+
stepperCurrentColor: "var(--color-primary500)",
|
|
309
|
+
stepperCurrentHoverColor: "var(--color-primary600)",
|
|
310
|
+
stepperCurrentActiveColor: "var(--color-primary700)",
|
|
311
|
+
stepperCurrentDisabledColor: "var(--color-primary100)",
|
|
312
|
+
stepperDoneColor: "var(--color-green500)",
|
|
313
|
+
stepperDoneHoverColor: "var(--color-green600)",
|
|
314
|
+
stepperDoneActiveColor: "var(--color-green700)",
|
|
315
|
+
stepperDoneDisabledColor: "var(--color-green200)",
|
|
316
|
+
stepperErrorColor: "var(--color-red500)",
|
|
317
|
+
stepperErrorHoverColor: "var(--color-red600)",
|
|
318
|
+
stepperErrorActiveColor: "var(--color-red700)",
|
|
319
|
+
stepperErrorDisabledColor: "var(--color-red200)",
|
|
320
|
+
stepperDefaultTextColor: "var(--color-white)",
|
|
321
|
+
stepperLineColor: "var(--color-blue-grey300)",
|
|
322
|
+
stepperLineBoldColor: "var(--color-blue-grey700)",
|
|
323
|
+
stepperLineDisabledColor: "var(--color-blue-grey100)",
|
|
324
|
+
stepperLineBoldDisabledColor: "var(--color-blue-grey300)",
|
|
325
|
+
stepperLabelColor: "var(--color-blue-grey900)",
|
|
326
|
+
stepperCaptionColor: "var(--color-blue-grey500)",
|
|
327
|
+
stepperCaptionErrorColor: "var(--color-red500)",
|
|
328
|
+
stepperLabelDisabledColor: "var(--color-blue-grey400)",
|
|
329
|
+
stepperCaptionDisabledColor: "var(--color-blue-grey400)",
|
|
330
|
+
stepperCaptionErrorDisabledColor: "var(--color-red200)",
|
|
269
331
|
bannerBorderRadius: "2px",
|
|
270
332
|
bannerBorderWidth: "0 0 0 4px",
|
|
271
333
|
dataGridRowBackgroundColor: "transparent",
|
package/src/index.ts
CHANGED
|
@@ -52,6 +52,8 @@ export { Skeleton } from "./components/Skeleton/Skeleton";
|
|
|
52
52
|
export type { Props as SkeletonProps } from "./components/Skeleton/Skeleton";
|
|
53
53
|
export { StatusIndicator } from "./components/StatusIndicator/StatusIndicator";
|
|
54
54
|
export type { Props as StatusIndicatorProps } from "./components/StatusIndicator/StatusIndicator";
|
|
55
|
+
export { Stepper } from "./components/Stepper/Stepper";
|
|
56
|
+
export type { Props as StepperProps } from "./components/Stepper/Stepper";
|
|
55
57
|
export { Pagination } from "./components/Pagination/Pagination";
|
|
56
58
|
export type {
|
|
57
59
|
Props as PaginationProps,
|