@atom-learning/components 3.1.1 → 3.2.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 +6 -3
- package/dist/components/navigation/NavigationMenu.js +1 -1
- package/dist/components/navigation/NavigationMenu.js.map +1 -1
- package/dist/components/navigation/NavigationMenu.styles.d.ts +1 -0
- package/dist/components/navigation/NavigationMenu.styles.js +1 -1
- package/dist/components/navigation/NavigationMenu.styles.js.map +1 -1
- package/dist/components/navigation/NavigationMenuDropdownContent.d.ts +323 -1
- package/dist/components/navigation/NavigationMenuDropdownContent.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdownContent.js.map +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js.map +1 -1
- package/dist/components/navigation/NavigationMenuLink.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
- package/dist/components/navigation/stitches.navigationMenu.colorscheme.config.d.ts +26 -0
- package/dist/components/navigation/stitches.navigationMenu.colorscheme.config.js +2 -0
- package/dist/components/navigation/stitches.navigationMenu.colorscheme.config.js.map +1 -0
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.d.ts +5 -4
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js.map +1 -1
- package/dist/components/navigation-menu-vertical/stitches.navigationMenuVertical.colorscheme.config.d.ts +15 -0
- package/dist/components/navigation-menu-vertical/stitches.navigationMenuVertical.colorscheme.config.js +2 -0
- package/dist/components/navigation-menu-vertical/stitches.navigationMenuVertical.colorscheme.config.js.map +1 -0
- package/dist/components/top-bar/TopBar.d.ts +1 -0
- package/dist/components/top-bar/TopBar.js +1 -1
- package/dist/components/top-bar/TopBar.js.map +1 -1
- package/dist/components/top-bar/stitches.topBar.colorscheme.config.d.ts +12 -0
- package/dist/components/top-bar/stitches.topBar.colorscheme.config.js +2 -0
- package/dist/components/top-bar/stitches.topBar.colorscheme.config.js.map +1 -0
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["import { focusVisibleStyleBlock } from '~/utilities'\nimport { resetButtonStyles, resetLinkStyles } from '~/utilities/style/reset'\n\nexport const navigationMenuVerticalItemStyles = {\n ...resetButtonStyles,\n ...resetLinkStyles,\n cursor: 'pointer',\n borderRadius: '$2',\n display: 'flex',\n alignItems: 'center',\n p: '$2',\n pl: `var(--navigation-menu-vertical-item-pl)`,\n width: '100%',\n '--navigation-menu-vertical-item-font-weight': 400,\n '&[data-active]': {\n
|
|
1
|
+
{"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["import { focusVisibleStyleBlock } from '~/utilities'\nimport { resetButtonStyles, resetLinkStyles } from '~/utilities/style/reset'\n\nexport const navigationMenuVerticalItemStyles = {\n ...resetButtonStyles,\n ...resetLinkStyles,\n cursor: 'pointer',\n borderRadius: '$2',\n display: 'flex',\n alignItems: 'center',\n p: '$2',\n pl: `var(--navigation-menu-vertical-item-pl)`,\n width: '100%',\n color: '$text',\n bg: '$background',\n '--navigation-menu-vertical-item-font-weight': 400,\n '&[data-active]': {\n bg: '$backgroundSelected',\n color: '$textSelected',\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[data-state=open]': {\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[data-disabled]': {\n opacity: 0.3,\n cursor: 'not-allowed'\n },\n '&:not([data-disabled])': {\n '&:hover': {\n bg: '$backgroundHover'\n },\n '&:active': {\n bg: '$backgroundActive'\n },\n '&:focus-visible': focusVisibleStyleBlock()\n },\n variants: {\n size: {\n md: {\n minHeight: '$4'\n },\n lg: {\n minHeight: '$5'\n }\n }\n }\n}\n"],"names":["navigationMenuVerticalItemStyles","resetButtonStyles","resetLinkStyles","focusVisibleStyleBlock"],"mappings":"4YAGaA,EAAmC,CAC9C,GAAGC,EACH,GAAGC,EACH,OAAQ,UACR,aAAc,KACd,QAAS,OACT,WAAY,SACZ,EAAG,KACH,GAAI,0CACJ,MAAO,OACP,MAAO,QACP,GAAI,cACJ,8CAA+C,IAC/C,iBAAkB,CAChB,GAAI,sBACJ,MAAO,gBACP,8CAA+C,GACjD,EACA,qBAAsB,CACpB,8CAA+C,GACjD,EACA,mBAAoB,CAClB,QAAS,GACT,OAAQ,aACV,EACA,yBAA0B,CACxB,UAAW,CACT,GAAI,kBACN,EACA,WAAY,CACV,GAAI,mBACN,EACA,kBAAmBC,EAAuB,CAC5C,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,UAAW,IACb,EACA,GAAI,CACF,UAAW,IACb,CACF,CACF,CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const colorSchemes: {
|
|
2
|
+
light: string & {
|
|
3
|
+
className: string;
|
|
4
|
+
selector: string;
|
|
5
|
+
} & import("@stitches/react/types/stitches").ThemeTokens<{
|
|
6
|
+
colors: {
|
|
7
|
+
text: string;
|
|
8
|
+
background: string;
|
|
9
|
+
backgroundHover: string;
|
|
10
|
+
backgroundActive: string;
|
|
11
|
+
textSelected: string;
|
|
12
|
+
backgroundSelected: string;
|
|
13
|
+
};
|
|
14
|
+
}, "">;
|
|
15
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createTheme as e}from"../../stitches.js";const c=e({colors:{text:"$foreground",background:"$base1",backgroundHover:"$base2",backgroundActive:"$base3",textSelected:"$accent9",backgroundSelected:"$accent2"}}),o={light:c};export{o as colorSchemes};
|
|
2
|
+
//# sourceMappingURL=stitches.navigationMenuVertical.colorscheme.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stitches.navigationMenuVertical.colorscheme.config.js","sources":["../../../src/components/navigation-menu-vertical/stitches.navigationMenuVertical.colorscheme.config.ts"],"sourcesContent":["import { createTheme } from '~/stitches'\n\nconst light = createTheme({\n colors: {\n text: '$foreground',\n background: '$base1',\n backgroundHover: '$base2',\n backgroundActive: '$base3',\n textSelected: '$accent9',\n backgroundSelected: '$accent2'\n }\n})\n\nexport const colorSchemes = {\n light\n}\n"],"names":["light","createTheme","colorSchemes"],"mappings":"gDAEA,MAAMA,EAAQC,EAAY,CACxB,OAAQ,CACN,KAAM,cACN,WAAY,SACZ,gBAAiB,SACjB,iBAAkB,SAClB,aAAc,WACd,mBAAoB,UACtB,CACF,CAAC,EAEYC,EAAe,CAC1B,MAAAF,CACF"}
|
|
@@ -335,6 +335,7 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
335
335
|
declare type StyledRootProps = React.ComponentProps<typeof StyledRoot>;
|
|
336
336
|
interface TopBarProps extends StyledRootProps {
|
|
337
337
|
css?: CSS;
|
|
338
|
+
className?: string;
|
|
338
339
|
}
|
|
339
340
|
export declare const TopBar: React.FC<TopBarProps> & TopBarSubComponents;
|
|
340
341
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"react";import{styled as e}from"../../stitches.js";import{useWindowScrollPosition as d}from"../../utilities/hooks/useWindowScrollPosition.js";import{Divider as n}from"../divider/Divider.js";import{Flex as c}from"../flex/Flex.js";import{colorSchemes as l}from"./stitches.topBar.colorscheme.config.js";import{TopBarActionIcon as p}from"./TopBarActionIcon.js";import{TopBarBrandLogo as t,TopBarBrand as h,TopBarBrandName as g}from"./TopBarBrand.js";const B=()=>r.createElement(n,{orientation:"vertical",css:{height:"$2",bg:"$divider"}}),x=e("div",{bg:"$background",position:"sticky",display:"flex",alignItems:"center",width:"100vw",top:"0",zIndex:1,borderBottom:"1px solid $borderBottom",transition:"box-shadow .2s ease-out",variants:{hasScrolled:{true:{boxShadow:"0px 4px 4px -2px rgba(31, 31, 31, 0.1);"}},size:{md:{height:"$6",[`& ${t}`]:{'&[src$=".svg"]':{height:24,width:"auto"}}},lg:{height:"$7",[`& ${t}`]:{'&[src$=".svg"]':{height:32,width:"auto"}}}}}}),$=e(c,{alignItems:"center",height:"$4",mx:"$4",width:"100%","@md":{mx:"$5"}}),o=({size:i="md",className:a=l.light,...m})=>{const{y:s}=d();return r.createElement(x,{className:a,hasScrolled:!!s,size:i},r.createElement($,{...m}))};o.Brand=h,o.BrandLogo=t,o.BrandName=g,o.ActionIcon=p,o.Divider=B,o.displayName="TopBar";export{o as TopBar};
|
|
2
2
|
//# sourceMappingURL=TopBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBar.js","sources":["../../../src/components/top-bar/TopBar.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport { useWindowScrollPosition } from '~/utilities/hooks/useWindowScrollPosition'\n\nimport { Divider } from '../divider'\nimport { Flex } from '../flex'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\ninterface TopBarSubComponents {\n Brand: typeof TopBarBrand\n BrandLogo: typeof TopBarBrandLogo\n BrandName: typeof TopBarBrandName\n ActionIcon: typeof TopBarActionIcon\n Divider: typeof TopBarDivider\n}\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" css={{ height: '$2', bg: '$
|
|
1
|
+
{"version":3,"file":"TopBar.js","sources":["../../../src/components/top-bar/TopBar.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport { useWindowScrollPosition } from '~/utilities/hooks/useWindowScrollPosition'\n\nimport { Divider } from '../divider'\nimport { Flex } from '../flex'\nimport { colorSchemes as topBarColorSchemes } from './stitches.topBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\ninterface TopBarSubComponents {\n Brand: typeof TopBarBrand\n BrandLogo: typeof TopBarBrandLogo\n BrandName: typeof TopBarBrandName\n ActionIcon: typeof TopBarActionIcon\n Divider: typeof TopBarDivider\n}\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" css={{ height: '$2', bg: '$divider' }} />\n)\n\nconst StyledRoot = styled('div', {\n bg: '$background',\n position: 'sticky',\n display: 'flex',\n alignItems: 'center',\n width: '100vw',\n top: '0',\n zIndex: 1,\n borderBottom: '1px solid $borderBottom',\n transition: 'box-shadow .2s ease-out',\n variants: {\n hasScrolled: {\n true: {\n boxShadow: '0px 4px 4px -2px rgba(31, 31, 31, 0.1);'\n }\n },\n size: {\n md: {\n height: '$6',\n [`& ${TopBarBrandLogo}`]: {\n '&[src$=\".svg\"]': {\n height: 24,\n width: 'auto'\n }\n }\n },\n lg: {\n height: '$7',\n [`& ${TopBarBrandLogo}`]: {\n '&[src$=\".svg\"]': {\n height: 32,\n width: 'auto'\n }\n }\n }\n }\n }\n})\n\nconst Container = styled(Flex, {\n alignItems: 'center',\n height: '$4',\n mx: '$4',\n width: '100%',\n '@md': {\n mx: '$5'\n }\n})\n\ntype StyledRootProps = React.ComponentProps<typeof StyledRoot>\n\ninterface TopBarProps extends StyledRootProps {\n css?: CSS\n className?: string\n}\n\nexport const TopBar: React.FC<TopBarProps> & TopBarSubComponents = ({\n size = 'md',\n className = topBarColorSchemes['light'],\n ...props\n}) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <StyledRoot\n className={className}\n hasScrolled={!!scrollPositionY}\n size={size}\n >\n <Container {...props} />\n </StyledRoot>\n )\n}\n\nTopBar.Brand = TopBarBrand\nTopBar.BrandLogo = TopBarBrandLogo\nTopBar.BrandName = TopBarBrandName\nTopBar.ActionIcon = TopBarActionIcon\nTopBar.Divider = TopBarDivider\n\nTopBar.displayName = 'TopBar'\n"],"names":["TopBarDivider","React","Divider","StyledRoot","styled","TopBarBrandLogo","Container","Flex","TopBar","size","className","topBarColorSchemes","props","scrollPositionY","useWindowScrollPosition","TopBarBrand","TopBarBrandName","TopBarActionIcon"],"mappings":"2cAmBA,MAAMA,EAAgB,IACpBC,EAAA,cAACC,EAAA,CAAQ,YAAY,WAAW,IAAK,CAAE,OAAQ,KAAM,GAAI,UAAW,EAAG,EAGnEC,EAAaC,EAAO,MAAO,CAC/B,GAAI,cACJ,SAAU,SACV,QAAS,OACT,WAAY,SACZ,MAAO,QACP,IAAK,IACL,OAAQ,EACR,aAAc,0BACd,WAAY,0BACZ,SAAU,CACR,YAAa,CACX,KAAM,CACJ,UAAW,yCACb,CACF,EACA,KAAM,CACJ,GAAI,CACF,OAAQ,KACR,CAAC,KAAKC,KAAoB,CACxB,iBAAkB,CAChB,OAAQ,GACR,MAAO,MACT,CACF,CACF,EACA,GAAI,CACF,OAAQ,KACR,CAAC,KAAKA,KAAoB,CACxB,iBAAkB,CAChB,OAAQ,GACR,MAAO,MACT,CACF,CACF,CACF,CACF,CACF,CAAC,EAEKC,EAAYF,EAAOG,EAAM,CAC7B,WAAY,SACZ,OAAQ,KACR,GAAI,KACJ,MAAO,OACP,MAAO,CACL,GAAI,IACN,CACF,CAAC,EASYC,EAAsD,CAAC,CAClE,KAAAC,EAAO,KACP,UAAAC,EAAYC,EAAmB,SAC5BC,CACL,IAAM,CACJ,KAAM,CAAE,EAAGC,CAAgB,EAAIC,EAE/B,EAAA,OACEb,EAAA,cAACE,EAAA,CACC,UAAWO,EACX,YAAa,CAAC,CAACG,EACf,KAAMJ,CAENR,EAAAA,EAAA,cAACK,EAAA,CAAW,GAAGM,CAAO,CAAA,CACxB,CAEJ,EAEAJ,EAAO,MAAQO,EACfP,EAAO,UAAYH,EACnBG,EAAO,UAAYQ,EACnBR,EAAO,WAAaS,EACpBT,EAAO,QAAUR,EAEjBQ,EAAO,YAAc"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const colorSchemes: {
|
|
2
|
+
light: string & {
|
|
3
|
+
className: string;
|
|
4
|
+
selector: string;
|
|
5
|
+
} & import("@stitches/react/types/stitches").ThemeTokens<{
|
|
6
|
+
colors: {
|
|
7
|
+
background: string;
|
|
8
|
+
divider: string;
|
|
9
|
+
borderBottom: string;
|
|
10
|
+
};
|
|
11
|
+
}, "">;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stitches.topBar.colorscheme.config.js","sources":["../../../src/components/top-bar/stitches.topBar.colorscheme.config.ts"],"sourcesContent":["import { createTheme } from '~/stitches'\n\nconst light = createTheme({\n colors: {\n background: 'white',\n divider: '$grey200',\n borderBottom: '$grey200'\n }\n})\n\nexport const colorSchemes = {\n light\n}\n"],"names":["light","createTheme","colorSchemes"],"mappings":"gDAEA,MAAMA,EAAQC,EAAY,CACxB,OAAQ,CACN,WAAY,QACZ,QAAS,WACT,aAAc,UAChB,CACF,CAAC,EAEYC,EAAe,CAC1B,MAAAF,CACF"}
|