@atom-learning/components 2.11.1 → 2.12.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/CHANGELOG.md +4 -3
- package/dist/components/chip/Chip.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.d.ts +3 -2
- package/dist/components/heading/Heading.d.ts +1 -0
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.d.ts +2 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/list/List.d.ts +2 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/navigation/NavigationMenuItem.d.ts +3 -2
- package/dist/components/stepper/Stepper.js +1 -1
- package/dist/components/stepper/StepperStepBullet.js +1 -1
- package/dist/components/stepper/StepperStepContainer.d.ts +2 -1
- package/dist/components/stepper/StepperStepContainer.js +1 -1
- package/dist/components/stepper/StepperStepLabel.d.ts +3 -2
- package/dist/components/stepper/StepperSteps.js +1 -1
- package/dist/components/stepper/stepper-context/StepperContext.js +1 -1
- package/dist/components/stepper/types.d.ts +3 -0
- package/dist/components/text/Text.d.ts +37 -5
- package/dist/components/text/Text.js +1 -1
- package/dist/components/top-bar/TopBarBrand.d.ts +3 -2
- package/dist/docgen.json +1 -1
- package/dist/docs/Stepper.mdx +26 -2
- package/dist/index.cjs.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
# [2.12.0](https://github.com/Atom-Learning/components/compare/v2.11.1...v2.12.0) (2022-11-09)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* added noCapsize prop to Text based components, added fix for overflowing text in button ([b85db94](https://github.com/Atom-Learning/components/commit/b85db943729d93fedfe9768b9891770278827b3a))
|
|
7
|
+
* set noCapsize to true by default for List (to match previous version) ([0ac351a](https://github.com/Atom-Learning/components/commit/0ac351af60917f9fedfd31b646f14b4f46292573))
|
|
7
8
|
|
|
8
9
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
9
10
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Box as
|
|
1
|
+
import*as e from"react";import{Box as C}from"../box/Box.js";import{Flex as g}from"../flex/Flex.js";import{Icon as c}from"../icon/Icon.js";import{getTextVariant as a}from"../text/Text.js";import{styled as m}from"../../stitches.js";import{overrideStitchesVariantValue as z}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";const d={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},h=m("span",{display:"inline-flex",alignItems:"center",px:"$1",flexGrow:1,...d,"& > *:not(:last-child)":{mr:"$1"}}),$={sm:"sm",md:"sm",lg:"md"},f=m(c,{flexShrink:0}),l=({...r})=>{const i=e.useContext(p),{size:t}=i,n=e.useMemo(()=>z(t,o=>$[o]),[t]);return e.createElement(f,{...r,size:n})},u=({children:r,...i})=>{const t=e.Children.toArray(r),n=t.length<=1;return e.createElement(h,{...i},t.map(o=>!n&&typeof o=="string"?e.createElement(C,{as:"span",css:d,key:o},o):e.isValidElement(o)&&o.type===c?e.createElement(l,{...o.props}):o))},x=m(g,{px:"$2",border:"1px solid",borderRadius:"$0",alignItems:"center",fontFamily:"$body",maxWidth:"100%",borderColor:"$primary",color:"$primaryMid",bg:"$primaryLight","&[data-disabled]":{opacity:"0.3",pointerEvents:"none"},variants:{size:{sm:{height:"$2",...a({size:"sm"})},md:{height:"$3",...a({size:"sm"})},lg:{height:"$4",...a({size:"md"})}}}}),p=e.createContext({}),y=({size:r,children:i})=>{const t=e.useMemo(()=>({size:r}),[r]);return e.createElement(p.Provider,{value:t},i)},E=e.forwardRef(({asWorkaround:r,size:i="md",...t},n)=>e.createElement(y,{size:i},e.createElement(x,{ref:n,as:r,size:i,...t}))),s=E;s.Content=u,s.Icon=l,s.displayName="Chip";export{s as Chip,l as ChipIcon,p as ChipRootContext,y as ChipRootProvider,h as StyledChipContent,f as StyledChipIcon,x as StyledRoot};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const EmptyStateBody: import("@stitches/react/types/styled-component").StyledComponent<import("react").ForwardRefExoticComponent<Omit<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | keyof import("react").HTMLAttributes<HTMLParagraphElement>> & {
|
|
3
3
|
ref?: ((instance: HTMLParagraphElement | null) => void) | import("react").RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
|
-
}, "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
5
|
-
size?:
|
|
4
|
+
}, "size" | "css" | "noCapsize"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
6
|
+
noCapsize?: boolean | "true" | undefined;
|
|
6
7
|
}, {
|
|
7
8
|
sm: string;
|
|
8
9
|
md: string;
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import type { Override } from '../../utilities';
|
|
3
3
|
export declare const StyledHeading: import("@stitches/react/types/styled-component").StyledComponent<"h2", {
|
|
4
4
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | "xxl" | undefined;
|
|
5
|
+
noCapsize?: boolean | "true" | undefined;
|
|
5
6
|
}, {
|
|
6
7
|
sm: string;
|
|
7
8
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{styled as
|
|
1
|
+
import*as i from"react";import{styled as f}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const t=f("h2",{color:"$tonal600",fontFamily:"$display",fontWeight:700,m:0,variants:{size:{xs:{fontFamily:"$body",fontWeight:600,fontSize:"$md",lineHeight:1.5,...e(.3864)},sm:{fontSize:"$lg",lineHeight:1.14,...e(.2174,.2254)},md:{fontSize:"$xl",lineHeight:1.14,...e(.2174,.2254)},lg:{fontSize:"$2xl",lineHeight:1.08,...e(.1865,.1945)},xl:{fontSize:"$3xl",lineHeight:1.12,...e(.206,.214)},xxl:{fontSize:"$4xl",lineHeight:1.06,...e(.1793,.1873)}},noCapsize:{true:{"&::before, &::after":{display:"none"}}}}}),o=i.forwardRef(({size:n="md",...l},a)=>i.createElement(t,{ref:a,size:n,...l}));o.displayName="Heading";export{o as Heading,t as StyledHeading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as i}from"../../stitches.js";import{getTextVariant as t}from"../text/Text.js";const p=i("label",{color:"$tonal500",fontFamily:"$body",m:0,variants:{size:{sm:t({size:"sm"}),md:t({size:"md"})},type:{block:{display:"block",fontWeight:600},inline:{display:"flex",fontWeight:400,maxWidth:"max-content"}},align:{start:{},center:{}},direction:{reverse:{},row:{}}},compoundVariants:[{type:"inline",align:"start",css:{alignItems:"flex-start"}},{type:"inline",align:"center",css:{alignItems:"center"}},{type:"inline",direction:"reverse",css:{flexDirection:"row-reverse"}},{type:"inline",direction:"row",css:{flexDirection:"row"}}]}),y=i("span",{color:"$danger",ml:"$1",fontWeight:400}),n=({align:r="start",as:a="label",direction:o="row",size:l="md",type:s="block",children:c,required:m,...d})=>e.createElement(p,{as:a,size:l,type:s,align:r,direction:o,...d},c,m&&e.createElement(y,{"aria-hidden":!0},"*"));n.displayName="Label";export{n as Label};
|
|
@@ -2,7 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { NavigatorActions } from '../../types';
|
|
3
3
|
import { Override } from '../../utilities';
|
|
4
4
|
export declare const StyledLink: import("@stitches/react/types/styled-component").StyledComponent<"a", {
|
|
5
|
-
size?:
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
6
|
+
noCapsize?: boolean | "true" | undefined;
|
|
6
7
|
}, {
|
|
7
8
|
sm: string;
|
|
8
9
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as l}from"../../stitches.js";import{StyledHeading as c}from"../heading/Heading.js";import{StyledLi as f}from"../list/List.js";import{StyledText as d,textVariants as p}from"../text/Text.js";const y=l("span",{position:"relative"}),t=l("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${d} > &, ${c} > &, ${f} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:p}),m=e.forwardRef(({children:r,size:o="md",onClick:s,href:i,...n},a)=>i?e.createElement(t,{size:o,...n,ref:a,href:i},r):e.createElement(t,{as:"button",size:o,...n,ref:a,onClick:s},e.createElement(y,null,r)));m.displayName="Link";export{m as Link,t as StyledLink};
|
|
@@ -266,8 +266,9 @@ export declare const StyledLi: import("@stitches/react/types/styled-component").
|
|
|
266
266
|
};
|
|
267
267
|
}>>;
|
|
268
268
|
export declare const StyledList: import("@stitches/react/types/styled-component").StyledComponent<"ul", {
|
|
269
|
-
size?: ("sm" | "md" | "lg" | "xl" | "xs") | undefined;
|
|
270
269
|
as?: "ol" | "ul" | undefined;
|
|
270
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
271
|
+
noCapsize?: boolean | "true" | undefined;
|
|
271
272
|
}, {
|
|
272
273
|
sm: string;
|
|
273
274
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as l}from"../../stitches.js";import{
|
|
1
|
+
import*as e from"react";import{styled as l}from"../../stitches.js";import{textVariants as d}from"../text/Text.js";const t=l("li",{}),o=l("ul",{fontFamily:"$body",m:"unset",p:"unset",[`& > ${t}`]:{"&:not(:last-child)":{mb:"$2"},"&:last-child":{mb:0}},variants:{...d,as:{ol:{pl:"$4",listStyle:"decimal",[`& > ${t}`]:{pl:"$1","&::marker":{fontSize:"$sm",fontWeight:"bold"}}},ul:{pl:"$3",[`& > ${t}`]:{pl:"$2","&::marker":{content:"\u2022",fontWeight:"bold"}}}}}}),i=e.forwardRef(({size:r="md",noCapsize:s=!0,ordered:a,...m},n)=>e.createElement(o,{ref:n,as:a?"ol":"ul",size:r,noCapsize:s,...m}));i.Item=t;export{i as List,t as StyledLi,o as StyledList};
|
|
@@ -2,8 +2,9 @@ import React from 'react';
|
|
|
2
2
|
import { CSS } from '../../stitches';
|
|
3
3
|
export declare const NavigationMenuDropdownItemTitle: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | keyof React.HTMLAttributes<HTMLParagraphElement>> & {
|
|
4
4
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
5
|
-
}, "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
6
|
-
size?:
|
|
5
|
+
}, "size" | "css" | "noCapsize"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
6
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
7
|
+
noCapsize?: boolean | "true" | undefined;
|
|
7
8
|
}, {
|
|
8
9
|
sm: string;
|
|
9
10
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import c from"invariant";import*as r from"react";import{Box as h}from"../box/Box.js";import{StepperProvider as C}from"./stepper-context/StepperContext.js";import{StepperStepBack as f}from"./StepperStepBack.js";import{StepperStepForward as w}from"./StepperStepForward.js";import{StepperSteps as u}from"./StepperSteps.js";const e=({children:s,stepCount:t,allowSkip:i,onComplete:n,onStepChange:l,direction:a="horizontal",steps:o,hideLabels:m=!1,showCompletedIcons:d=!1,css:S})=>{c(!(t&&o),"`Stepper` should only be given one of `stepCount` or `steps`. When both are provided, `steps` will be used and `stepCount` will be ignored.");const p=(o==null?void 0:o.length)||t||0;return r.createElement(C,{stepCount:p,allowSkip:i,onComplete:n,onStepChange:t?l:void 0,direction:a,steps:o||Array(p).fill(""),hideLabels:m,showCompletedIcons:d},r.createElement(h,{"aria-label":"progress",css:{width:"100%",...S}},s))};e.StepBack=f,e.StepForward=w,e.Steps=u,e.displayName="Stepper";export{e as Stepper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as e}from"../../stitches.js";import{Flex as o}from"../flex/Flex.js";const r=e(o,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",size:"$3",borderRadius:"50%",border:"none",bg:"$
|
|
1
|
+
import{styled as e}from"../../stitches.js";import{Flex as o}from"../flex/Flex.js";const r=e(o,{position:"relative",p:"$2",justifyContent:"center",alignItems:"center",size:"$3",borderRadius:"50%",border:"none",bg:"$tonal100",zIndex:1,flex:"none",variants:{status:{default:{bg:"$tonal100",color:"$tonal300"},active:{bg:"white",color:"$primaryMid",border:"2px solid",borderColor:"currentColor"},viewed:{bg:"white",border:"2px solid $tonal200",color:"$tonal600"},completed:{bg:"$primary",color:"white"},reviewed:{bg:"$primaryMid",color:"white"},success:{bg:"$success",color:"white"}}}});export{r as StepperStepBullet};
|
|
@@ -264,8 +264,9 @@ export declare const StepperStepContainer: import("@stitches/react/types/styled-
|
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
266
|
}>>, {
|
|
267
|
+
canInteract?: boolean | "true" | undefined;
|
|
267
268
|
direction?: "horizontal" | "vertical" | undefined;
|
|
268
|
-
separator?: "success" | "default" | "active" | undefined;
|
|
269
|
+
separator?: "success" | "default" | "active" | "viewed" | undefined;
|
|
269
270
|
status?: "success" | "default" | "active" | "viewed" | "completed" | "reviewed" | undefined;
|
|
270
271
|
}, {
|
|
271
272
|
sm: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as t}from"../../stitches.js";import{Flex as i}from"../flex/Flex.js";const o=t(i,{position:"relative",fontFamily:"$body",fontWeight:600,fontSize:"$md",alignItems:"center","&:not(:last-child)::after":{content:"",position:"absolute"},"&:focus-visible":{outline:"none"},variants:{direction:{vertical:{py:"$3",flexDirection:"row","&:not(:last-child)::after":{height:"100%",width:"4px",left:"14px",top:"50%"}},horizontal:{px:"$2",flexDirection:"column","&:not(:last-child)::after":{width:"100%",height:"4px",left:"50%",top:"14px"}}},separator:{default:{"&:not(:last-child)::after":{bg:"$
|
|
1
|
+
import{styled as t}from"../../stitches.js";import{Flex as i}from"../flex/Flex.js";const o=t(i,{position:"relative",fontFamily:"$body",fontWeight:600,fontSize:"$md",alignItems:"center","&:not(:last-child)::after":{content:"",position:"absolute"},"&:focus-visible":{outline:"none"},variants:{canInteract:{true:{}},direction:{vertical:{py:"$3",flexDirection:"row","&:not(:last-child)::after":{height:"100%",width:"4px",left:"14px",top:"50%"}},horizontal:{px:"$2",flexDirection:"column","&:not(:last-child)::after":{width:"100%",height:"4px",left:"50%",top:"14px"}}},separator:{default:{"&:not(:last-child)::after":{bg:"$tonal100"}},active:{"&:not(:last-child)::after":{bg:"$primary"}},success:{"&:not(:last-child)::after":{bg:"$success"}},viewed:{"&:not(:last-child)::after":{bg:"$tonal200"}}},status:{completed:{},active:{},default:{},viewed:{},success:{},reviewed:{}}},compoundVariants:[{canInteract:!0,status:"completed",css:{"&:hover":{"& :first-child":{bg:"$primaryMid",color:"white !important"},"& :last-child":{color:"$primaryMid"}},"&:focus-visible":{"& :first-child":{outline:"2px solid $primary",outlineOffset:"2px"}}}},{canInteract:!0,status:"active",css:{"&:hover":{"& :first-child":{borderColor:"$tonal400",color:"$tonal600"},"& :last-child":{color:"$tonal600"}},"&:focus-visible":{"& :first-child":{outline:"2px solid $primary",outlineOffset:"2px"}}}},{canInteract:!0,status:"viewed",css:{"&:hover":{"& :first-child":{borderColor:"$tonal400",color:"$tonal600"},"& :last-child":{color:"$tonal600"}},"&:focus-visible":{"& :first-child":{outline:"2px solid $primary !important",outlineOffset:"2px !important"}}}},{canInteract:!0,status:"reviewed",css:{"&:focus-visible":{"& :first-child":{outline:"2px solid $primary !important",outlineOffset:"2px !important"}}}}]});export{o as StepperStepContainer};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StepperStepLabel: import("@stitches/react/types/styled-component").StyledComponent<import("react").ForwardRefExoticComponent<Omit<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | keyof import("react").HTMLAttributes<HTMLParagraphElement>> & {
|
|
3
3
|
ref?: ((instance: HTMLParagraphElement | null) => void) | import("react").RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
|
-
}, "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
5
|
-
size?:
|
|
4
|
+
}, "size" | "css" | "noCapsize"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
5
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
6
|
+
noCapsize?: boolean | "true" | undefined;
|
|
6
7
|
}, {
|
|
7
8
|
sm: string;
|
|
8
9
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ok as
|
|
1
|
+
import{Ok as h}from"@atom-learning/icons";import*as n from"react";import{styled as b}from"../../stitches.js";import{Flex as v}from"../flex/Flex.js";import{Icon as D}from"../icon/Icon.js";import{useStepper as I}from"./stepper-context/StepperContext.js";import{StepperStepBullet as g}from"./StepperStepBullet.js";import{StepperStepContainer as T}from"./StepperStepContainer.js";import{StepperStepLabel as w}from"./StepperStepLabel.js";import{Status as t}from"./types.js";const L=b(v,{justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),U=({css:S})=>{const{steps:i,goToStep:m,activeStep:r,viewedSteps:a,allowSkip:l,direction:c,hideLabels:E,completedSteps:p,showCompletedIcons:u}=I(),d=o=>{const e=i[o];return e.status?e.status:p.length===i.length?t.SUCCESS:r===o&&p.includes(r)?t.REVIEWED:r===o?t.ACTIVE:p.includes(o)?t.COMPLETED:a.includes(o)?t.VIEWED:t.DEFAULT},C=o=>{var e;const s=(e=i[o])==null?void 0:e.status;return p.length===i.length?t.SUCCESS:s===t.SUCCESS?t.SUCCESS:s===t.COMPLETED||o<Math.max(...a)?t.ACTIVE:s===t.VIEWED?t.VIEWED:t.DEFAULT};return n.createElement(L,{css:S,direction:c},i.map((o,e)=>{const s=d(e),f=C(e);return n.createElement(T,{tabIndex:0,key:`step_${e}`,direction:c,separator:f,status:s,css:c==="horizontal"?{width:`calc(100% / ${i.length})`}:{height:`calc(100% / ${i.length})`},canInteract:l},n.createElement(g,{as:l?"button":"div",onClick:()=>l&&a.includes(e)?m==null?void 0:m(e):void 0,status:s,"aria-current":e===r?"step":void 0,"aria-label":o.label?"":`step ${e+1}`,"aria-labelledby":o.label?`step-${e}`:void 0,css:{cursor:l&&a.includes(e)?"pointer":"auto"}},o.status===t.SUCCESS||u&&s===t.COMPLETED?n.createElement(D,{is:h}):e+1),o.label&&!E&&n.createElement(w,{as:"span",id:`step-${e}`,direction:c,status:s},o.label))}))};export{U as StepperSteps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";const
|
|
1
|
+
import*as o from"react";const d=o.createContext({steps:[],goToPreviousStep:()=>null,goToNextStep:()=>null,goToStep:()=>null,activeStep:0,viewedSteps:[],allowSkip:!1,direction:"horizontal",hideLabels:!1,completedSteps:[],showCompletedIcons:!1}),b=({children:s,stepCount:i,allowSkip:S,onComplete:p,onStepChange:l,direction:a,steps:h,hideLabels:v,showCompletedIcons:w})=>{const[e,r]=o.useState(0),[m,g]=o.useState([0]),[C,f]=o.useState([]),c=!i;o.useEffect(()=>{g(t=>t.includes(e)?t:[...t,e]),l==null||l(e)},[e,l]);const T=()=>{const t=p&&e===i-1,u=e<i-1;if((p||u)&&f(n=>n.includes(e)?n:[...n,e]),t)return p==null?void 0:p();if(u)return r(n=>n+1)},x=()=>{r(t=>t-1)},P=t=>{r(t)};return o.createElement(d.Provider,{value:{steps:h||Array(i).fill(""),goToPreviousStep:c?void 0:x,goToNextStep:c?void 0:T,goToStep:c?void 0:P,activeStep:e,viewedSteps:m,completedSteps:C,allowSkip:S,direction:a,hideLabels:v,showCompletedIcons:w}},s)},E=()=>{const s=o.useContext(d);if(!s)throw new Error("Ensure that you wrap any components with the root component Stepper");return s};export{b as StepperProvider,E as useStepper};
|
|
@@ -23,6 +23,7 @@ export declare type Context = {
|
|
|
23
23
|
allowSkip?: boolean;
|
|
24
24
|
direction?: Direction;
|
|
25
25
|
hideLabels: boolean;
|
|
26
|
+
showCompletedIcons: boolean;
|
|
26
27
|
};
|
|
27
28
|
export declare type StepperProviderProps = {
|
|
28
29
|
stepCount: number;
|
|
@@ -32,6 +33,7 @@ export declare type StepperProviderProps = {
|
|
|
32
33
|
direction?: Direction;
|
|
33
34
|
steps: Step[];
|
|
34
35
|
hideLabels: boolean;
|
|
36
|
+
showCompletedIcons: boolean;
|
|
35
37
|
};
|
|
36
38
|
export interface IStepperProps {
|
|
37
39
|
css?: CSS;
|
|
@@ -42,6 +44,7 @@ export interface IStepperProps {
|
|
|
42
44
|
direction?: Direction;
|
|
43
45
|
steps?: Step[];
|
|
44
46
|
hideLabels?: boolean;
|
|
47
|
+
showCompletedIcons?: boolean;
|
|
45
48
|
}
|
|
46
49
|
export interface IStepperNavigateProps {
|
|
47
50
|
label?: (currentStep?: number) => string;
|
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { CSS } from '../../stitches';
|
|
3
3
|
import type { Override } from '../../utilities';
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export declare const textVariants: {
|
|
5
|
+
size: {
|
|
6
|
+
xs: {
|
|
7
|
+
fontSize: string;
|
|
8
|
+
lineHeight: number;
|
|
9
|
+
};
|
|
10
|
+
sm: {
|
|
11
|
+
fontSize: string;
|
|
12
|
+
lineHeight: number;
|
|
13
|
+
};
|
|
14
|
+
md: {
|
|
15
|
+
fontSize: string;
|
|
16
|
+
lineHeight: number;
|
|
17
|
+
};
|
|
18
|
+
lg: {
|
|
19
|
+
fontSize: string;
|
|
20
|
+
lineHeight: number;
|
|
21
|
+
};
|
|
22
|
+
xl: {
|
|
23
|
+
fontSize: string;
|
|
24
|
+
lineHeight: number;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
noCapsize: {
|
|
28
|
+
true: {
|
|
29
|
+
'&::before, &::after': {
|
|
30
|
+
display: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const getTextVariant: (options: {
|
|
36
|
+
size: keyof typeof textVariants.size;
|
|
37
|
+
noCapsize?: boolean;
|
|
38
|
+
}) => CSS;
|
|
8
39
|
export declare const StyledText: import("@stitches/react/types/styled-component").StyledComponent<"p", {
|
|
9
|
-
size?:
|
|
40
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
41
|
+
noCapsize?: boolean | "true" | undefined;
|
|
10
42
|
}, {
|
|
11
43
|
sm: string;
|
|
12
44
|
md: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"react";import{styled as l}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const f="md",t={size:{xs:{fontSize:"$xs",lineHeight:1.6,...e(.4364)},sm:{fontSize:"$sm",lineHeight:1.53,...e(.4056)},md:{fontSize:"$md",lineHeight:1.5,...e(.3864)},lg:{fontSize:"$lg",lineHeight:1.52,...e(.3983)},xl:{fontSize:"$xl",lineHeight:1.42,...e(.3506)}},noCapsize:{true:{"&::before, &::after":{display:"none"}}}},m=({size:i,noCapsize:o})=>({...t.size[i],...t.noCapsize[`${o}`]}),a=l("p",{color:"$tonal600",fontFamily:"$body",fontWeight:400,margin:0,"& > &":{"&:before, &:after":{display:"none"}},variants:t}),s=n.forwardRef(({size:i=f,...o},r)=>n.createElement(a,{size:i,...o,ref:r}));s.displayName="Text";export{a as StyledText,s as Text,m as getTextVariant,t as textVariants};
|
|
@@ -11,8 +11,9 @@ export declare const TopBarBrandLogo: {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const TopBarBrandName: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | keyof React.HTMLAttributes<HTMLParagraphElement>> & {
|
|
13
13
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
14
|
-
}, "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
15
|
-
size?:
|
|
14
|
+
}, "size" | "css" | "noCapsize"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
15
|
+
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
16
|
+
noCapsize?: boolean | "true" | undefined;
|
|
16
17
|
}, {
|
|
17
18
|
sm: string;
|
|
18
19
|
md: string;
|