@atom-learning/components 1.7.4 → 1.8.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 CHANGED
@@ -1,10 +1,3 @@
1
- ## [1.7.4](https://github.com/Atom-Learning/components/compare/v1.7.3...v1.7.4) (2022-04-13)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * bot token in correct workflow step ([5a97260](https://github.com/Atom-Learning/components/commit/5a972609438a50f7032d3e653de8f3eed14602f5))
7
-
8
1
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
9
2
 
10
3
 
@@ -17,4 +17,9 @@ declare type CarouselSubComponents = {
17
17
  Slider: typeof CarouselSlider;
18
18
  };
19
19
  export declare const Carousel: React.FC<CarouselProps & React.ComponentProps<typeof CSSWrapper>> & CarouselSubComponents;
20
+ /**
21
+ * Documentation about the hook usage
22
+ * https://github.com/express-labs/pure-react-carousel#hooks-and-usecontext
23
+ */
24
+ export declare const useCarousel: () => import("pure-react-carousel").CarouselStoreInterface;
20
25
  export {};
@@ -1 +1 @@
1
- import{CarouselProvider as m}from"pure-react-carousel";import{createElement as o}from"react";import{CarouselArrowNext as s,CarouselArrowPrevious as u}from"./CarouselArrows.js";import{CarouselPagination as p}from"./CarouselPagination.js";import{CarouselSlide as d}from"./CarouselSlide.js";import{CarouselSlider as n}from"./CarouselSlider.js";import{CSSWrapper as C}from"../../utilities/css-wrapper/CSSWrapper.js";const r=({children:e,css:i,slideHeight:t,slideWidth:a,numSlides:l})=>o(C,{css:i},o(m,{naturalSlideWidth:a,naturalSlideHeight:t,totalSlides:l},e));r.ArrowNext=s,r.ArrowPrevious=u,r.Pagination=p,r.Slide=d,r.Slider=n,r.displayName="Carousel";export{r as Carousel};
1
+ import{CarouselProvider as s,CarouselContext as u}from"pure-react-carousel";import{createElement as o,useContext as m}from"react";import{CarouselArrowNext as C,CarouselArrowPrevious as n}from"./CarouselArrows.js";import{CarouselPagination as p}from"./CarouselPagination.js";import{CarouselSlide as d}from"./CarouselSlide.js";import{CarouselSlider as S}from"./CarouselSlider.js";import{CSSWrapper as f}from"../../utilities/css-wrapper/CSSWrapper.js";const r=({children:e,css:t,slideHeight:i,slideWidth:a,numSlides:l})=>o(f,{css:t},o(s,{naturalSlideWidth:a,naturalSlideHeight:i,totalSlides:l},e)),x=()=>m(u);r.ArrowNext=C,r.ArrowPrevious=n,r.Pagination=p,r.Slide=d,r.Slider=S,r.displayName="Carousel";export{r as Carousel,x as useCarousel};
@@ -1 +1 @@
1
- export { Carousel } from './Carousel';
1
+ export { Carousel, useCarousel } from './Carousel';
@@ -1 +1 @@
1
- import{Close as p}from"@atom-learning/icons";import{Overlay as u,Content as b,Close as x}from"@radix-ui/react-dialog";import{createElement as t,Fragment as g}from"react";import{keyframes as n,styled as i}from"../../stitches.js";import{ActionIcon as h}from"../action-icon/ActionIcon.js";import{Icon as w}from"../icon/Icon.js";import{fadeIn as $,fadeOut as v}from"../../utilities/style/keyframe-animations.js";const o="translate3d(-50%, -50%, 0)",s="translate3d(-50%, 50vh, 0)",r="modal_overlay",y=n({"0%":{transform:s},"100%":{transform:o}}),C=n({"0%":{transform:o},"100%":{transform:s}}),O=i(u,{backgroundColor:"$alpha600",inset:0,position:"fixed","@allowMotion":{'&[data-state="open"]':{animation:`${$} 250ms ease-out`},'&[data-state="closed"]':{animation:`${v} 550ms ease-out`}}}),D=i(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:o,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${y} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${C} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),S=({size:l="sm",children:m,closeDialogText:d="Close dialog",showCloseButton:c=!0,...f})=>t(g,null,t(O,{id:r}),t(D,{size:l,"aria-label":"Dialog",onPointerDownOutside:e=>{const a=e.target;(a==null?void 0:a.id)!==r&&e.preventDefault()},...f},c&&t(h,{as:x,css:{position:"absolute",right:"$4",top:"$4"},label:d,size:"lg",theme:"neutral"},t(w,{is:p})),m));export{S as DialogContent};
1
+ import{Close as u}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as g,Close as h}from"@radix-ui/react-dialog";import{createElement as o}from"react";import{keyframes as n,styled as i}from"../../stitches.js";import{ActionIcon as w}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{fadeIn as v,fadeOut as I}from"../../utilities/style/keyframe-animations.js";const t="translate3d(-50%, -50%, 0)",s="translate3d(-50%, 50vh, 0)",r="modal_overlay",l=2147483646,O=n({"0%":{transform:s},"100%":{transform:t}}),y=n({"0%":{transform:t},"100%":{transform:s}}),C=i(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:l,"@allowMotion":{'&[data-state="open"]':{animation:`${v} 250ms ease-out`},'&[data-state="closed"]':{animation:`${I} 550ms ease-out`}}}),D=i(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:t,zIndex:l,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${O} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${y} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{xs:{width:"380px"},sm:{width:"480px"},md:{width:"600px"},lg:{width:"800px"},xl:{width:"1100px"}}}}),z=({size:d="sm",children:m,closeDialogText:c="Close dialog",showCloseButton:f=!0,...p})=>o(g,null,o(C,{id:r},o(D,{size:d,"aria-label":"Dialog",onPointerDownOutside:e=>{const a=e.target;(a==null?void 0:a.id)!==r&&e.preventDefault()},...p},f&&o(w,{as:h,css:{position:"absolute",right:"$4",top:"$4"},label:c,size:"lg",theme:"neutral"},o($,{is:u})),m)));export{z as DialogContent};
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Button } from '../button';
3
3
  export declare type FileInputProps = React.ComponentProps<typeof Button> & {
4
- onSelect: (selection: FileList | null) => void;
4
+ onFileSelect: (selection: FileList | null) => void;
5
5
  accept?: string;
6
6
  multiple?: boolean;
7
7
  };
@@ -1 +1 @@
1
- import{Upload as s}from"@atom-learning/icons";import{createElement as e}from"react";import{Button as f}from"../button/Button.js";import{Icon as c}from"../icon/Icon.js";const t=({accept:o,children:n,multiple:r=!1,onSelect:i,...l})=>{const p=a=>{const{files:m}=a.target;i(m)};return e(f,{as:"label",...l},e(c,{is:s}),n,e("input",{type:"file",onChange:p,accept:o,multiple:r,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
1
+ import{Upload as s}from"@atom-learning/icons";import{createElement as e}from"react";import{Button as f}from"../button/Button.js";import{Icon as c}from"../icon/Icon.js";const t=({accept:o,children:n,multiple:r=!1,onFileSelect:i,...l})=>{const p=a=>{const{files:m}=a.target;i(m)};return e(f,{as:"label",...l},e(c,{is:s}),n,e("input",{type:"file",onChange:p,accept:o,multiple:r,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { UseFormMethods, Mode } from 'react-hook-form';
2
+ import type { Mode, UseFormMethods } from 'react-hook-form';
3
3
  export declare enum StorageEnum {
4
4
  LOCAL = "local",
5
5
  SESSION = "session"
@@ -4,7 +4,7 @@ export { ActionIcon } from './action-icon';
4
4
  export { AlertDialog, useAlert, AlertProvider } from './alert-dialog';
5
5
  export { Box } from './box';
6
6
  export { Button, StyledButton } from './button';
7
- export { Carousel } from './carousel';
7
+ export { Carousel, useCarousel } from './carousel';
8
8
  export { Checkbox } from './checkbox';
9
9
  export { CheckboxField } from './checkbox-field';
10
10
  export { Combobox } from './combobox';
@@ -1 +1 @@
1
- import e from"react";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";import{styled as o}from"../../stitches.js";const l=o(i,{position:"relative"}),a=o(n,{fontFamily:"$body",fontSize:"$sm",flexDirection:"column",justifyContent:"center",position:"absolute",top:"0",right:"0",transform:"translate(calc($sizes$2 / 2), -50%)",borderRadius:"$round",p:"$2",height:"$2",minWidth:"$2",textAlign:"center",color:"#fff",bg:"$primary"}),m=({value:t,children:r})=>e.createElement(l,null,!!t&&e.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
1
+ import e from"react";import{styled as o}from"../../stitches.js";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";const l=o(i,{position:"relative"}),a=o(n,{fontFamily:"$body",fontSize:"$sm",flexDirection:"column",justifyContent:"center",position:"absolute",top:"0",right:"0",transform:"translate(calc($sizes$2 / 2), -50%)",borderRadius:"$round",p:"$2",height:"$2",minWidth:"$2",textAlign:"center",color:"#fff",bg:"$primary"}),m=({value:t,children:r})=>e.createElement(l,null,!!t&&e.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { SliderProps } from '../../components/slider';
3
3
  import { SliderStepsType } from '../../components/slider/SliderSteps';
4
- import { SliderValueType } from '../slider/SliderValue';
5
4
  import type { CSS } from '../../stitches';
5
+ import { SliderValueType } from '../slider/SliderValue';
6
6
  declare type SliderFieldProps = SliderProps & SliderStepsType & SliderValueType & {
7
7
  css?: CSS;
8
8
  label: string;
@@ -1 +1 @@
1
- import{styled as t}from"../../stitches.js";import i from"react";import{TableHeaderCell as r}from"./TableHeaderCell.js";const l=t("thead",{variants:{theme:{primary:{[`${r}`]:{bg:"$primary"}},primaryDark:{[`${r}`]:{bg:"$primaryDark"}}}}}),e=({theme:a="primaryDark",...m})=>i.createElement(l,{theme:a,...m});e.displayName="TableHeader";export{e as TableHeader};
1
+ import t from"react";import{styled as i}from"../../stitches.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";const l=i("thead",{variants:{theme:{primary:{[`${r}`]:{bg:"$primary"}},primaryDark:{[`${r}`]:{bg:"$primaryDark"}}}}}),e=({theme:a="primaryDark",...m})=>t.createElement(l,{theme:a,...m});e.displayName="TableHeader";export{e as TableHeader};
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
- import { TabTrigger } from './TabTrigger';
3
2
  import { TriggerListWrapper } from './TabsTriggerList';
3
+ import { TabTrigger } from './TabTrigger';
4
4
  declare type TabsProps = React.ComponentProps<typeof StyledRoot>;
5
5
  declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {
6
6
  theme?: "dark" | "light" | undefined;
@@ -1 +1 @@
1
- import{Root as m,Content as n}from"@radix-ui/react-tabs";import{createElement as p}from"react";import{styled as t}from"../../stitches.js";import{TabTrigger as s}from"./TabTrigger.js";import{TriggerListWrapper as e}from"./TabsTriggerList.js";import{passPropsToChildren as g}from"./utils.js";const c=t(m,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),i=t(n,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),r=({theme:o="light",children:a,...l})=>p(c,{theme:o,...l},g(a,{theme:o},[e,i]));r.TriggerList=e,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
1
+ import{Root as m,Content as n}from"@radix-ui/react-tabs";import{createElement as p}from"react";import{styled as t}from"../../stitches.js";import{TriggerListWrapper as e}from"./TabsTriggerList.js";import{TabTrigger as s}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const c=t(m,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),i=t(n,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),r=({theme:o="light",children:a,...l})=>p(c,{theme:o,...l},g(a,{theme:o},[e,i]));r.TriggerList=e,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};