@atom-learning/components 4.0.0-beta.6 → 4.0.0-beta.8
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/components/badge/Badge.d.ts +3 -1
- package/dist/components/badge/BadgeText.d.ts +3 -1
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +3 -1
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +3 -1
- package/dist/components/banner/banner-slim/BannerSlimText.js +1 -1
- package/dist/components/banner/banner-slim/BannerSlimText.js.map +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/data-table/DataTableMetaData.js +1 -1
- package/dist/components/data-table/DataTableMetaData.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +3 -1
- package/dist/components/empty-state/EmptyStateBody.d.ts +3 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/heading/Heading.js.map +1 -1
- package/dist/components/navigation/NavigationMenu.d.ts +3 -1
- package/dist/components/navigation/NavigationMenuDropdownItem.d.ts +3 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +3 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.d.ts +3 -1
- package/dist/components/section-message/SectionMessage.d.ts +7 -3
- package/dist/components/section-message/SectionMessageTitle.d.ts +1 -1
- package/dist/components/section-message/SectionMessageTitle.js +1 -1
- package/dist/components/section-message/SectionMessageTitle.js.map +1 -1
- package/dist/components/side-bar/SideBar.d.ts +3 -1
- package/dist/components/side-bar/SideBarComponents.d.ts +3 -1
- package/dist/components/stepper/StepperStepLabel.d.ts +3 -1
- package/dist/components/text/Text.d.ts +2 -0
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/top-bar/TopBar.d.ts +3 -1
- package/dist/components/top-bar/TopBarBrand.d.ts +3 -1
- package/dist/components/tree/Tree.d.ts +3 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/package.json +1 -1
|
@@ -1542,7 +1542,9 @@ export declare const Badge: React.ForwardRefExoticComponent<TBadgeProps> & {
|
|
|
1542
1542
|
}) => React.JSX.Element;
|
|
1543
1543
|
Text: ({ children, ...rest }: Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
1544
1544
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
1545
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1545
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1546
|
+
weight?: "bold" | "regular" | undefined;
|
|
1547
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
1546
1548
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
1547
1549
|
noCapsize?: boolean | "true" | undefined;
|
|
1548
1550
|
}, {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare const StyledBadgeText: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
4
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5
|
+
weight?: "bold" | "regular" | undefined;
|
|
6
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
5
7
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
6
8
|
noCapsize?: boolean | "true" | undefined;
|
|
7
9
|
}, {
|
|
@@ -1166,7 +1166,9 @@ export declare const BannerRegular: {
|
|
|
1166
1166
|
Text: {
|
|
1167
1167
|
(props: Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
1168
1168
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
1169
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1169
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1170
|
+
weight?: "bold" | "regular" | undefined;
|
|
1171
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
1170
1172
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
1171
1173
|
noCapsize?: boolean | "true" | undefined;
|
|
1172
1174
|
}, {
|
|
@@ -780,7 +780,9 @@ export declare const BannerSlim: {
|
|
|
780
780
|
Text: {
|
|
781
781
|
(props: Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
782
782
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
783
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
783
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
784
|
+
weight?: "bold" | "regular" | undefined;
|
|
785
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
784
786
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
785
787
|
noCapsize?: boolean | "true" | undefined;
|
|
786
788
|
}, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"react";import{styled as t}from"../../../stitches.js";import{Text as o}from"../../text/Text.js";import{useBannerContext as a}from"../BannerContext.js";const m=t(o,{color:"var(--banner-heading-color)",variants:{containerSize:{sm:{},md:{}},hasDismiss:{true:{}}},compoundVariants:[{containerSize:"sm",hasDismiss:!0,css:{mr:"$6"}}]}),s=e=>{const{size:i,hasDismiss:r}=a();return n.createElement(m,{size:"md",weight:"bold",containerSize:i,hasDismiss:r,noCapsize:!0,...e})};s.displayName="BannerSlimText";export{s as BannerSlimText};
|
|
2
2
|
//# sourceMappingURL=BannerSlimText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerSlimText.js","sources":["../../../../src/components/banner/banner-slim/BannerSlimText.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Text } from '../../text'\nimport { useBannerContext } from '../BannerContext'\n\nconst StyledText = styled(Text, {\n color: 'var(--banner-heading-color)',\n
|
|
1
|
+
{"version":3,"file":"BannerSlimText.js","sources":["../../../../src/components/banner/banner-slim/BannerSlimText.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Text } from '../../text'\nimport { useBannerContext } from '../BannerContext'\n\nconst StyledText = styled(Text, {\n color: 'var(--banner-heading-color)',\n variants: {\n containerSize: {\n sm: {},\n md: {}\n },\n hasDismiss: {\n true: {}\n }\n },\n compoundVariants: [\n {\n containerSize: 'sm',\n hasDismiss: true,\n css: {\n mr: '$6'\n }\n }\n ]\n})\n\nexport const BannerSlimText = (props: React.ComponentProps<typeof Text>) => {\n const { size, hasDismiss } = useBannerContext()\n\n return (\n <StyledText\n size=\"md\"\n weight=\"bold\"\n containerSize={size}\n hasDismiss={hasDismiss}\n noCapsize\n {...props}\n />\n )\n}\n\nBannerSlimText.displayName = 'BannerSlimText'\n"],"names":["StyledText","styled","Text","BannerSlimText","props","size","hasDismiss","useBannerContext","React"],"mappings":"uKAOA,MAAMA,EAAaC,EAAOC,EAAM,CAC9B,MAAO,8BACP,SAAU,CACR,cAAe,CACb,GAAI,CAAA,EACJ,GAAI,CAAA,CACN,EACA,WAAY,CACV,KAAM,CACR,CAAA,CACF,EACA,iBAAkB,CAChB,CACE,cAAe,KACf,WAAY,GACZ,IAAK,CACH,GAAI,IACN,CACF,CACF,CACF,CAAC,EAEYC,EAAkBC,GAA6C,CAC1E,KAAM,CAAE,KAAAC,EAAM,WAAAC,CAAW,EAAIC,EAAAA,EAE7B,OACEC,EAAA,cAACR,EAAA,CACC,KAAK,KACL,OAAO,OACP,cAAeK,EACf,WAAYC,EACZ,UAAS,GACR,GAAGF,EACN,CAEJ,EAEAD,EAAe,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ChevronLeft as
|
|
1
|
+
import{ChevronLeft as _,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as w}from"../action-icon/ActionIcon.js";import{Box as h}from"../box/Box.js";import{Button as x}from"../button/Button.js";import{Flex as C}from"../flex/Flex.js";import{Icon as Y}from"../icon/Icon.js";import{Text as K}from"../text/Text.js";import{styled as F}from"../../stitches.js";import{monthNamesShort as Q,weekdayNamesShort as V,DEFAULT_LABELS as X}from"./constants.js";import{Day as Z}from"./Day.js";const g=F("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),ee=F(x,{color:"$tonal600",p:"$3",width:"$6",variants:{selected:{false:{color:"$tonal600 !important",fontWeight:"400","&:hover":{bg:"$tonal100 !important",color:"$tonal600 !important"},"&[disabled]":{bg:"white !important"}}}}}),te=(i,c)=>{const u=i.slice(0,c);return i.slice(c).concat(u)},S=({css:i,refDateSelected:c,refDateToday:u,firstDayOfWeek:f=0,monthNames:N=Q,weekdayNames:T=V,labels:y=X,date:n=new Date,minDate:l,maxDate:m,setYear:A,...L})=>{const[a,E]=e.useState(!1),[s,k]=e.useState(n==null?void 0:n.getFullYear()),O=t=>{const r=n;r.setFullYear(t),A(r),E(!1)},z=l&&s-16<=l.getFullYear(),B=m&&s>=m.getFullYear(),I=Array.from({length:16},(t,r)=>{const o=s-r;return m&&o>m.getFullYear()||l&&o<l.getFullYear()?0:o}),{calendars:d,getBackProps:M,getForwardProps:G,getDateProps:P}=J({firstDayOfWeek:f,showOutsideDays:!0,date:n,minDate:l,maxDate:m,...L});return d.length?e.createElement(h,{css:{position:"relative",width:"min-content",mt:"-$1",...i}},e.createElement(C,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(w,{label:y[a?"previousYear":"previous"],theme:"neutral",size:"md",...!a&&M({calendars:d}),...a&&{onClick:()=>k(s-16)},disabled:a&&z},e.createElement(Y,{is:_})),e.createElement(w,{label:y[a?"nextYear":"next"],theme:"neutral",size:"md",...!a&&G({calendars:d}),...a&&{onClick:()=>k(s+16)},disabled:a&&B},e.createElement(Y,{is:H}))),a&&e.createElement(g,{css:{gridTemplateColumns:"repeat(4, 1fr)",pt:"$7",direction:"rtl",gridGap:"$3 $1"}},I.map((t,r)=>{const o=t===n.getFullYear();return t?e.createElement(ee,{key:`${t}${r}`,theme:o?"primary":"neutral",onClick:()=>O(t),selected:o},t):e.createElement(h,{key:r,css:{width:"$6",height:"$4"}})})),!a&&d.map(({month:t,year:r,weeks:o})=>e.createElement(h,{key:`${t}${r}`},e.createElement(C,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(x,{theme:"neutral",css:{px:"0",color:"$tonal600"},onClick:()=>E(!0)},N[t]," ",r)),e.createElement(g,{css:{mb:"$3"}},te(T,f).map(p=>e.createElement(K,{as:"span",size:"sm",weight:"bold",key:`${t}${r}${p}`,css:{textAlign:"center"}},p))),e.createElement(g,null,o.map((p,W)=>p.map(($,j)=>{const D=`${t}${r}${W}${j}`;if(!$)return e.createElement("div",{key:D});const{date:R,selected:b,today:v,prevMonth:U,nextMonth:q}=$;return e.createElement(Z,{isOutsideMonth:U||q,isSelected:b,isToday:v,key:D,ref:b?c:v?u:null,...P({dateObj:$}),type:"button"},R.getDate())})))))):null};S.displayName="Calendar";export{S as Calendar};
|
|
2
2
|
//# sourceMappingURL=Calendar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","sources":["../../../src/components/calendar/Calendar.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport { useDayzed } from 'dayzed'\nimport * as React from 'react'\n\nimport { ActionIcon } from '~/components/action-icon'\nimport { Box } from '~/components/box'\nimport { Button } from '~/components/button'\nimport { Flex } from '~/components/flex'\nimport { Icon } from '~/components/icon'\nimport { Text } from '~/components/text'\nimport type { CSS } from '~/stitches'\nimport { styled } from '~/stitches'\n\nimport { DEFAULT_LABELS, monthNamesShort, weekdayNamesShort } from './constants'\nimport { Day } from './Day'\n\nconst Grid = styled('div', {\n display: 'grid',\n gridTemplateColumns: 'repeat(7, 1fr)',\n gridGap: '$1 $2'\n})\n\nconst StyledButton = styled(Button, {\n color: '$tonal600',\n p: '$3',\n width: '$6',\n variants: {\n selected: {\n false: {\n color: '$tonal600 !important',\n fontWeight: '400',\n '&:hover': {\n bg: '$tonal100 !important',\n color: '$tonal600 !important'\n },\n '&[disabled]': { bg: 'white !important' }\n }\n }\n }\n})\n\nexport type CalendarTranslationProps = {\n monthNames?: string[]\n weekdayNames?: string[]\n labels?: {\n open: string\n next: string\n previous: string\n nextYear: string\n previousYear: string\n }\n}\n\ntype CalendarProps = DayzedInterface &\n CalendarTranslationProps & {\n css?: CSS\n refDateToday?: React.RefObject<HTMLButtonElement>\n refDateSelected?: React.RefObject<HTMLButtonElement>\n setYear: (date: Date) => Promise<void>\n }\n\nconst offsetWeekdayNames = (\n weekdayNames: string[],\n firstDayOfWeek: number\n): string[] => {\n const start = weekdayNames.slice(0, firstDayOfWeek)\n const end = weekdayNames.slice(firstDayOfWeek)\n return end.concat(start)\n}\n\nexport const Calendar = ({\n css,\n refDateSelected,\n refDateToday,\n firstDayOfWeek = 0,\n monthNames = monthNamesShort,\n weekdayNames = weekdayNamesShort,\n labels = DEFAULT_LABELS,\n date = new Date(),\n minDate,\n maxDate,\n setYear,\n ...remainingProps\n}: CalendarProps) => {\n const [showYears, setShowYears] = React.useState<boolean>(false)\n const [currentYear, setCurrentYear] = React.useState<number>(\n date?.getFullYear()\n )\n\n const handleSetYear = (year: number): void => {\n const newDate = date\n newDate.setFullYear(year)\n setYear(newDate)\n setShowYears(false)\n }\n\n const isAtMinYear = minDate && currentYear - 16 <= minDate.getFullYear()\n const isAtMaxYear = maxDate && currentYear >= maxDate.getFullYear()\n\n const yearList = Array.from({ length: 16 }, (_, i) => {\n const year = currentYear - i\n if (\n (maxDate && year > maxDate.getFullYear()) ||\n (minDate && year < minDate.getFullYear())\n )\n return 0\n return year\n })\n\n const { calendars, getBackProps, getForwardProps, getDateProps } = useDayzed({\n firstDayOfWeek,\n showOutsideDays: true,\n date,\n minDate,\n maxDate,\n ...remainingProps\n })\n\n if (!calendars.length) return null\n\n return (\n <Box\n css={{ position: 'relative', width: 'min-content', mt: '-$1', ...css }}\n >\n <Flex css={{ position: 'absolute', top: 0, right: '-$1' }}>\n <ActionIcon\n label={labels[showYears ? 'previousYear' : 'previous']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getBackProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear - 16)\n })}\n disabled={showYears && isAtMinYear}\n >\n <Icon is={ChevronLeft} />\n </ActionIcon>\n <ActionIcon\n label={labels[showYears ? 'nextYear' : 'next']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getForwardProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear + 16)\n })}\n disabled={showYears && isAtMaxYear}\n >\n <Icon is={ChevronRight} />\n </ActionIcon>\n </Flex>\n {showYears && (\n <Grid\n css={{\n gridTemplateColumns: 'repeat(4, 1fr)',\n pt: '$7',\n direction: 'rtl',\n gridGap: '$3 $1'\n }}\n >\n {yearList.map((year, i) => {\n const isCurrentYear = year === date.getFullYear()\n if (!year)\n return <Box key={i} css={{ width: '$6', height: '$4' }} />\n\n return (\n <StyledButton\n key={`${year}${i}`}\n theme={isCurrentYear ? 'primary' : 'neutral'}\n onClick={() => handleSetYear(year)}\n selected={isCurrentYear}\n >\n {year}\n </StyledButton>\n )\n })}\n </Grid>\n )}\n {!showYears &&\n calendars.map(({ month, year, weeks }) => (\n <Box key={`${month}${year}`}>\n <Flex css={{ height: '$4', alignItems: 'center', mb: '$4' }}>\n <Button\n theme=\"neutral\"\n css={{ px: '0', color: '$tonal600' }}\n onClick={() => setShowYears(true)}\n >\n {monthNames[month]} {year}\n </Button>\n </Flex>\n <Grid css={{ mb: '$3' }}>\n {offsetWeekdayNames(weekdayNames, firstDayOfWeek).map(\n (weekday) => (\n <Text\n as=\"span\"\n size=\"sm\"\n key={`${month}${year}${weekday}`}\n css={{ fontWeight: 600, textAlign: 'center' }}\n >\n {weekday}\n </Text>\n )\n )}\n </Grid>\n <Grid>\n {weeks.map((week, weekIndex) =>\n week.map((dateObj, index) => {\n const key = `${month}${year}${weekIndex}${index}`\n\n if (!dateObj) return <div key={key} />\n\n const { date, selected, today, prevMonth, nextMonth } =\n dateObj\n\n return (\n <Day\n isOutsideMonth={prevMonth || nextMonth}\n isSelected={selected}\n isToday={today}\n key={key}\n ref={\n selected ? refDateSelected : today ? refDateToday : null\n }\n {...getDateProps({ dateObj })}\n type=\"button\"\n >\n {date.getDate()}\n </Day>\n )\n })\n )}\n </Grid>\n </Box>\n ))}\n </Box>\n )\n}\n\nCalendar.displayName = 'Calendar'\n"],"names":["Grid","styled","StyledButton","Button","offsetWeekdayNames","weekdayNames","firstDayOfWeek","start","Calendar","css","refDateSelected","refDateToday","monthNames","monthNamesShort","weekdayNamesShort","labels","DEFAULT_LABELS","date","minDate","maxDate","setYear","remainingProps","showYears","setShowYears","React","currentYear","setCurrentYear","handleSetYear","year","newDate","isAtMinYear","isAtMaxYear","yearList","_","i","calendars","getBackProps","getForwardProps","getDateProps","useDayzed","Box","Flex","ActionIcon","Icon","ChevronLeft","ChevronRight","isCurrentYear","month","weeks","weekday","Text","week","weekIndex","dateObj","index","key","selected","today","prevMonth","nextMonth","Day"],"mappings":"siBAiBA,MAAMA,EAAOC,EAAO,MAAO,CACzB,QAAS,OACT,oBAAqB,iBACrB,QAAS,OACX,CAAC,EAEKC,GAAeD,EAAOE,EAAQ,CAClC,MAAO,YACP,EAAG,KACH,MAAO,KACP,SAAU,CACR,SAAU,CACR,MAAO,CACL,MAAO,uBACP,WAAY,MACZ,UAAW,CACT,GAAI,uBACJ,MAAO,sBACT,EACA,cAAe,CAAE,GAAI,kBAAmB,CAC1C,CACF,CACF,CACF,CAAC,EAsBKC,GAAqB,CACzBC,EACAC,IACa,CACb,MAAMC,EAAQF,EAAa,MAAM,EAAGC,CAAc,EAElD,OADYD,EAAa,MAAMC,CAAc,EAClC,OAAOC,CAAK,CACzB,EAEaC,EAAW,CAAC,CACvB,IAAAC,EACA,gBAAAC,EACA,aAAAC,EACA,eAAAL,EAAiB,EACjB,WAAAM,EAAaC,EACb,aAAAR,EAAeS,EACf,OAAAC,EAASC,EACT,KAAAC,EAAO,IAAI,KACX,QAAAC,EACA,QAAAC,EACA,QAAAC,KACGC,CACL,IAAqB,CACnB,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAkB,EAAK,EACzD,CAACC,EAAaC,CAAc,EAAIF,EAAM,SAC1CP,GAAA,KAAA,OAAAA,EAAM,YACR,CAAA,EAEMU,EAAiBC,GAAuB,CAC5C,MAAMC,EAAUZ,EAChBY,EAAQ,YAAYD,CAAI,EACxBR,EAAQS,CAAO,EACfN,EAAa,EAAK,CACpB,EAEMO,EAAcZ,GAAWO,EAAc,IAAMP,EAAQ,YACrDa,EAAAA,EAAcZ,GAAWM,GAAeN,EAAQ,YAAY,EAE5Da,EAAW,MAA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EpC,KAAM,CAAE,KAAAtC,EAAM,SAAAuC,EAAU,MAAAC,EAAO,UAAAC,EAAW,UAAAC,CAAU,EAClDN,EAEF,OACE7B,EAAA,cAACoC,EAAA,CACC,eAAgBF,GAAaC,EAC7B,WAAYH,EACZ,QAASC,EACT,IAAKF,EACL,IACEC,EAAW9C,EAAkB+C,EAAQ9C,EAAe,KAErD,GAAG2B,EAAa,CAAE,QAAAe,CAAQ,CAAC,EAC5B,KAAK,QAEJpC,EAAAA,EAAK,QAAQ,CAChB,CAEJ,CAAC,CACH,CACF,CACF,CACD,CACL,EAnH4B,IAqHhC,EAEAT,EAAS,YAAc"}
|
|
1
|
+
{"version":3,"file":"Calendar.js","sources":["../../../src/components/calendar/Calendar.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight } from '@atom-learning/icons'\nimport type { Props as DayzedInterface } from 'dayzed'\nimport { useDayzed } from 'dayzed'\nimport * as React from 'react'\n\nimport { ActionIcon } from '~/components/action-icon'\nimport { Box } from '~/components/box'\nimport { Button } from '~/components/button'\nimport { Flex } from '~/components/flex'\nimport { Icon } from '~/components/icon'\nimport { Text } from '~/components/text'\nimport type { CSS } from '~/stitches'\nimport { styled } from '~/stitches'\n\nimport { DEFAULT_LABELS, monthNamesShort, weekdayNamesShort } from './constants'\nimport { Day } from './Day'\n\nconst Grid = styled('div', {\n display: 'grid',\n gridTemplateColumns: 'repeat(7, 1fr)',\n gridGap: '$1 $2'\n})\n\nconst StyledButton = styled(Button, {\n color: '$tonal600',\n p: '$3',\n width: '$6',\n variants: {\n selected: {\n false: {\n color: '$tonal600 !important',\n fontWeight: '400',\n '&:hover': {\n bg: '$tonal100 !important',\n color: '$tonal600 !important'\n },\n '&[disabled]': { bg: 'white !important' }\n }\n }\n }\n})\n\nexport type CalendarTranslationProps = {\n monthNames?: string[]\n weekdayNames?: string[]\n labels?: {\n open: string\n next: string\n previous: string\n nextYear: string\n previousYear: string\n }\n}\n\ntype CalendarProps = DayzedInterface &\n CalendarTranslationProps & {\n css?: CSS\n refDateToday?: React.RefObject<HTMLButtonElement>\n refDateSelected?: React.RefObject<HTMLButtonElement>\n setYear: (date: Date) => Promise<void>\n }\n\nconst offsetWeekdayNames = (\n weekdayNames: string[],\n firstDayOfWeek: number\n): string[] => {\n const start = weekdayNames.slice(0, firstDayOfWeek)\n const end = weekdayNames.slice(firstDayOfWeek)\n return end.concat(start)\n}\n\nexport const Calendar = ({\n css,\n refDateSelected,\n refDateToday,\n firstDayOfWeek = 0,\n monthNames = monthNamesShort,\n weekdayNames = weekdayNamesShort,\n labels = DEFAULT_LABELS,\n date = new Date(),\n minDate,\n maxDate,\n setYear,\n ...remainingProps\n}: CalendarProps) => {\n const [showYears, setShowYears] = React.useState<boolean>(false)\n const [currentYear, setCurrentYear] = React.useState<number>(\n date?.getFullYear()\n )\n\n const handleSetYear = (year: number): void => {\n const newDate = date\n newDate.setFullYear(year)\n setYear(newDate)\n setShowYears(false)\n }\n\n const isAtMinYear = minDate && currentYear - 16 <= minDate.getFullYear()\n const isAtMaxYear = maxDate && currentYear >= maxDate.getFullYear()\n\n const yearList = Array.from({ length: 16 }, (_, i) => {\n const year = currentYear - i\n if (\n (maxDate && year > maxDate.getFullYear()) ||\n (minDate && year < minDate.getFullYear())\n )\n return 0\n return year\n })\n\n const { calendars, getBackProps, getForwardProps, getDateProps } = useDayzed({\n firstDayOfWeek,\n showOutsideDays: true,\n date,\n minDate,\n maxDate,\n ...remainingProps\n })\n\n if (!calendars.length) return null\n\n return (\n <Box\n css={{ position: 'relative', width: 'min-content', mt: '-$1', ...css }}\n >\n <Flex css={{ position: 'absolute', top: 0, right: '-$1' }}>\n <ActionIcon\n label={labels[showYears ? 'previousYear' : 'previous']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getBackProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear - 16)\n })}\n disabled={showYears && isAtMinYear}\n >\n <Icon is={ChevronLeft} />\n </ActionIcon>\n <ActionIcon\n label={labels[showYears ? 'nextYear' : 'next']}\n theme=\"neutral\"\n size=\"md\"\n {...(!showYears && getForwardProps({ calendars }))}\n {...(showYears && {\n onClick: () => setCurrentYear(currentYear + 16)\n })}\n disabled={showYears && isAtMaxYear}\n >\n <Icon is={ChevronRight} />\n </ActionIcon>\n </Flex>\n {showYears && (\n <Grid\n css={{\n gridTemplateColumns: 'repeat(4, 1fr)',\n pt: '$7',\n direction: 'rtl',\n gridGap: '$3 $1'\n }}\n >\n {yearList.map((year, i) => {\n const isCurrentYear = year === date.getFullYear()\n if (!year)\n return <Box key={i} css={{ width: '$6', height: '$4' }} />\n\n return (\n <StyledButton\n key={`${year}${i}`}\n theme={isCurrentYear ? 'primary' : 'neutral'}\n onClick={() => handleSetYear(year)}\n selected={isCurrentYear}\n >\n {year}\n </StyledButton>\n )\n })}\n </Grid>\n )}\n {!showYears &&\n calendars.map(({ month, year, weeks }) => (\n <Box key={`${month}${year}`}>\n <Flex css={{ height: '$4', alignItems: 'center', mb: '$4' }}>\n <Button\n theme=\"neutral\"\n css={{ px: '0', color: '$tonal600' }}\n onClick={() => setShowYears(true)}\n >\n {monthNames[month]} {year}\n </Button>\n </Flex>\n <Grid css={{ mb: '$3' }}>\n {offsetWeekdayNames(weekdayNames, firstDayOfWeek).map(\n (weekday) => (\n <Text\n as=\"span\"\n size=\"sm\"\n weight=\"bold\"\n key={`${month}${year}${weekday}`}\n css={{ textAlign: 'center' }}\n >\n {weekday}\n </Text>\n )\n )}\n </Grid>\n <Grid>\n {weeks.map((week, weekIndex) =>\n week.map((dateObj, index) => {\n const key = `${month}${year}${weekIndex}${index}`\n\n if (!dateObj) return <div key={key} />\n\n const { date, selected, today, prevMonth, nextMonth } =\n dateObj\n\n return (\n <Day\n isOutsideMonth={prevMonth || nextMonth}\n isSelected={selected}\n isToday={today}\n key={key}\n ref={\n selected ? refDateSelected : today ? refDateToday : null\n }\n {...getDateProps({ dateObj })}\n type=\"button\"\n >\n {date.getDate()}\n </Day>\n )\n })\n )}\n </Grid>\n </Box>\n ))}\n </Box>\n )\n}\n\nCalendar.displayName = 'Calendar'\n"],"names":["Grid","styled","StyledButton","Button","offsetWeekdayNames","weekdayNames","firstDayOfWeek","start","Calendar","css","refDateSelected","refDateToday","monthNames","monthNamesShort","weekdayNamesShort","labels","DEFAULT_LABELS","date","minDate","maxDate","setYear","remainingProps","showYears","setShowYears","React","currentYear","setCurrentYear","handleSetYear","year","newDate","isAtMinYear","isAtMaxYear","yearList","_","i","calendars","getBackProps","getForwardProps","getDateProps","useDayzed","Box","Flex","ActionIcon","Icon","ChevronLeft","ChevronRight","isCurrentYear","month","weeks","weekday","Text","week","weekIndex","dateObj","index","key","selected","today","prevMonth","nextMonth","Day"],"mappings":"siBAiBA,MAAMA,EAAOC,EAAO,MAAO,CACzB,QAAS,OACT,oBAAqB,iBACrB,QAAS,OACX,CAAC,EAEKC,GAAeD,EAAOE,EAAQ,CAClC,MAAO,YACP,EAAG,KACH,MAAO,KACP,SAAU,CACR,SAAU,CACR,MAAO,CACL,MAAO,uBACP,WAAY,MACZ,UAAW,CACT,GAAI,uBACJ,MAAO,sBACT,EACA,cAAe,CAAE,GAAI,kBAAmB,CAC1C,CACF,CACF,CACF,CAAC,EAsBKC,GAAqB,CACzBC,EACAC,IACa,CACb,MAAMC,EAAQF,EAAa,MAAM,EAAGC,CAAc,EAElD,OADYD,EAAa,MAAMC,CAAc,EAClC,OAAOC,CAAK,CACzB,EAEaC,EAAW,CAAC,CACvB,IAAAC,EACA,gBAAAC,EACA,aAAAC,EACA,eAAAL,EAAiB,EACjB,WAAAM,EAAaC,EACb,aAAAR,EAAeS,EACf,OAAAC,EAASC,EACT,KAAAC,EAAO,IAAI,KACX,QAAAC,EACA,QAAAC,EACA,QAAAC,KACGC,CACL,IAAqB,CACnB,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAkB,EAAK,EACzD,CAACC,EAAaC,CAAc,EAAIF,EAAM,SAC1CP,GAAA,KAAA,OAAAA,EAAM,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ACH,CAEJ,CACF,EACAzB,EAAA,cAACxB,EAAA,KACEgD,EAAM,IAAI,CAACG,EAAMC,IAChBD,EAAK,IAAI,CAACE,EAASC,IAAU,CAC3B,MAAMC,EAAM,GAAGR,IAAQnB,IAAOwB,IAAYE,IAE1C,GAAI,CAACD,EAAS,OAAO7B,EAAA,cAAC,OAAI,IAAK+B,CAAAA,CAAK,EAEpC,KAAM,CAAE,KAAAtC,EAAM,SAAAuC,EAAU,MAAAC,EAAO,UAAAC,EAAW,UAAAC,CAAU,EAClDN,EAEF,OACE7B,EAAA,cAACoC,EAAA,CACC,eAAgBF,GAAaC,EAC7B,WAAYH,EACZ,QAASC,EACT,IAAKF,EACL,IACEC,EAAW9C,EAAkB+C,EAAQ9C,EAAe,KAErD,GAAG2B,EAAa,CAAE,QAAAe,CAAQ,CAAC,EAC5B,KAAK,QAEJpC,EAAAA,EAAK,QAAQ,CAChB,CAEJ,CAAC,CACH,CACF,CACF,CACD,CACL,EApH4B,IAsHhC,EAEAT,EAAS,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as y from"react";import{Text as h}from"../text/Text.js";import{useDataTable as f}from"./DataTableContext.js";import"./DataTable.js";const v={sorted_by:"Sorted by",ascending:"ascending",descending:"descending",separator:"-"},w=({copy:a,css:c})=>{var o,s;const{getState:l,columns:g,getRowModel:m,rowSelection:p}=f(),{sorting:r}=l(),$=r.length>0,d=(s=(o=m())==null?void 0:o.rows)==null?void 0:s.length,n=Object.keys(p||{}).length,t={...v,...a},u=e=>{const i=g.find(b=>b.id===e);return(i==null?void 0:i.header)||e};return y.createElement(h,{weight:"bold",css:c},`${n||d} ${(n||d)===1?"item":"items"} ${n?"selected":""} ${$?(e=>`${t.separator} ${t.sorted_by} ${u(e[0].id)} ${e[0].desc?t.descending:t.ascending}`)(r):""}`)};export{w as DataTableMetaData};
|
|
2
2
|
//# sourceMappingURL=DataTableMetaData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableMetaData.js","sources":["../../../src/components/data-table/DataTableMetaData.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport type { CSS } from '~/stitches'\n\nimport { Text } from '../text'\nimport { useDataTable } from './index'\n\nconst defaultCopy = {\n sorted_by: 'Sorted by',\n ascending: 'ascending',\n descending: 'descending',\n separator: '-'\n}\n\nexport const DataTableMetaData = ({\n copy,\n css\n}: {\n copy?: {\n sorted_by?: string\n ascending?: string\n descending?: string\n separator?: string\n }\n sortLabel?: string\n css?: CSS\n}) => {\n const { getState, columns, getRowModel, rowSelection } = useDataTable()\n const { sorting } = getState()\n const isSorted = sorting.length > 0\n\n const totalRows = getRowModel()?.rows?.length\n\n const selectedRows = Object.keys(rowSelection || {}).length\n\n const copyMerged = { ...defaultCopy, ...copy }\n\n const getColumnDisplayName = (id: string) => {\n const sortedColumn = columns.find((col) => col.id === id)\n return sortedColumn?.header || id\n }\n\n const getSortingString = (sorting) => {\n return `${copyMerged.separator} ${\n copyMerged.sorted_by\n } ${getColumnDisplayName(sorting[0].id)} ${\n sorting[0].desc ? copyMerged.descending : copyMerged.ascending\n }`\n }\n\n return (\n <Text css={
|
|
1
|
+
{"version":3,"file":"DataTableMetaData.js","sources":["../../../src/components/data-table/DataTableMetaData.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport type { CSS } from '~/stitches'\n\nimport { Text } from '../text'\nimport { useDataTable } from './index'\n\nconst defaultCopy = {\n sorted_by: 'Sorted by',\n ascending: 'ascending',\n descending: 'descending',\n separator: '-'\n}\n\nexport const DataTableMetaData = ({\n copy,\n css\n}: {\n copy?: {\n sorted_by?: string\n ascending?: string\n descending?: string\n separator?: string\n }\n sortLabel?: string\n css?: CSS\n}) => {\n const { getState, columns, getRowModel, rowSelection } = useDataTable()\n const { sorting } = getState()\n const isSorted = sorting.length > 0\n\n const totalRows = getRowModel()?.rows?.length\n\n const selectedRows = Object.keys(rowSelection || {}).length\n\n const copyMerged = { ...defaultCopy, ...copy }\n\n const getColumnDisplayName = (id: string) => {\n const sortedColumn = columns.find((col) => col.id === id)\n return sortedColumn?.header || id\n }\n\n const getSortingString = (sorting) => {\n return `${copyMerged.separator} ${\n copyMerged.sorted_by\n } ${getColumnDisplayName(sorting[0].id)} ${\n sorting[0].desc ? copyMerged.descending : copyMerged.ascending\n }`\n }\n\n return (\n <Text weight=\"bold\" css={css}>{`${selectedRows || totalRows} ${\n (selectedRows || totalRows) === 1 ? 'item' : 'items'\n } ${selectedRows ? 'selected' : ''} ${\n isSorted ? getSortingString(sorting) : ''\n }`}</Text>\n )\n}\n"],"names":["defaultCopy","DataTableMetaData","copy","css","_a","_b","getState","columns","getRowModel","rowSelection","useDataTable","sorting","isSorted","totalRows","selectedRows","copyMerged","getColumnDisplayName","id","sortedColumn","col","React","Text"],"mappings":"2IAOA,MAAMA,EAAc,CAClB,UAAW,YACX,UAAW,YACX,WAAY,aACZ,UAAW,GACb,EAEaC,EAAoB,CAAC,CAChC,KAAAC,EACA,IAAAC,CACF,IASM,CA1BN,IAAAC,EAAAC,EA2BE,KAAM,CAAE,SAAAC,EAAU,QAAAC,EAAS,YAAAC,EAAa,aAAAC,CAAa,EAAIC,EAAa,EAChE,CAAE,QAAAC,CAAQ,EAAIL,EAAAA,EACdM,EAAWD,EAAQ,OAAS,EAE5BE,GAAYR,GAAAD,EAAAI,EAAAA,IAAA,KAAA,OAAAJ,EAAe,OAAf,KAAA,OAAAC,EAAqB,OAEjCS,EAAe,OAAO,KAAKL,GAAgB,CAAA,CAAE,EAAE,OAE/CM,EAAa,CAAE,GAAGf,EAAa,GAAGE,CAAK,EAEvCc,EAAwBC,GAAe,CAC3C,MAAMC,EAAeX,EAAQ,KAAMY,GAAQA,EAAI,KAAOF,CAAE,EACxD,OAAOC,GAAA,KAAA,OAAAA,EAAc,SAAUD,CACjC,EAUA,OACEG,EAAA,cAACC,EAAA,CAAK,OAAO,OAAO,IAAKlB,CAAM,EAAA,GAAGW,GAAgBD,MAC/CC,GAAgBD,KAAe,EAAI,OAAS,WAC3CC,EAAe,WAAa,MAC9BF,GAZsBD,GACjB,GAAGI,EAAW,aACnBA,EAAW,aACTC,EAAqBL,EAAQ,GAAG,EAAE,KACpCA,EAAQ,GAAG,KAAOI,EAAW,WAAaA,EAAW,aAQzBJ,CAAO,EAAI,IACtC,CAEP"}
|
|
@@ -1927,7 +1927,9 @@ export declare const EmptyState: {
|
|
|
1927
1927
|
}) => React.JSX.Element;
|
|
1928
1928
|
Body: (props: Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
1929
1929
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
1930
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1930
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1931
|
+
weight?: "bold" | "regular" | undefined;
|
|
1932
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
1931
1933
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
1932
1934
|
noCapsize?: boolean | "true" | undefined;
|
|
1933
1935
|
}, {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare const StyledEmptyStateBody: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
4
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5
|
+
weight?: "bold" | "regular" | undefined;
|
|
6
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
5
7
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
6
8
|
noCapsize?: boolean | "true" | undefined;
|
|
7
9
|
}, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"react";import{styled as m}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import{capsize as i}from"../../utilities/style/capsize.js";import"color2k";import"../../utilities/style/keyframe-animations.js";const t=m("h2",{fontWeight:700,m:0,variants:{size:{xs:{fontFamily:"$body",fontSize:"$md",lineHeight:1.5,...i(.3864)},sm:{fontFamily:"$body",fontSize:"$lg",lineHeight:1.14,...i(.2078)},md:{fontFamily:"$body",fontSize:"$xl",lineHeight:1.14,...i(.2078)},lg:{fontFamily:"$display",fontSize:"$2xl",lineHeight:1.08,letterSpacing:"0.01em",...i(.1405,.2405)},xl:{fontFamily:"$display",fontSize:"$3xl",lineHeight:1.12,...i(.16,.26)},xxl:{fontFamily:"$display",fontSize:"$4xl",lineHeight:1,...i(.1,.2)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}}}}),o=e.forwardRef(({size:n="md",...l},a)=>e.createElement(t,{ref:a,size:n,...l}));o.displayName="Heading";export{o as Heading,t as StyledHeading};
|
|
2
2
|
//# sourceMappingURL=Heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.js","sources":["../../../src/components/heading/Heading.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const StyledHeading = styled('h2', {\n
|
|
1
|
+
{"version":3,"file":"Heading.js","sources":["../../../src/components/heading/Heading.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const StyledHeading = styled('h2', {\n fontWeight: 700,\n m: 0,\n variants: {\n size: {\n xs: {\n fontFamily: '$body',\n fontSize: '$md',\n lineHeight: 1.5,\n ...capsize(0.3864)\n },\n sm: {\n fontFamily: '$body',\n fontSize: '$lg',\n lineHeight: 1.14,\n ...capsize(0.2078)\n },\n md: {\n fontFamily: '$body',\n fontSize: '$xl',\n lineHeight: 1.14,\n ...capsize(0.2078)\n },\n lg: {\n fontFamily: '$display',\n fontSize: '$2xl',\n lineHeight: 1.08,\n letterSpacing: '0.01em',\n ...capsize(0.1405, 0.2405)\n },\n xl: {\n fontFamily: '$display',\n fontSize: '$3xl',\n lineHeight: 1.12,\n ...capsize(0.16, 0.26)\n },\n xxl: {\n fontFamily: '$display',\n fontSize: '$4xl',\n lineHeight: 1,\n ...capsize(0.1, 0.2)\n }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n }\n }\n})\n\nexport type HeadingProps = Override<\n React.ComponentProps<typeof StyledHeading>,\n {\n as?:\n | 'h1'\n | 'h2'\n | 'h3'\n | 'h4'\n | 'h5'\n | 'h6'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Heading: React.ForwardRefExoticComponent<HeadingProps> =\n React.forwardRef(({ size = 'md', ...remainingProps }, ref) => (\n <StyledHeading ref={ref} size={size} {...remainingProps} />\n ))\n\nHeading.displayName = 'Heading'\n"],"names":["StyledHeading","styled","capsize","Heading","React","size","remainingProps","ref"],"mappings":"sTAMO,MAAMA,EAAgBC,EAAO,KAAM,CACxC,WAAY,IACZ,EAAG,EACH,SAAU,CACR,KAAM,CACJ,GAAI,CACF,WAAY,QACZ,SAAU,MACV,WAAY,IACZ,GAAGC,EAAQ,KAAM,CACnB,EACA,GAAI,CACF,WAAY,QACZ,SAAU,MACV,WAAY,KACZ,GAAGA,EAAQ,KAAM,CACnB,EACA,GAAI,CACF,WAAY,QACZ,SAAU,MACV,WAAY,KACZ,GAAGA,EAAQ,KAAM,CACnB,EACA,GAAI,CACF,WAAY,WACZ,SAAU,OACV,WAAY,KACZ,cAAe,SACf,GAAGA,EAAQ,MAAQ,KAAM,CAC3B,EACA,GAAI,CACF,WAAY,WACZ,SAAU,OACV,WAAY,KACZ,GAAGA,EAAQ,IAAM,GAAI,CACvB,EACA,IAAK,CACH,WAAY,WACZ,SAAU,OACV,WAAY,EACZ,GAAGA,EAAQ,GAAK,EAAG,CACrB,CACF,EACA,UAAW,CACT,KAAM,CACJ,sBAAuB,CAAE,QAAS,iBAAkB,CACtD,CACF,CACF,CACF,CAAC,EAiBYC,EACXC,EAAM,WAAW,CAAC,CAAE,KAAAC,EAAO,QAASC,CAAe,EAAGC,IACpDH,EAAA,cAACJ,EAAc,CAAA,IAAKO,EAAK,KAAMF,EAAO,GAAGC,CAAAA,CAAgB,CAC1D,EAEHH,EAAQ,YAAc"}
|
|
@@ -1571,7 +1571,9 @@ export declare const NavigationMenu: {
|
|
|
1571
1571
|
}>>;
|
|
1572
1572
|
DropdownItemTitle: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
1573
1573
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
1574
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1574
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1575
|
+
weight?: "bold" | "regular" | undefined;
|
|
1576
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
1575
1577
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
1576
1578
|
noCapsize?: boolean | "true" | undefined;
|
|
1577
1579
|
}, {
|
|
@@ -3,7 +3,9 @@ import { NavigationMenuLink } from './NavigationMenuLink';
|
|
|
3
3
|
export declare const NavigationMenuDropdownItem: React.ForwardRefExoticComponent<React.PropsWithChildren<React.ComponentProps<typeof NavigationMenuLink>>>;
|
|
4
4
|
export declare const NavigationMenuDropdownItemTitle: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
5
5
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
6
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
6
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
7
|
+
weight?: "bold" | "regular" | undefined;
|
|
8
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
7
9
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
8
10
|
noCapsize?: boolean | "true" | undefined;
|
|
9
11
|
}, {
|
|
@@ -3962,7 +3962,9 @@ export declare const NavigationMenuVertical: (({ children, ...rest }: TNavigatio
|
|
|
3962
3962
|
}) => JSX.Element;
|
|
3963
3963
|
Text: (props: Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
3964
3964
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
3965
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
3965
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
3966
|
+
weight?: "bold" | "regular" | undefined;
|
|
3967
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
3966
3968
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
3967
3969
|
noCapsize?: boolean | "true" | undefined;
|
|
3968
3970
|
}, {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
declare const StyledNavigationMenuVerticalText: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
4
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5
|
+
weight?: "bold" | "regular" | undefined;
|
|
6
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
5
7
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
6
8
|
noCapsize?: boolean | "true" | undefined;
|
|
7
9
|
}, {
|
|
@@ -394,9 +394,11 @@ export interface SectionMessageProps extends React.ComponentProps<typeof Section
|
|
|
394
394
|
}
|
|
395
395
|
export declare const SectionMessage: {
|
|
396
396
|
({ theme, ...rest }: SectionMessageProps): JSX.Element;
|
|
397
|
-
Title: (
|
|
397
|
+
Title: (props: Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
398
398
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
399
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
399
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
400
|
+
weight?: "bold" | "regular" | undefined;
|
|
401
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
400
402
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
401
403
|
noCapsize?: boolean | "true" | undefined;
|
|
402
404
|
}, {
|
|
@@ -784,7 +786,9 @@ export declare const SectionMessage: {
|
|
|
784
786
|
}) => JSX.Element;
|
|
785
787
|
Description: ({ css, ...rest }: Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
786
788
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
787
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
789
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
790
|
+
weight?: "bold" | "regular" | undefined;
|
|
791
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
788
792
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
789
793
|
noCapsize?: boolean | "true" | undefined;
|
|
790
794
|
}, {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text } from '../text';
|
|
3
|
-
export declare const SectionMessageTitle: (
|
|
3
|
+
export declare const SectionMessageTitle: (props: React.ComponentProps<typeof Text>) => JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"react";import{Text as o}from"../text/Text.js";const i=e=>t.createElement(o,{size:"md",weight:"bold",...e});export{i as SectionMessageTitle};
|
|
2
2
|
//# sourceMappingURL=SectionMessageTitle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionMessageTitle.js","sources":["../../../src/components/section-message/SectionMessageTitle.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '../text'\n\nexport const SectionMessageTitle = (
|
|
1
|
+
{"version":3,"file":"SectionMessageTitle.js","sources":["../../../src/components/section-message/SectionMessageTitle.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '../text'\n\nexport const SectionMessageTitle = (props: React.ComponentProps<typeof Text>): JSX.Element => (\n <Text\n size=\"md\"\n weight=\"bold\"\n {...props}\n />\n)\n"],"names":["SectionMessageTitle","props","React","Text"],"mappings":"kEAIaA,EAAuBC,GAClCC,EAAA,cAACC,EAAA,CACC,KAAK,KACL,OAAO,OACN,GAAGF,CACN,CAAA"}
|
|
@@ -1156,7 +1156,9 @@ export declare const SideBar: {
|
|
|
1156
1156
|
};
|
|
1157
1157
|
BrandName: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
1158
1158
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
1159
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1159
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1160
|
+
weight?: "bold" | "regular" | undefined;
|
|
1161
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
1160
1162
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
1161
1163
|
noCapsize?: boolean | "true" | undefined;
|
|
1162
1164
|
}, {
|
|
@@ -1907,7 +1907,9 @@ export declare const SideBarBrandLogo: {
|
|
|
1907
1907
|
};
|
|
1908
1908
|
export declare const SideBarBrandName: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
1909
1909
|
ref?: ((instance: HTMLParagraphElement | null) => void) | import("react").RefObject<HTMLParagraphElement> | null | undefined;
|
|
1910
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1910
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
1911
|
+
weight?: "bold" | "regular" | undefined;
|
|
1912
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
1911
1913
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
1912
1914
|
noCapsize?: boolean | "true" | undefined;
|
|
1913
1915
|
}, {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const StepperStepLabel: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
3
3
|
ref?: ((instance: HTMLParagraphElement | null) => void) | import("react").RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
4
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5
|
+
weight?: "bold" | "regular" | undefined;
|
|
6
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
5
7
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
6
8
|
noCapsize?: boolean | "true" | undefined;
|
|
7
9
|
}, {
|
|
@@ -37,6 +37,8 @@ export declare const getTextVariant: (options: {
|
|
|
37
37
|
noCapsize?: boolean;
|
|
38
38
|
}) => CSS;
|
|
39
39
|
export declare const StyledText: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<"p", {
|
|
40
|
+
weight?: "bold" | "regular" | undefined;
|
|
41
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
40
42
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
41
43
|
noCapsize?: boolean | "true" | undefined;
|
|
42
44
|
}, {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as a from"react";import{styled as s}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import{capsize as e}from"../../utilities/style/capsize.js";import"color2k";import"../../utilities/style/keyframe-animations.js";const i={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 !important"}}}},p=({size:t,noCapsize:o})=>({...i.size[t],...i.noCapsize[`${o}`]}),n=s("p",{m:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{...i,weight:{regular:{fontWeight:400},bold:{fontWeight:600}},family:{body:{fontFamily:"$body"},display:{fontFamily:"$display"},mono:{fontFamily:"$mono"}}}}),r=a.forwardRef(({size:t="md",weight:o="regular",family:m="body",...l},f)=>a.createElement(n,{size:t,weight:o,family:m,...l,ref:f}));r.displayName="Text";export{n as StyledText,r as Text,p as getTextVariant,i as textVariants};
|
|
2
2
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const textVariants = {\n size: {\n xs: { fontSize: '$xs', lineHeight: 1.6, ...capsize(0.4364) },\n sm: { fontSize: '$sm', lineHeight: 1.53, ...capsize(0.4056) },\n md: { fontSize: '$md', lineHeight: 1.5, ...capsize(0.3864) },\n lg: { fontSize: '$lg', lineHeight: 1.52, ...capsize(0.3983) },\n xl: { fontSize: '$xl', lineHeight: 1.42, ...capsize(0.3506) }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n }\n}\n\nexport const getTextVariant: (options: {\n size: keyof typeof textVariants.size\n noCapsize?: boolean\n}) => CSS = ({ size, noCapsize }) => ({\n ...textVariants.size[size],\n ...textVariants.noCapsize[`${noCapsize}`]\n})\n\nexport const StyledText = styled('p', {\n
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const textVariants = {\n size: {\n xs: { fontSize: '$xs', lineHeight: 1.6, ...capsize(0.4364) },\n sm: { fontSize: '$sm', lineHeight: 1.53, ...capsize(0.4056) },\n md: { fontSize: '$md', lineHeight: 1.5, ...capsize(0.3864) },\n lg: { fontSize: '$lg', lineHeight: 1.52, ...capsize(0.3983) },\n xl: { fontSize: '$xl', lineHeight: 1.42, ...capsize(0.3506) }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n }\n}\n\nexport const getTextVariant: (options: {\n size: keyof typeof textVariants.size\n noCapsize?: boolean\n}) => CSS = ({ size, noCapsize }) => ({\n ...textVariants.size[size],\n ...textVariants.noCapsize[`${noCapsize}`]\n})\n\nexport const StyledText = styled('p', {\n m: 0,\n /** Allow nesting `<Text />` inside `<Text />` without forcing a new line and spacing. */\n '& > &': {\n '&:before, &:after': { display: 'none' }\n },\n variants: {\n ...textVariants,\n weight: {\n regular: { fontWeight: 400 },\n bold: { fontWeight: 600 }\n },\n family: {\n body: { fontFamily: '$body' },\n display: { fontFamily: '$display' },\n mono: { fontFamily: '$mono' },\n }\n }\n})\n\ntype TextProps = Override<\n React.ComponentProps<typeof StyledText>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Text: React.ForwardRefExoticComponent<TextProps> =\n React.forwardRef(({\n size = 'md',\n weight = 'regular',\n family = 'body',\n ...remainingProps\n }, ref) => (\n <StyledText\n size={size}\n weight={weight}\n family={family}\n {...remainingProps}\n ref={ref}\n />\n ))\n\nText.displayName = 'Text'\n"],"names":["textVariants","capsize","getTextVariant","size","noCapsize","StyledText","styled","Text","React","weight","family","remainingProps","ref"],"mappings":"sTAMa,MAAAA,EAAe,CAC1B,KAAM,CACJ,GAAI,CAAE,SAAU,MAAO,WAAY,IAAK,GAAGC,EAAQ,KAAM,CAAE,EAC3D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,EAC5D,GAAI,CAAE,SAAU,MAAO,WAAY,IAAK,GAAGA,EAAQ,KAAM,CAAE,EAC3D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,EAC5D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,CAC9D,EACA,UAAW,CACT,KAAM,CACJ,sBAAuB,CAAE,QAAS,iBAAkB,CACtD,CACF,CACF,EAEaC,EAGD,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,KAAO,CACpC,GAAGJ,EAAa,KAAKG,GACrB,GAAGH,EAAa,UAAU,GAAGI,IAC/B,GAEaC,EAAaC,EAAO,IAAK,CACpC,EAAG,EAEH,QAAS,CACP,oBAAqB,CAAE,QAAS,MAAO,CACzC,EACA,SAAU,CACR,GAAGN,EACH,OAAQ,CACN,QAAS,CAAE,WAAY,GAAI,EAC3B,KAAM,CAAE,WAAY,GAAI,CAC1B,EACA,OAAQ,CACN,KAAM,CAAE,WAAY,OAAQ,EAC5B,QAAS,CAAE,WAAY,UAAW,EAClC,KAAM,CAAE,WAAY,OAAQ,CAC9B,CACF,CACF,CAAC,EAoBYO,EACXC,EAAM,WAAW,CAAC,CAChB,KAAAL,EAAO,KACP,OAAAM,EAAS,UACT,OAAAC,EAAU,UACPC,CACL,EAAGC,IACDJ,EAAA,cAACH,EAAA,CACC,KAAMF,EACN,OAAQM,EACR,OAAQC,EACP,GAAGC,EACJ,IAAKC,EACP,CACD,EAEHL,EAAK,YAAc"}
|
|
@@ -780,7 +780,9 @@ export declare const TopBar: {
|
|
|
780
780
|
};
|
|
781
781
|
BrandName: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
782
782
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
783
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
783
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
784
|
+
weight?: "bold" | "regular" | undefined;
|
|
785
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
784
786
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
785
787
|
noCapsize?: boolean | "true" | undefined;
|
|
786
788
|
}, {
|
|
@@ -11,7 +11,9 @@ export declare const TopBarBrandLogo: {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const TopBarBrandName: import("@atom-learning/stitches-react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
13
13
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
14
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
14
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
15
|
+
weight?: "bold" | "regular" | undefined;
|
|
16
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
15
17
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
16
18
|
noCapsize?: boolean | "true" | undefined;
|
|
17
19
|
}, {
|
|
@@ -5122,7 +5122,9 @@ export declare const Tree: React.ForwardRefExoticComponent<Omit<{
|
|
|
5122
5122
|
}) => JSX.Element;
|
|
5123
5123
|
Text: (props: Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
|
|
5124
5124
|
ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
|
|
5125
|
-
}, "size" | "css" | "noCapsize"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5125
|
+
}, "size" | "css" | "weight" | "noCapsize" | "family"> & import("@atom-learning/stitches-react/types/styled-component").TransformProps<{
|
|
5126
|
+
weight?: "bold" | "regular" | undefined;
|
|
5127
|
+
family?: "display" | "mono" | "body" | undefined;
|
|
5126
5128
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
5127
5129
|
noCapsize?: boolean | "true" | undefined;
|
|
5128
5130
|
}, {
|