@atom-learning/components 6.0.0-beta.34 → 6.0.0-beta.36

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.
@@ -33,6 +33,7 @@ export declare const Carousel: {
33
33
  index: number;
34
34
  }) => React.JSX.Element;
35
35
  Slider: ({ children, className, overflow, ...rest }: React.PropsWithChildren<(React.ComponentClass<import("pure-react-carousel").SliderProps, any> | React.FunctionComponent<import("pure-react-carousel").SliderProps>) & {
36
+ tabIndex?: number;
36
37
  className?: string;
37
38
  overflow?: boolean;
38
39
  }>) => React.JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import { Slider as BaseSlider } from 'pure-react-carousel';
2
2
  import * as React from 'react';
3
3
  export declare const CarouselSlider: ({ children, className, overflow, ...rest }: React.PropsWithChildren<typeof BaseSlider & {
4
+ tabIndex?: number;
4
5
  className?: string;
5
6
  overflow?: boolean;
6
7
  }>) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselSlider.js","sources":["../../../src/components/carousel/CarouselSlider.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Slider as BaseSlider } from 'pure-react-carousel'\nimport * as React from 'react'\n\nexport const CarouselSlider = ({\n children,\n className,\n overflow,\n ...rest\n}: React.PropsWithChildren<typeof BaseSlider & {\n className?: string\n overflow?: boolean\n}>) => (\n <BaseSlider\n {...rest}\n className={\n String.raw`ml-[50%] -translate-x-1/2 cursor-grab overflow-hidden **:[[class*=slideInner]]:flex **:[[class*=slideInner]]:justify-center **:[[class*=slide\\_]]:float-left **:[[class*=slide\\_]]:pb-0! **:[[class*=sliderTray\\_]]:transition-transform **:[[class*=sliderTray\\_]]:duration-500 **:[[class*=sliderTray\\_]]:ease-[cubic-bezier(.645,.045,.355,1)] ` +\n clsx(overflow && 'overflow-visible', className)\n }\n >\n {children}\n </BaseSlider>\n)\n"],"names":["CarouselSlider","children","className","overflow","rest","React","BaseSlider","clsx"],"mappings":"yFAIO,MAAMA,EAAiB,CAAC,CAC7B,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAIEC,EAAA,cAACC,EAAA,CACE,GAAGF,EACJ,UACE,OAAO,wVACPG,EAAKJ,GAAY,mBAAoBD,CAAS,GAG/CD,CACH"}
1
+ {"version":3,"file":"CarouselSlider.js","sources":["../../../src/components/carousel/CarouselSlider.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Slider as BaseSlider } from 'pure-react-carousel'\nimport * as React from 'react'\n\nexport const CarouselSlider = ({\n children,\n className,\n overflow,\n ...rest\n}: React.PropsWithChildren<typeof BaseSlider & {\n tabIndex?: number\n className?: string\n overflow?: boolean\n}>) => (\n <BaseSlider\n {...rest}\n className={\n String.raw`ml-[50%] -translate-x-1/2 cursor-grab overflow-hidden **:[[class*=slideInner]]:flex **:[[class*=slideInner]]:justify-center **:[[class*=slide\\_]]:float-left **:[[class*=slide\\_]]:pb-0! **:[[class*=sliderTray\\_]]:transition-transform **:[[class*=sliderTray\\_]]:duration-500 **:[[class*=sliderTray\\_]]:ease-[cubic-bezier(.645,.045,.355,1)] ` +\n clsx(overflow && 'overflow-visible', className)\n }\n >\n {children}\n </BaseSlider>\n)\n"],"names":["CarouselSlider","children","className","overflow","rest","React","BaseSlider","clsx"],"mappings":"yFAIO,MAAMA,EAAiB,CAAC,CAC7B,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,GAAGC,CACL,IAKEC,EAAA,cAACC,EAAA,CACE,GAAGF,EACJ,UACE,OAAO,wVACPG,EAAKJ,GAAY,mBAAoBD,CAAS,GAG/CD,CACH"}
@@ -1,2 +1,2 @@
1
- import{Close as l}from"@atom-learning/icons";import{Content as m,Arrow as p,Close as c}from"@radix-ui/react-popover";import*as e from"react";import{styled as t}from"../../styled.js";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Icon as f}from"../icon/Icon.js";const h=t(m,{base:["bg-white","rounded-md","shadow-lg","max-w-[90vw]","p-6","pr-10","relative","z-10","will-change-transform","will-change-opacity","animation-duration-75","[--slide-opacity-out:0]","data-[side=top]:[--slide-direction-out-y:-4px]","data-[side=right]:[--slide-direction-out-x:4px]","data-[side=bottom]:[--slide-direction-out-y:4px]","data-[side=left]:[--slide-direction-out-x:-4px]","motion-safe:data-[state=open]:animate-slide-direction-in","motion-safe:data-[state=closed]:animate-slide-direction-out"],variants:{size:{sm:["max-w-200px"],md:["max-w-400px"],lg:["max-w-600px"]}}}),w=t(p,{base:["fill-white","z-1","in-data-[align=end]:mx-6"]}),u=({children:o,side:i="top",sideOffset:a=8,closePopoverText:s="Close popover",showCloseButton:d=!0,size:n="md",...r})=>e.createElement(h,{size:n,side:i,sideOffset:a,...r},d&&e.createElement(x,{as:c,label:s,size:"md",hasTooltip:!1,theme:"neutral",className:"absolute top-0.5 right-0.5"},e.createElement(f,{is:l})),o,e.createElement(w,{width:16,height:8}));export{u as PopoverContent};
1
+ import{Close as l}from"@atom-learning/icons";import{Content as m,Arrow as p,Close as c}from"@radix-ui/react-popover";import*as e from"react";import{styled as t}from"../../styled.js";import{ActionIcon as f}from"../action-icon/ActionIcon.js";import{Icon as h}from"../icon/Icon.js";const w=t(m,{base:["bg-white","rounded-md","shadow-lg","max-w-[90vw]","p-6","pr-10","relative","z-10","will-change-transform","will-change-opacity","animation-duration-75","[--slide-opacity-out:0]","data-[side=top]:[--slide-direction-out-y:-4px]","data-[side=right]:[--slide-direction-out-x:4px]","data-[side=bottom]:[--slide-direction-out-y:4px]","data-[side=left]:[--slide-direction-out-x:-4px]","motion-safe:data-[state=open]:animate-slide-direction-in","motion-safe:data-[state=closed]:animate-slide-direction-out"],variants:{size:{sm:["max-w-50"],md:["max-w-100"],lg:["max-w-150"]}}}),x=t(p,{base:["fill-white","z-1","in-data-[align=end]:mx-6"]}),u=({children:o,side:i="top",sideOffset:a=8,closePopoverText:s="Close popover",showCloseButton:d=!0,size:n="md",...r})=>e.createElement(w,{size:n,side:i,sideOffset:a,...r},d&&e.createElement(f,{as:c,label:s,size:"md",hasTooltip:!1,theme:"neutral",className:"absolute top-0.5 right-0.5"},e.createElement(h,{is:l})),o,e.createElement(x,{width:16,height:8}));export{u as PopoverContent};
2
2
  //# sourceMappingURL=PopoverContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PopoverContent.js","sources":["../../../src/components/popover/PopoverContent.tsx"],"sourcesContent":["import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Arrow, Close, Content } from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'max-w-[90vw]',\n 'p-6',\n 'pr-10',\n 'relative',\n 'z-10',\n 'will-change-transform',\n 'will-change-opacity',\n 'animation-duration-75',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-200px'],\n md: ['max-w-400px'],\n lg: ['max-w-600px']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: ['fill-white', 'z-1', 'in-data-[align=end]:mx-6']\n})\n\ntype PopoverContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content> & {\n closePopoverText?: string\n showCloseButton?: boolean\n }\n\nexport const PopoverContent = ({\n children,\n side = 'top',\n sideOffset = 8,\n closePopoverText = 'Close popover',\n showCloseButton = true,\n size = 'md',\n ...remainingProps\n}: PopoverContentProps) => (\n <StyledContent\n size={size}\n side={side}\n sideOffset={sideOffset}\n {...remainingProps}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closePopoverText}\n size=\"md\"\n hasTooltip={false}\n theme=\"neutral\"\n className=\"absolute top-0.5 right-0.5\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {children}\n <StyledArrow width={16} height={8} />\n </StyledContent>\n)\n"],"names":["StyledContent","styled","Content","StyledArrow","Arrow","PopoverContent","children","side","sideOffset","closePopoverText","showCloseButton","size","remainingProps","React","ActionIcon","Close","Icon","CloseIcon"],"mappings":"uRASA,MAAMA,EAAgBC,EAAOC,EAAS,CACpC,KAAM,CACJ,WACA,aACA,YACA,eACA,MACA,QACA,WACA,OACA,wBACA,sBACA,wBACA,0BACA,iDACA,kDACA,mDACA,kDACA,2DACA,6DACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,aAAa,EAClB,GAAI,CAAC,aAAa,EAClB,GAAI,CAAC,aAAa,CACpB,CACF,CACF,CAAC,EAEKC,EAAcF,EAAOG,EAAO,CAChC,KAAM,CAAC,aAAc,MAAO,0BAA0B,CACxD,CAAC,EAQYC,EAAiB,CAAC,CAC7B,SAAAC,EACA,KAAAC,EAAO,MACP,WAAAC,EAAa,EACb,iBAAAC,EAAmB,gBACnB,gBAAAC,EAAkB,GAClB,KAAAC,EAAO,KACP,GAAGC,CACL,IACEC,EAAA,cAACb,EAAA,CACC,KAAMW,EACN,KAAMJ,EACN,WAAYC,EACX,GAAGI,CAEHF,EAAAA,GACCG,EAAA,cAACC,EAAA,CACC,GAAIC,EACJ,MAAON,EACP,KAAK,KACL,WAAY,GACZ,MAAM,UACN,UAAU,4BAEVI,EAAAA,EAAA,cAACG,EAAA,CAAK,GAAIC,CAAAA,CAAW,CACvB,EAEDX,EACDO,EAAA,cAACV,EAAA,CAAY,MAAO,GAAI,OAAQ,EAAG,CACrC"}
1
+ {"version":3,"file":"PopoverContent.js","sources":["../../../src/components/popover/PopoverContent.tsx"],"sourcesContent":["import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Arrow, Close, Content } from '@radix-ui/react-popover'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nconst StyledContent = styled(Content, {\n base: [\n 'bg-white',\n 'rounded-md',\n 'shadow-lg',\n 'max-w-[90vw]',\n 'p-6',\n 'pr-10',\n 'relative',\n 'z-10',\n 'will-change-transform',\n 'will-change-opacity',\n 'animation-duration-75',\n '[--slide-opacity-out:0]',\n 'data-[side=top]:[--slide-direction-out-y:-4px]',\n 'data-[side=right]:[--slide-direction-out-x:4px]',\n 'data-[side=bottom]:[--slide-direction-out-y:4px]',\n 'data-[side=left]:[--slide-direction-out-x:-4px]',\n 'motion-safe:data-[state=open]:animate-slide-direction-in',\n 'motion-safe:data-[state=closed]:animate-slide-direction-out'\n ],\n variants: {\n size: {\n sm: ['max-w-50'],\n md: ['max-w-100'],\n lg: ['max-w-150']\n }\n }\n})\n\nconst StyledArrow = styled(Arrow, {\n base: ['fill-white', 'z-1', 'in-data-[align=end]:mx-6']\n})\n\ntype PopoverContentProps = React.ComponentProps<typeof StyledContent> &\n React.ComponentProps<typeof Content> & {\n closePopoverText?: string\n showCloseButton?: boolean\n }\n\nexport const PopoverContent = ({\n children,\n side = 'top',\n sideOffset = 8,\n closePopoverText = 'Close popover',\n showCloseButton = true,\n size = 'md',\n ...remainingProps\n}: PopoverContentProps) => (\n <StyledContent\n size={size}\n side={side}\n sideOffset={sideOffset}\n {...remainingProps}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closePopoverText}\n size=\"md\"\n hasTooltip={false}\n theme=\"neutral\"\n className=\"absolute top-0.5 right-0.5\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {children}\n <StyledArrow width={16} height={8} />\n </StyledContent>\n)\n"],"names":["StyledContent","styled","Content","StyledArrow","Arrow","PopoverContent","children","side","sideOffset","closePopoverText","showCloseButton","size","remainingProps","React","ActionIcon","Close","Icon","CloseIcon"],"mappings":"uRASA,MAAMA,EAAgBC,EAAOC,EAAS,CACpC,KAAM,CACJ,WACA,aACA,YACA,eACA,MACA,QACA,WACA,OACA,wBACA,sBACA,wBACA,0BACA,iDACA,kDACA,mDACA,kDACA,2DACA,6DACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,UAAU,EACf,GAAI,CAAC,WAAW,EAChB,GAAI,CAAC,WAAW,CAClB,CACF,CACF,CAAC,EAEKC,EAAcF,EAAOG,EAAO,CAChC,KAAM,CAAC,aAAc,MAAO,0BAA0B,CACxD,CAAC,EAQYC,EAAiB,CAAC,CAC7B,SAAAC,EACA,KAAAC,EAAO,MACP,WAAAC,EAAa,EACb,iBAAAC,EAAmB,gBACnB,gBAAAC,EAAkB,GAClB,KAAAC,EAAO,KACP,GAAGC,CACL,IACEC,EAAA,cAACb,EAAA,CACC,KAAMW,EACN,KAAMJ,EACN,WAAYC,EACX,GAAGI,CAEHF,EAAAA,GACCG,EAAA,cAACC,EAAA,CACC,GAAIC,EACJ,MAAON,EACP,KAAK,KACL,WAAY,GACZ,MAAM,UACN,UAAU,4BAEVI,EAAAA,EAAA,cAACG,EAAA,CAAK,GAAIC,CAAAA,CAAW,CACvB,EAEDX,EACDO,EAAA,cAACV,EAAA,CAAY,MAAO,GAAI,OAAQ,EAAG,CACrC"}