@atom-learning/components 1.17.2 → 1.18.1
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 +2 -2
- package/dist/components/accordion/Accordion.d.ts +2 -1
- package/dist/components/accordion/Accordion.js +1 -1
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/alert-dialog/AlertDialog.js +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.js +1 -1
- package/dist/components/alert-dialog/alert-context/AlertContext.js +1 -1
- package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -1
- package/dist/components/alert-dialog/alert-context/reducer.js +1 -1
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/button/Button.js +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/constants.js +1 -1
- package/dist/components/carousel/Carousel.js +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselSlide.d.ts +1 -1
- package/dist/components/carousel/CarouselSlide.js +1 -1
- package/dist/components/carousel/CarouselSlider.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/checkbox-field/CheckboxField.js +1 -1
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/date-field/DateField.js +1 -1
- package/dist/components/date-input/DateInput.js +1 -1
- package/dist/components/date-input/use-date.js +1 -1
- package/dist/components/dialog/Dialog.js +1 -1
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/divider/Divider.d.ts +2 -3
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/empty-state/EmptyState.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.d.ts +1 -1
- package/dist/components/field-wrapper/FieldDescription.js +1 -1
- package/dist/components/field-wrapper/FieldWrapper.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/file-input/FileInput.js +1 -1
- package/dist/components/form/Form.js +1 -1
- package/dist/components/form/Form.types.js +1 -1
- package/dist/components/form/useFieldError.js +1 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/heading/Heading.d.ts +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/image/Image.d.ts +1 -1
- package/dist/components/image/Image.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input-field/InputField.js +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/list/List.d.ts +3 -2
- package/dist/components/list/List.js +1 -1
- package/dist/components/loader/Loader.js +1 -1
- package/dist/components/markdown-content/MarkdownContent.js +1 -1
- package/dist/components/markdown-content/components/MarkdownCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
- package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
- package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
- package/dist/components/markdown-content/components/MarkdownList.js +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
- package/dist/components/password-field/PasswordField.js +1 -1
- package/dist/components/password-input/PasswordInput.js +1 -1
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/progress-bar/ProgressBar.js +1 -1
- package/dist/components/radio-button/RadioButton.js +1 -1
- package/dist/components/radio-button/RadioButtonGroup.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-button-field/RadioField.js +1 -1
- package/dist/components/radio-card/RadioCard.js +1 -1
- package/dist/components/radio-card/RadioCardGroup.js +1 -1
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/select/Select.js +1 -1
- package/dist/components/select-field/SelectField.js +1 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/slider/SliderSteps.js +1 -1
- package/dist/components/slider/SliderValue.js +1 -1
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack/Stack.d.ts +5 -5
- package/dist/components/stack/Stack.js +1 -1
- package/dist/components/stack-content/StackContent.d.ts +1 -1
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/stepper/Stepper.js +1 -1
- package/dist/components/stepper/StepperStepBack.js +1 -1
- package/dist/components/stepper/StepperStepForward.js +1 -1
- package/dist/components/stepper/StepperSteps.js +1 -1
- package/dist/components/stepper/stepper-context/StepperContext.js +1 -1
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/tabs/TabTrigger.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/components/tabs/utils.js +1 -1
- package/dist/components/text/Text.d.ts +3 -3
- package/dist/components/text/Text.js +1 -1
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/textarea-field/TextareaField.js +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.d.ts +534 -0
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -0
- package/dist/components/toggle-group/ToggleGroupItem.d.ts +532 -0
- package/dist/components/toggle-group/ToggleGroupItem.js +1 -0
- package/dist/components/toggle-group/ToggleGroupRoot.d.ts +280 -0
- package/dist/components/toggle-group/ToggleGroupRoot.js +1 -0
- package/dist/components/toggle-group/index.d.ts +1351 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tooltip/TooltipContent.js +1 -1
- package/dist/components/validation-error/ValidationError.js +1 -1
- package/dist/components/video/Video.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/stitches.js +1 -1
- package/dist/utilities/css-wrapper/CSSWrapper.js +1 -1
- package/dist/utilities/style/capsize.js +1 -1
- package/dist/utilities/style/focus-visible-style-block.js +1 -0
- package/dist/utilities/style/keyframe-animations.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
## [1.
|
|
1
|
+
## [1.18.1](https://github.com/Atom-Learning/components/compare/v1.18.0...v1.18.1) (2022-07-11)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* ensure targets are set to retain consistent output ([f809182](https://github.com/Atom-Learning/components/commit/f8091820c2c8a54539beef8b5d37bb9183555c2b))
|
|
7
7
|
|
|
8
8
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
9
9
|
|
|
@@ -270,9 +270,10 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
270
270
|
declare type AccordionProps = React.ComponentProps<typeof StyledRoot> & {
|
|
271
271
|
type: 'single' | 'multiple';
|
|
272
272
|
};
|
|
273
|
-
|
|
273
|
+
declare type AccordionType = React.ForwardRefExoticComponent<AccordionProps> & {
|
|
274
274
|
Item: typeof AccordionItem;
|
|
275
275
|
Content: typeof AccordionContent;
|
|
276
276
|
Trigger: typeof AccordionTrigger;
|
|
277
277
|
};
|
|
278
|
+
export declare const Accordion: AccordionType;
|
|
278
279
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as
|
|
1
|
+
import{Root as c}from"@radix-ui/react-accordion";import r from"react";import{styled as n}from"../../stitches.js";import{AccordionContent as d}from"./AccordionContent.js";import{AccordionItem as f}from"./AccordionItem.js";import{AccordionTrigger as p}from"./AccordionTrigger.js";const l=n(c,{width:"100%"}),o=r.forwardRef(({type:t="single",children:e,...i},m)=>r.createElement(l,{ref:m,type:t,...i},e));o.Item=f,o.Content=d,o.Trigger=p,o.displayName="Accordion";export{o as Accordion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Content as
|
|
1
|
+
import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as e,styled as n}from"../../stitches.js";import{CSSWrapper as c}from"../../utilities/css-wrapper/CSSWrapper.js";const d=e({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),m=e({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),s=n(i,{border:0,width:"100%",bg:"#fff",'&[data-state="open"]':{borderRadius:"0 0 $0 $0"},"@allowMotion":{'&[data-state="open"]':{animation:`${d} 300ms ease-out`},'&[data-state="closed"]':{animation:`${m} 300ms ease-out`}}}),h=({children:o,css:a,...r})=>t.createElement(s,{...r},t.createElement(c,{css:a},o));export{h as AccordionContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Item as
|
|
1
|
+
import{Item as r}from"@radix-ui/react-accordion";import m from"react";import{styled as d}from"../../stitches.js";const l=d(r,{width:"100%",overflow:"hidden","&:not(:last-child)":{mb:"$1"}}),i=({children:e,value:t,...o})=>m.createElement(l,{value:t,...o},e);export{i as AccordionItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronDown as d}from"@atom-learning/icons";import{Trigger as
|
|
1
|
+
import{ChevronDown as d}from"@atom-learning/icons";import{Trigger as f}from"@radix-ui/react-accordion";import{darken as r}from"color2k";import a from"react";import{styled as i,theme as n}from"../../stitches.js";import{Icon as l}from"../icon/Icon.js";const s=(e,t,o,m="#fff")=>({bg:e,color:m,"&[disabled]":{bg:"$tonal100",cursor:"not-allowed",color:"$tonal400"},"&:not([disabled]):hover":{bg:t},"&:not([disabled]):active":{bg:o}}),c=i(l,{transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"},'[data-state="closed"] > &':{transform:"rotate(0deg)"}}),p=i(f,{border:0,py:"$3",px:"$4",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",'&[data-state="open"]':{borderRadius:"$0 $0 0 0"},'&[data-state="closed"]':{borderRadius:"$0"},variants:{theme:{primaryDark:s("$primaryDark",r(n.colors.primaryDark.value,.1),r(n.colors.primaryDark.value,.15)),light:s("#fff",r("#fff",.1),r("#fff",.15),"$tonal600")}}}),g=({theme:e="primaryDark",children:t,...o})=>a.createElement(p,{theme:e,...o},t,a.createElement(c,{is:d}));export{g as AccordionTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{darken as
|
|
1
|
+
import{darken as i}from"color2k";import g from"invariant";import*as n from"react";import{styled as D,theme as o}from"../../stitches.js";import{Icon as m}from"../icon/Icon.js";const c=(e,r,a)=>({bg:"transparent",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{color:"$tonal400",cursor:"not-allowed"}}),l=(e,r,a)=>({bg:e,color:"white","&:not(:disabled):hover, &:not(:disabled):focus":{bg:r,color:"white"},"&:not(:disabled):active":{bg:a},"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"}}),p=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&:not(:disabled):hover, &:not(:disabled):focus":{color:r},"&:not(:disabled):active":{color:a},"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),w=D("button",{alignItems:"center",appearance:"none",bg:"white",border:"unset",borderRadius:"$0",boxSizing:"border-box",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",transition:"all 100ms ease-out",variants:{theme:{neutral:{},primary:{},success:{},warning:{},danger:{}},appearance:{simple:{},outline:{},solid:{}},size:{md:{size:"$3"},lg:{size:"$4"},xl:{size:"$5"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"neutral",appearance:"simple",css:c("$tonal300","$primaryMid","$primaryDark")},{theme:"primary",appearance:"simple",css:c("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"simple",css:c("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"simple",css:c("$success","$successMid","$successDark")},{theme:"warning",appearance:"simple",css:c("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"simple",css:c("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"solid",css:l("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"solid",css:l("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:l("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:l("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"solid",css:l("$danger","$dangerMid","$dangerDark")},{theme:"primary",appearance:"outline",css:p("$primary","$primaryMid","$primaryDark")},{theme:"primaryDark",appearance:"outline",css:p("$primaryDark",i(o.colors.primaryDark.value,.1),i(o.colors.primaryDark.value,.15))},{theme:"success",appearance:"outline",css:p("$success","$successMid","$successDark")},{theme:"warning",appearance:"outline",css:p("$warning","$warningMid","$warningDark")},{theme:"danger",appearance:"outline",css:p("$danger","$dangerMid","$dangerDark")}]}),t=n.forwardRef(({children:e,theme:r="primary",appearance:a="simple",size:u="md",label:h,href:$,disabled:d,...b},k)=>{const y=`A single ${m.displayName} component is permitted as a child of ${t.displayName}`;return g(n.Children.count(e)===1,y),n.createElement(w,{...b,...$?{as:"a",href:d?null:$,onClick:void 0,"aria-disabled":!!d}:{type:"button"},"aria-label":h,theme:r,appearance:a,size:u,ref:k,disabled:d},n.Children.map(e,s=>{if(!n.isValidElement(s))throw new Error(y);return g(s.type===m,`Children of type ${s==null?void 0:s.type} aren't permitted. Only an ${m.displayName} component is allowed in ${t.displayName}`),n.cloneElement(s,{css:{size:["lg","xl"].includes(u)?20:16,...s.props.css?s.props.css:{}}})}))});t.displayName="ActionIcon";export{t as ActionIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as e,Description as r,Title as i,Action as l,Cancel as n,Trigger as m}from"@radix-ui/react-alert-dialog";import
|
|
1
|
+
import{Root as e,Description as r,Title as i,Action as l,Cancel as n,Trigger as m}from"@radix-ui/react-alert-dialog";import*as a from"react";import{styled as c}from"../../stitches.js";import{AlertDialogContent as g}from"./AlertDialogContent.js";const p=c(e,{}),t=o=>a.createElement(p,{...o});t.Description=r,t.Title=i,t.Action=l,t.Cancel=n,t.Content=g,t.Trigger=m,t.displayName="AlertDialog";export{t as AlertDialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Overlay as
|
|
1
|
+
import{Overlay as m,Content as d,Portal as l}from"@radix-ui/react-alert-dialog";import*as t from"react";import{DIALOG_Z_INDEX as e}from"../../constants/dialog.js";import{keyframes as a,styled as n}from"../../stitches.js";import{fadeIn as f,fadeOut as p}from"../../utilities/style/keyframe-animations.js";const o="translate3d(-50%, -50%, 0)",i="translate3d(-50%, 50vh, 0)",c=a({"0%":{transform:i},"100%":{transform:o}}),x=a({"0%":{transform:o},"100%":{transform:i}}),b=n(m,{backgroundColor:"$alpha600",inset:0,position:"fixed",zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${f} 250ms ease-out`},'&[data-state="closed"]':{animation:`${p} 550ms ease-out`}}}),u=n(d,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",p:"$5",position:"fixed",top:"50%",transform:o,"&:focus":{outline:"none"},zIndex:e,"@allowMotion":{'&[data-state="open"]':{animation:`${c} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${x} 550ms cubic-bezier(0.22, 1, 0.36, 1)`}},variants:{size:{sm:{width:"380px"},md:{width:"480px"},lg:{width:"600px"}}}}),h=({size:r="sm",...s})=>t.createElement(l,null,t.createElement(b,null),t.createElement(u,{size:r,...s}));export{h as AlertDialogContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{useIsMountedRef as s}from"../../../utilities/use-is-mounted-ref/index.js";import{Alert as u}from"./AlertDialog.js";import{reducer as a,initialState as d}from"./reducer.js";const n=e.createContext({showAlert:()=>null}),c=({children:r})=>{const[t,o]=e.useReducer(a,d),l=s();return e.createElement(n.Provider,{value:{showAlert:i=>o({payload:i,type:"ADD"})}},Boolean(t.length)&&e.createElement(u,{...t[0],key:t[0].id,onClose:()=>{l.current&&o({payload:t[0].id,type:"REMOVE"})}}),r)},m=()=>{const r=e.useContext(n);if(r===void 0)throw new Error("useAlert must be used within a AlertProvider");return r};export{c as AlertProvider,m as useAlert};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{Button as i}from"../../button/Button.js";import{Heading as p}from"../../heading/Heading.js";import{Stack as f}from"../../stack/Stack.js";import{Text as E}from"../../text/Text.js";import{AlertDialog as t}from"../AlertDialog.js";const u=({title:r,description:o,onAction:n,cancelActionText:c,confirmActionText:m,onClose:a,...s})=>e.createElement(t,{defaultOpen:!0},e.createElement(t.Content,{onEscapeKeyDown:l=>l.preventDefault(),onCloseAutoFocus:a,...s},e.createElement(p,{as:t.Title,size:"sm",css:{mb:"$5"}},r),o&&e.createElement(E,{as:t.Description,css:{mb:"$5"}},o),e.createElement(f,{gap:"2",justify:"end"},c&&e.createElement(i,{appearance:"outline",as:t.Cancel,onClick:()=>n(!1),size:"sm"},c),e.createElement(i,{as:t.Action,onClick:()=>n(!0),size:"sm"},m))));export{u as Alert};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{uid as
|
|
1
|
+
import{uid as a}from"uid";const i=[],d=(r,t)=>{switch(t.type){case"ADD":return[...r,{...t.payload,id:a()}];case"REMOVE":return r.filter(({id:e})=>e!==t.payload);default:return r}};export{i as initialState,d as reducer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{styled as a}from"../../stitches.js";import{Box as n}from"../box/Box.js";import{Flex as c}from"../flex/Flex.js";const l=a(c,{justifyContent:"center",alignItems:"center",borderRadius:"$0",border:"1px solid #FFFFFF",fontFamily:"$body",variants:{theme:{success:{bg:"$successLight",color:"$successDark"},warning:{bg:"$warningLight",color:"$tonal600"},danger:{bg:"$dangerLight",color:"$dangerDark"},neutral:{bg:"$tonal50",color:"$tonal400"},info:{bg:"$primaryLight",color:"$primaryMid"}},size:{xs:{fontSize:"$sm",px:"$3",height:"calc(24px - $space$1)"},sm:{fontSize:"$md",px:"$4",height:"calc(32px - $space$1)"},md:{fontSize:"$md",px:"$4",height:"calc(48px - $space$1)"}}}}),t=({theme:o="info",size:r="sm",children:i,...s})=>e.createElement(l,{role:"status",theme:o,size:r,...s},e.createElement(n,{as:"div",css:{whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis",py:"$0"}},i));t.displayName="Badge";export{t as Badge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{darken as
|
|
1
|
+
import{darken as n,opacify as s}from"color2k";import*as o from"react";import{Box as b}from"../box/Box.js";import{Icon as w}from"../icon/Icon.js";import{Loader as k}from"../loader/Loader.js";import{styled as v,theme as l}from"../../stitches.js";const d=(e,r,a)=>({border:"1px solid",borderColor:"currentColor",color:e,"&[disabled]":{borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{textDecoration:"none",color:r},"&:not([disabled]):active":{color:a}}),i=(e,r,a,t="white")=>({bg:e,color:t,"&[disabled]":{bg:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&:not([disabled]):hover, &:not([disabled]):focus":{bg:r,color:t},"&:not([disabled]):active":{bg:a}}),p=v("button",{alignItems:"center",bg:"unset",border:"unset",borderRadius:"$0",cursor:"pointer",display:"flex",fontFamily:"$body",fontWeight:600,justifyContent:"center",p:"unset",textDecoration:"none",transition:"all 100ms ease-out",whiteSpace:"nowrap",width:"max-content",variants:{theme:{primary:{},secondary:{},success:{},warning:{},danger:{},neutral:{}},appearance:{solid:{},outline:{}},size:{sm:{fontSize:"$sm",lineHeight:1.53,height:"$3",px:"$4"},md:{fontSize:"$md",lineHeight:1.5,height:"$4",px:"$5"},lg:{fontSize:"$lg",lineHeight:1.5,height:"$5",px:"$5"}},isLoading:{true:{cursor:"not-allowed",opacity:.6,pointerEvents:"none"}},fullWidth:{false:{width:"auto"},true:{width:"100%"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"primary",appearance:"solid",css:i("$primary","$primaryMid","$primaryDark")},{theme:"secondary",appearance:"solid",css:i("$primaryDark",n(l.colors.primaryDark.value,.1),n(l.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:i("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:i("$warning","$warningMid","$warningDark","$tonal500")},{theme:"danger",appearance:"solid",css:i("$danger","$dangerMid","$dangerDark")},{theme:"neutral",appearance:"solid",css:i("white",s("white",-.1),s("white",-.25),"$primary")},{theme:"primary",appearance:"outline",css:d("$primary","$primaryMid","$primaryDark")},{theme:"neutral",appearance:"outline",css:d("white",s("white",-.2),s("white",-.35))},{theme:"secondary",appearance:"outline",css:d("$primaryDark",n(l.colors.primaryDark.value,.1),n(l.colors.primaryDark.value,.15))}]}),D=({isLoading:e,children:r})=>o.createElement(o.Fragment,null,o.createElement(k,{css:{opacity:e?1:0,position:"absolute",transition:"opacity 150ms"}}),o.createElement(b,{as:"span",css:e?{opacity:0,transition:"opacity 150ms"}:{}},r)),x=e=>{switch(e){case"lg":return 22;case"md":return 20;case"sm":default:return 16}},m=(e,r)=>o.Children.map(e,(a,t)=>(a==null?void 0:a.type)===w?o.cloneElement(a,{css:{[t===0?"mr":"ml"]:r==="sm"?"$2":"$3",size:x(r),...a.props.css?a.props.css:{}}}):a),u=o.forwardRef(({children:e,isLoading:r,onClick:a,href:t,appearance:h="solid",size:c="md",theme:y="primary",type:$="button",...g},f)=>o.createElement(p,{isLoading:r||!1,onClick:r?void 0:a,appearance:h,size:c,theme:y,...g,...t?{as:"a",href:t,onClick:void 0}:{},...t?{}:{type:$},ref:f},typeof r=="boolean"?o.createElement(D,{isLoading:r},m(e,c)):m(e,c)));u.displayName="Button";export{u as Button,p as StyledButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as
|
|
1
|
+
import{ChevronLeft as S,ChevronRight as B}from"@atom-learning/icons";import{useDayzed as I}from"dayzed";import*as e from"react";import{ActionIcon as h}from"../action-icon/ActionIcon.js";import{Box as g}from"../box/Box.js";import{Flex as y}from"../flex/Flex.js";import{Heading as M}from"../heading/Heading.js";import{Icon as u}from"../icon/Icon.js";import{Text as W}from"../text/Text.js";import{styled as j}from"../../stitches.js";import{monthNamesShort as A,weekdayNamesShort as F}from"./constants.js";import{Day as G}from"./Day.js";const $=j("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),H=(t,r)=>{const s=t.slice(0,r);return t.slice(r).concat(s)},E=({css:t,refDateSelected:r,refDateToday:s,firstDayOfWeek:l=0,monthNames:x=A,weekdayNames:k=F,labels:c={next:"Next month",previous:"Previous month"},...v})=>{const{calendars:a,getBackProps:D,getForwardProps:b,getDateProps:N}=I({firstDayOfWeek:l,showOutsideDays:!0,...v});return a.length?e.createElement(g,{css:{position:"relative",width:"min-content",mt:"-$1",...t}},e.createElement(y,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(h,{label:c.previous,theme:"neutral",size:"lg",...D({calendars:a})},e.createElement(u,{is:S})),e.createElement(h,{label:c.next,theme:"neutral",size:"lg",...b({calendars:a})},e.createElement(u,{is:B}))),a.map(({month:o,year:m,weeks:w})=>e.createElement(g,{key:`${o}${m}`},e.createElement(y,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(M,{size:"xs"},x[o]," ",m)),e.createElement($,{css:{mb:"$3"}},H(k,l).map(n=>e.createElement(W,{as:"span",size:"sm",key:`${o}${m}${n}`,css:{fontWeight:600,textAlign:"center"}},n))),e.createElement($,null,w.map((n,z)=>n.map((i,C)=>{const d=`${o}${m}${z}${C}`;if(!i)return e.createElement("div",{key:d});const{date:O,selected:p,today:f,prevMonth:P,nextMonth:T}=i;return e.createElement(G,{isOutsideMonth:P||T,isSelected:p,isToday:f,key:d,ref:p?r:f?s:null,...N({dateObj:i})},O.getDate())})))))):null};E.displayName="Calendar";export{E as Calendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],
|
|
1
|
+
const e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];export{e as monthNamesShort,a as weekdayNamesShort};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CarouselProvider as s,CarouselContext as
|
|
1
|
+
import{CarouselProvider as s,CarouselContext as m}from"pure-react-carousel";import*as e from"react";import{CarouselArrowNext as u,CarouselArrowPrevious as d}from"./CarouselArrows.js";import{CarouselPagination as n}from"./CarouselPagination.js";import{CarouselSlide as C}from"./CarouselSlide.js";import{CarouselSlider as p}from"./CarouselSlider.js";import{CSSWrapper as S}from"../../utilities/css-wrapper/CSSWrapper.js";const r=({children:o,css:i,slideHeight:t,slideWidth:l,numSlides:a})=>e.createElement(S,{css:i},e.createElement(s,{naturalSlideWidth:l,naturalSlideHeight:t,totalSlides:a},o)),f=()=>e.useContext(m);r.ArrowNext=u,r.ArrowPrevious=d,r.Pagination=n,r.Slide=C,r.Slider=p,r.displayName="Carousel";export{r as Carousel,f as useCarousel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as
|
|
1
|
+
import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as l}from"pure-react-carousel";import*as r from"react";import{Icon as t}from"../icon/Icon.js";import{styled as o}from"../../stitches.js";const n={alignItems:"center",bg:"unset",border:"unset",color:"$primary",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",size:"$5",top:"50%",transform:"translateY(-50%)",transition:"color 0.15s ease-in-out","&:hover":{color:"$primaryMid"},"&:active":{color:"$primaryDark"},"&:disabled":{color:"$tonal100"}},m=o(a,n),c=o(l,n),p=e=>r.createElement(m,{...e},r.createElement(t,{is:s})),u=e=>r.createElement(c,{...e},r.createElement(t,{is:i}));export{u as CarouselArrowNext,p as CarouselArrowPrevious};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const StyledSlide: import("@stitches/react/types/styled-component").StyledComponent<React.ComponentClass<import("pure-react-carousel/typings/carouselElements").SlideProps, any>, {}, {
|
|
2
|
+
declare const StyledSlide: import("@stitches/react/types/styled-component").StyledComponent<React.ComponentClass<import("pure-react-carousel/typings/carouselElements").SlideProps, any> | React.FunctionComponent<import("pure-react-carousel/typings/carouselElements").SlideProps>, {}, {
|
|
3
3
|
sm: string;
|
|
4
4
|
md: string;
|
|
5
5
|
lg: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Slide as
|
|
1
|
+
import{Slide as t}from"pure-react-carousel";import*as e from"react";import{Box as m}from"../box/Box.js";import{styled as i}from"../../stitches.js";const l=i(t,{}),s=({children:o,...r})=>e.createElement(l,{...r,tag:"div"},e.createElement(m,{css:{px:"$3"}},o));export{s as CarouselSlide};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const CarouselSlider: import("@stitches/react/types/styled-component").StyledComponent<import("react").ComponentClass<import("pure-react-carousel/typings/carouselElements").SliderProps, any>, {
|
|
2
|
+
export declare const CarouselSlider: import("@stitches/react/types/styled-component").StyledComponent<import("react").ComponentClass<import("pure-react-carousel/typings/carouselElements").SliderProps, any> | import("react").FunctionComponent<import("pure-react-carousel/typings/carouselElements").SliderProps>, {
|
|
3
3
|
overflow?: boolean | "true" | undefined;
|
|
4
4
|
}, {
|
|
5
5
|
sm: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Minus as
|
|
1
|
+
import{Minus as i,Ok as l}from"@atom-learning/icons";import*as r from"@radix-ui/react-checkbox";import*as o from"react";import{styled as t}from"../../stitches.js";import{Icon as s}from"../icon/Icon.js";const d=t(r.Indicator,{display:"flex",alignItems:"center",justifyContent:"center"}),c=t(r.Root,{appearance:"none",backgroundColor:"transparent",border:"1px solid $colors$tonal400",borderRadius:"3px",color:"white",cursor:"pointer",size:"$1",p:0,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 50ms ease-out",'&[data-state="checked"]':{backgroundColor:"$primary",borderColor:"$primary"},'&[data-state="indeterminate"]':{backgroundColor:"$primary",borderColor:"$primary"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",cursor:"not-allowed",color:"$tonal400"},variants:{state:{error:{borderColor:"$danger"}}}}),a=o.forwardRef((e,n)=>o.createElement(c,{...e,ref:n},o.createElement(d,null,o.createElement(s,{is:e.checked==="indeterminate"?i:l,css:{pointerEvents:"none",position:"absolute",strokeWidth:"3",size:14}}))));a.displayName="Checkbox";export{a as Checkbox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as l from"react";import{useFormContext as s,Controller as h}from"react-hook-form";import{Checkbox as C}from"../checkbox/Checkbox.js";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as k}from"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as F}from"../form/useFieldError.js";var b=(e=>(e.ON="on",e.OFF="off",e))(b||{});const i=({css:e,defaultChecked:r=!1,label:m,name:t,validation:o,description:d,...c})=>{const{control:f}=s(),{error:n}=F(t);return l.createElement(h,{control:f,name:t,defaultValue:r,rules:o,render:({onChange:u,value:a,name:p})=>l.createElement(k,{css:e,description:d,error:n,label:m,required:Boolean(o==null?void 0:o.required)},l.createElement(C,{defaultChecked:r,defaultValue:r?"on":"off",checked:a,name:p,onCheckedChange:u,value:a?"on":"off",...n&&{state:"error"},...c}))})};i.displayName="CheckboxField";export{i as CheckboxField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Combobox as t,ComboboxOptionText as b}from"@reach/combobox";import
|
|
1
|
+
import{Combobox as t,ComboboxOptionText as b}from"@reach/combobox";import*as r from"react";import{globalCss as p,styled as i}from"../../stitches.js";import{ComboboxInput as e}from"./ComboboxInput.js";import{ComboboxList as x}from"./ComboboxList.js";import{ComboboxOption as n}from"./ComboboxOption.js";import{ComboboxPopover as s}from"./ComboboxPopover.js";p({":root":{"--reach-combobox":1}})();const C=i(t,{}),o=m=>r.createElement(C,{...m});o.displayName="Combobox",o.Option=n,o.Input=e,o.Popover=s,o.List=x,o.OptionText=b;export{o as Combobox};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as i from"react";import{useFormContext as f}from"react-hook-form";import{DateInput as u}from"../date-input/DateInput.js";import{FieldWrapper as F}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as g}from"../form/useFieldError.js";const a=({css:m,label:p,name:r,validation:e,prompt:l,description:d,...n})=>{const{register:t,trigger:s}=f(),{error:o}=g(r),c=e?t(e):t;return i.createElement(F,{css:m,description:d,error:o,fieldId:r,label:p,prompt:l,required:Boolean(e==null?void 0:e.required)},i.createElement(u,{id:r,name:r,ref:c,...o&&{state:"error"},...n,revalidate:s}))};a.displayName="DateField";export{a as DateField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CalendarEvent as
|
|
1
|
+
import{CalendarEvent as N}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as z}from"../action-icon/ActionIcon.js";import{Box as A}from"../box/Box.js";import{Calendar as I}from"../calendar/Calendar.js";import{Icon as T}from"../icon/Icon.js";import{Input as k}from"../input/Input.js";import{Popover as n}from"../popover/Popover.js";import{DEFAULT_DATE_FORMAT as x}from"./constants.js";import{useDate as F}from"./use-date.js";const D=e.forwardRef(({initialDate:E,dateFormat:h=x,firstDayOfWeek:g=1,disabled:r,monthNames:v,weekdayNames:b,size:s="md",labels:m={open:"Open calendar",next:"Next month",previous:"Previous month"},revalidate:l,onChange:o,...C},y)=>{const{date:t,dateString:O,setDate:i}=F(E,h),[w,d]=e.useState(!1),p=e.useRef(null),u=e.useRef(null);return e.useEffect(()=>{o==null||o(t)},[t,o]),e.createElement(A,{css:{position:"relative"}},e.createElement(k,{name:"date",disabled:r,size:s,...C,onChange:a=>i(a.target.value,!0),value:O,ref:y}),e.createElement(n,{modal:!0,open:w,onOpenChange:d},e.createElement(n.Trigger,{asChild:!0},e.createElement(z,{css:{position:"absolute",top:0,right:0},disabled:r,label:m.open,size:s==="sm"?"md":"lg",theme:"neutral"},e.createElement(T,{size:"sm",is:N}))),e.createElement(n.Content,{css:{pr:"$sizes$2"},side:"bottom",align:"end",showCloseButton:!1,onOpenAutoFocus:a=>{var c,f;a.preventDefault(),t?(c=u.current)==null||c.focus():(f=p.current)==null||f.focus()}},e.createElement(I,{date:t||new Date,selected:t,onDateSelected:async a=>{d(!1),await i(a.date,!1),l&&l()},refDateToday:p,refDateSelected:u,firstDayOfWeek:g,monthNames:v,weekdayNames:b,labels:m}))))});D.displayName="DateInput";export{D as DateInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"dayjs";import
|
|
1
|
+
import t from"dayjs";import p from"dayjs/plugin/customParseFormat";import{useState as i}from"react";import{DEFAULT_DATE_FORMAT as s}from"./constants.js";t.extend(p);const u=(o,e=s)=>{const[d,f]=i(o?t(o).toDate():void 0),[D,n]=i(o?t(o).format(e):"");return{dateString:D,date:d,setDate:(r,a=!1)=>{const m=a?t(r,e):t(r);f(m.isValid()?m.toDate():void 0),n(a?r:m.format(e))}}};export{u as useDate};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as t,Description as i,Title as e,Trigger as
|
|
1
|
+
import{Root as t,Description as i,Title as e,Trigger as m}from"@radix-ui/react-dialog";import*as l from"react";import{styled as a}from"../../stitches.js";import{DialogClose as g}from"./DialogClose.js";import{DialogContent as n}from"./DialogContent.js";import{DialogBackground as p}from"./DialogBackground.js";const s=a(t,{}),o=r=>l.createElement(s,{...r});o.Background=p,o.Close=g,o.Content=n,o.Description=i,o.Title=e,o.Trigger=m,o.displayName="Dialog";export{o as Dialog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Close as
|
|
1
|
+
import{Close as h}from"@atom-learning/icons";import{Overlay as x,Content as b,Portal as g,Close as w}from"@radix-ui/react-dialog";import*as o from"react";import{DIALOG_Z_INDEX as r}from"../../constants/dialog.js";import{keyframes as n,styled as l}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as $}from"../icon/Icon.js";import{DialogBackground as s}from"./DialogBackground.js";import{fadeIn as z,fadeOut as C}from"../../utilities/style/keyframe-animations.js";const e="translate3d(-50%, -50%, 0)",m="translate3d(-50%, 50vh, 0)",d="modal_overlay",D=n({"0%":{transform:m},"100%":{transform:e}}),I=n({"0%":{transform:e},"100%":{transform:m}}),y=l(x,{backgroundColor:"$alpha600",inset:0,position:"fixed",overflowY:"auto",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${z} 250ms ease-out`},'&[data-state="closed"]':{animation:`${C} 550ms ease-out`}}}),E=l(b,{bg:"white",borderRadius:"$1",boxShadow:"$3",boxSizing:"border-box",left:"50%",maxWidth:"90vw",maxHeight:"90vh",overflowY:"auto",p:"$5",position:"fixed",top:"50%",transform:e,zIndex:r,"&:focus":{outline:"none"},"@allowMotion":{'&[data-state="open"]':{animation:`${D} 550ms cubic-bezier(0.22, 1, 0.36, 1)`},'&[data-state="closed"]':{animation:`${I} 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"}}}}),O=({size:p="sm",children:a,closeDialogText:f="Close dialog",showCloseButton:c=!0,...u})=>o.createElement(g,null,o.createElement(y,{id:d},o.Children.map(a,t=>(t==null?void 0:t.type)===s&&t),o.createElement(E,{size:p,"aria-label":"Dialog",onPointerDownOutside:t=>{const i=t.target;(i==null?void 0:i.id)!==d&&t.preventDefault()},...u},c&&o.createElement(v,{as:w,css:{position:"absolute",right:"$4",top:"$4"},label:f,size:"lg",theme:"neutral"},o.createElement($,{is:h})),o.Children.map(a,t=>(t==null?void 0:t.type)!==s&&t))));export{O as DialogContent};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const StyledDivider: import("@stitches/react/types/styled-component").StyledComponent<"hr", {
|
|
2
|
+
export declare const StyledDivider: import("@stitches/react/types/styled-component").StyledComponent<"hr", {
|
|
3
3
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
4
4
|
}, {
|
|
5
5
|
sm: string;
|
|
@@ -266,5 +266,4 @@ declare const StyledDivider: import("@stitches/react/types/styled-component").St
|
|
|
266
266
|
};
|
|
267
267
|
};
|
|
268
268
|
}>>;
|
|
269
|
-
export declare const Divider: React.
|
|
270
|
-
export {};
|
|
269
|
+
export declare const Divider: React.ForwardRefExoticComponent<React.ComponentProps<typeof StyledDivider>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from"react";import{styled as n}from"../../stitches.js";const i=n("hr",{border:0,bg:"$tonal200",variants:{orientation:{horizontal:{height:1,width:"100%"},vertical:{height:"100%",width:1,minHeight:"$3"}}}}),a=t.forwardRef(({orientation:e="horizontal",...r},o)=>t.createElement(i,{ref:o,orientation:e,...r}));export{a as Divider,i as StyledDivider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as t}from"@radix-ui/react-dropdown-menu";import e from"react";import{styled as m}from"../../stitches.js";import{DropdownMenuContent as n}from"./DropdownMenuContent.js";import{DropdownMenuItem as p}from"./DropdownMenuItem.js";import{DropdownMenuLinkItem as i}from"./DropdownMenuLinkItem.js";import{DropdownMenuSeparator as
|
|
1
|
+
import{Root as t}from"@radix-ui/react-dropdown-menu";import e from"react";import{styled as m}from"../../stitches.js";import{DropdownMenuContent as n}from"./DropdownMenuContent.js";import{DropdownMenuItem as p}from"./DropdownMenuItem.js";import{DropdownMenuLinkItem as i}from"./DropdownMenuLinkItem.js";import{DropdownMenuSeparator as d}from"./DropdownMenuSeparator.js";import{DropdownMenuTrigger as f}from"./DropdownMenuTrigger.js";const u=m(t,{}),o=r=>e.createElement(u,{...r});o.Content=n,o.Item=p,o.LinkItem=i,o.Separator=d,o.Trigger=f;export{o as DropdownMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Item as e}from"@radix-ui/react-dropdown-menu";import{styled as t}from"../../stitches.js";const o={alignItems:"center",color:"$tonal600",cursor:"pointer",display:"flex",fontFamily:"$body",fontWeight:400,position:"relative",px:"$3",py:"$2","&[data-disabled]":{color:"$tonal200",pointerEvents:"none"},'&[aria-current="page"], &:focus':{"&::before":{borderLeft:"2px solid currentColor",content:"",height:"$2",left:0,outline:"none",position:"absolute",transform:"scale(1)"}},"&:focus":{color:"$primaryMid",outline:"none"},"&:hover":{textDecoration:"underline"}},
|
|
1
|
+
import{Item as e}from"@radix-ui/react-dropdown-menu";import{styled as t}from"../../stitches.js";const o={alignItems:"center",color:"$tonal600",cursor:"pointer",display:"flex",fontFamily:"$body",fontWeight:400,position:"relative",px:"$3",py:"$2","&[data-disabled]":{color:"$tonal200",pointerEvents:"none"},'&[aria-current="page"], &:focus':{"&::before":{borderLeft:"2px solid currentColor",content:"",height:"$2",left:0,outline:"none",position:"absolute",transform:"scale(1)"}},"&:focus":{color:"$primaryMid",outline:"none"},"&:hover":{textDecoration:"underline"}},r=t(e,o);export{r as DropdownMenuItem,o as itemStyles};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{styled as
|
|
1
|
+
import e from"react";import{styled as n}from"../../stitches.js";import{DropdownMenuItem as m}from"./DropdownMenuItem.js";const i=n("a",{textDecoration:"none"}),l=({children:t,href:o,...r})=>e.createElement(m,{...r,asChild:!0},e.createElement(i,{href:o,role:"menuitem"},t));export{l as DropdownMenuLinkItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as m from"react";import{Flex as a}from"../flex/Flex.js";import{styled as n}from"../../stitches.js";import{EmptyStateBody as p}from"./EmptyStateBody.js";import{EmptyStateImage as o}from"./EmptyStateImage.js";import{EmptyStateTitle as r}from"./EmptyStateTitle.js";const y=n(a,{flexDirection:"column",alignItems:"center",textAlign:"center","& > *:last-child":{mb:0},variants:{size:{xs:{p:"$2"},sm:{p:"$3"},md:{p:"$4"},lg:{p:"$5"},xl:{p:"$6"}}}}),t=({size:i="sm",children:l,...s})=>m.createElement(y,{size:i,...s},m.Children.map(l,e=>m.isValidElement(e)&&(e.type===o||e.type===r||e.type===p)?m.cloneElement(e,{...e.props,size:i}):e));t.displayName="EmptyState",t.Image=o,t.Title=r,t.Body=p;export{t as EmptyState};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const EmptyStateBody: import("@stitches/react/types/styled-component").StyledComponent<import("react").
|
|
2
|
+
export declare const EmptyStateBody: import("@stitches/react/types/styled-component").StyledComponent<import("react").ForwardRefExoticComponent<Omit<Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "key" | keyof import("react").HTMLAttributes<HTMLParagraphElement>> & {
|
|
3
3
|
ref?: ((instance: HTMLParagraphElement | null) => void) | import("react").RefObject<HTMLParagraphElement> | null | undefined;
|
|
4
4
|
}, "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
5
5
|
size?: ("sm" | "md" | "lg" | "xl" | "xs") | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as t from"react";import{Text as r}from"../text/Text.js";const s=({children:e,css:o})=>t.createElement(r,{size:"sm",css:{color:"$tonal300",maxWidth:"80ch",...o}},e);export{s as Description};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{Box as p}from"../box/Box.js";import{Flex as c}from"../flex/Flex.js";import{Label as d}from"../label/Label.js";import{Link as f}from"../link/Link.js";import{ValidationError as E}from"../validation-error/ValidationError.js";import{Description as b}from"./FieldDescription.js";const o=({css:i,children:l,error:t,fieldId:s,label:a,prompt:r,description:m,required:n})=>e.createElement(p,{css:i},e.createElement(c,{css:{justifyContent:"space-between",alignItems:"center",mb:"$3"}},e.createElement(d,{htmlFor:s,required:n},a),r&&e.createElement(f,{href:r.link,size:"sm"},r.label)),m&&e.createElement(b,{css:{mb:"$3"}},m),l,t&&e.createElement(E,{css:{mt:"$2"}},t));o.displayName="FieldWrapper";export{o as FieldWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{Box as m}from"../box/Box.js";import{Checkbox as d}from"../checkbox/Checkbox.js";import{Label as $}from"../label/Label.js";import{RadioButton as f}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{ValidationError as E}from"../validation-error/ValidationError.js";import{Description as u}from"./FieldDescription.js";const l=({align:n="start",children:a,css:s,description:i,direction:t="row",error:o,label:p,required:c})=>e.createElement(m,{css:s},e.createElement($,{align:n,direction:t,required:c,type:"inline"},e.Children.map(a,r=>e.createElement(m,{css:{[t==="reverse"?"ml":"mr"]:"$3",...((r==null?void 0:r.type)===d||(r==null?void 0:r.type)===f)&&{transform:"translateY($space$1)"}}},r)),p),o&&e.createElement(E,{css:{mt:"$2"}},o),i&&e.createElement(u,{css:{mt:"$2",[t==="reverse"?"mr":"ml"]:"calc($space$3 + $sizes$1)"}},i));l.displayName="InlineFieldWrapper";export{l as InlineFieldWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Upload as
|
|
1
|
+
import{Upload as c}from"@atom-learning/icons";import*as e from"react";import{Button as s}from"../button/Button.js";import{Icon as u}from"../icon/Icon.js";const t=({accept:l,children:i,multiple:n=!1,onFileSelect:o,...r})=>{const p=a=>{const{files:m}=a.target;o(m)};return e.createElement(s,{as:"label",...r},e.createElement(u,{is:c}),i,e.createElement("input",{type:"file",onChange:p,accept:l,multiple:n,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import w from"invariant";import*as m from"react";import{useForm as S,FormProvider as E}from"react-hook-form";import g from"react-hook-form-persist";import{styled as F}from"../../stitches.js";import{StorageEnum as V}from"./Form.types.js";const v=F("form",{}),x=({persist:r,watch:o,setValue:n,children:l})=>{const{id:i,...e}=r;let t={...e,storage:e.storage===V.LOCAL?window.localStorage:window.sessionStorage};if(e.exclude){const{exclude:h,...a}=t,u=o(),c=Object.keys(u).filter(s=>{var d;if(!((d=e.exclude)!=null&&d.includes(s)))return s});t={...a,include:c}}return g(i,{watch:o,setValue:n},t),l},b=({formMethods:r,handleSubmit:o,onSubmit:n,onError:l,children:i,...e})=>m.createElement(E,{...r},m.createElement(v,{"aria-label":"form",...e,onSubmit:o(n,l)},i)),p=({children:r,defaultValues:o={},onSubmit:n,onError:l,validationMode:i="onBlur",render:e,persist:t,...h})=>{w(!(r&&e),"`Form` should only be given one of `children` or `render`. When both are provided, `render` will be used and `children` will be ignored.");const a=S({defaultValues:o,mode:i}),{handleSubmit:u,watch:c,setValue:s}=a,d=e?e(a):r,f={formMethods:a,handleSubmit:u,onSubmit:n,onError:l,...h};return t?m.createElement(x,{persist:t,watch:c,setValue:s},m.createElement(b,{...f},d)):m.createElement(b,{...f},d)};p.displayName="Form";export{p as Form};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var S=(o=>(o.LOCAL="local",o.SESSION="session",o))(S||{});export{S as StorageEnum};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import s from"dlv";import{useFormContext as
|
|
1
|
+
import s from"dlv";import{useFormContext as i}from"react-hook-form";const l=o=>{var r;const{errors:e}=i(),t=o.split(/[,[\].]+?/).filter(Boolean);return{error:(r=(()=>s(e,t))())==null?void 0:r.message}};export{l as useFieldError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as p from"react";import{theme as r,styled as d}from"../../stitches.js";const c=Object.keys(r.space).reduce((a,e)=>({...a,[e]:{gap:`$space$${e}`}}),{}),o=d("div",{display:"grid",variants:{gap:c}}),i=({css:a,gap:e=2,minItemSize:t,maxItemSize:m="1fr",...s})=>p.createElement(o,{css:{...t&&{gridTemplateColumns:`repeat(auto-fit, minmax(${t}, ${m}))`},...a},gap:e,...s});i.displayName="Grid";export{i as Grid};
|
|
@@ -270,4 +270,4 @@ export declare const StyledHeading: import("@stitches/react/types/styled-compone
|
|
|
270
270
|
export declare type HeadingProps = Override<React.ComponentPropsWithoutRef<typeof StyledHeading>, {
|
|
271
271
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | React.ComponentType | React.ElementType;
|
|
272
272
|
}>;
|
|
273
|
-
export declare const Heading: React.
|
|
273
|
+
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as i from"react";import{styled as a}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const t=a("h2",{color:"$tonal600",fontFamily:"$display",fontWeight:700,m:0,variants:{size:{xs:{fontFamily:"$body",fontWeight:600,fontSize:"$md",lineHeight:1.5,...e(.3864)},sm:{fontSize:"$lg",lineHeight:1.14,...e(.2174,.2254)},md:{fontSize:"$xl",lineHeight:1.14,...e(.2174,.2254)},lg:{fontSize:"$2xl",lineHeight:1.08,...e(.1865,.1945)},xl:{fontSize:"$3xl",lineHeight:1.12,...e(.206,.214)},xxl:{fontSize:"$4xl",lineHeight:1.06,...e(.1793,.1873)}}}}),l=i.forwardRef(({size:n="md",...o},f)=>i.createElement(t,{ref:f,size:n,...o}));l.displayName="Heading";export{l as Heading,t as StyledHeading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{styled as n}from"../../stitches.js";const i=n("svg",{display:"inline-block",fill:"none",stroke:"currentcolor",strokeLinecap:"round",strokeLinejoin:"round",verticalAlign:"middle",variants:{size:{sm:{size:"$1",strokeWidth:"1.75"},md:{size:"$2",strokeWidth:"2"},lg:{size:"$3",strokeWidth:"2"}}}}),d=e.forwardRef(({is:r,size:o="md",...s},t)=>e.createElement(i,{size:o,"aria-hidden":"true",...s,as:r,ref:t}));export{d as Icon,i as StyledIcon};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Override } from '../../utilities/types';
|
|
3
|
-
declare const StyledImage: import("@stitches/react/types/styled-component").StyledComponent<"img", {}, {
|
|
3
|
+
export declare const StyledImage: import("@stitches/react/types/styled-component").StyledComponent<"img", {}, {
|
|
4
4
|
sm: string;
|
|
5
5
|
md: string;
|
|
6
6
|
lg: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as e}from"../../stitches.js";const t=e("img",{verticalAlign:"middle",maxWidth:"100%","&[width]":{width:"auto"},"&[width][height]":{height:"auto"},'&[src$=".svg"]':{width:"100%",height:"auto",maxWidth:"none"}}),i=t;i.displayName="Image";export{i as Image,t as StyledImage};
|
|
@@ -53,6 +53,7 @@ export { Text } from './text';
|
|
|
53
53
|
export { Textarea } from './textarea';
|
|
54
54
|
export { TextareaField } from './textarea-field';
|
|
55
55
|
export { ToastProvider, toast } from './toast';
|
|
56
|
+
export { ToggleGroup } from './toggle-group';
|
|
56
57
|
export { Tooltip } from './tooltip';
|
|
57
58
|
export { ValidationError } from './validation-error';
|
|
58
59
|
export { Video } from './video';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as o from"react";import{styled as l}from"../../stitches.js";const n=l("input",{appearance:"none",border:"1px solid $tonal400",borderRadius:"$0",boxShadow:"none",boxSizing:"border-box",color:"$tonal600",cursor:"text",display:"block",fontFamily:"$body",px:"$3",transition:"all 100ms ease-out",width:"100%","&:focus":{borderColor:"$primary",outline:"none"},"&[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},"&::placeholder":{color:"$tonal300",opacity:1},variants:{size:{sm:{height:"$3",fontSize:"$sm"},md:{height:"$4",fontSize:"$md"}},state:{error:{border:"1px solid $danger"}}}}),i=o.forwardRef(({type:e="text",size:t="md",...r},a)=>e==="number"?o.createElement(n,{type:"text",inputMode:"numeric",pattern:"[0-9]*",size:t,...r,ref:a}):o.createElement(n,{type:e,size:t,...r,ref:a}));i.displayName="Input";export{i as Input};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as i from"react";import{useFormContext as u}from"react-hook-form";import{FieldWrapper as c}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as f}from"../form/useFieldError.js";import{Input as F}from"../input/Input.js";const p=({css:m,label:l,name:r,validation:e,prompt:n,description:d,...a})=>{const{register:o}=u(),{error:t}=f(r),s=e?o(e):o;return i.createElement(c,{css:m,description:d,error:t,fieldId:r,label:l,prompt:n,required:Boolean(e==null?void 0:e.required)},i.createElement(F,{id:r,name:r,ref:s,...t&&{state:"error"},...a}))};p.displayName="InputField";export{p as InputField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{styled as t}from"../../stitches.js";import{textVariantSize as d}from"../text/Text.js";const{sm:p,md:y}=d(),f=t("label",{color:"$tonal500",fontFamily:"$body",m:0,variants:{size:{sm:p,md:y},type:{block:{display:"block",fontWeight:600},inline:{display:"flex",fontWeight:400,maxWidth:"max-content"}},align:{start:{},center:{}},direction:{reverse:{},row:{}}},compoundVariants:[{type:"inline",align:"start",css:{alignItems:"flex-start"}},{type:"inline",align:"center",css:{alignItems:"center"}},{type:"inline",direction:"reverse",css:{flexDirection:"row-reverse"}},{type:"inline",direction:"row",css:{flexDirection:"row"}}]}),g=t("span",{color:"$danger",ml:"$1",fontWeight:400}),i=({align:n="start",as:r="label",direction:a="row",size:l="md",type:o="block",children:s,required:c,...m})=>e.createElement(f,{as:r,size:l,type:o,align:n,direction:a,...m},s,c&&e.createElement(g,{"aria-hidden":!0},"*"));i.displayName="Label";export{i as Label};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{styled as f}from"../../stitches.js";import{StyledHeading as l}from"../heading/Heading.js";import{StyledLi as s}from"../list/List.js";import{StyledText as c,textVariantSize as d}from"../text/Text.js";const r=f("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${c} > &, ${l} > &, ${s} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:{size:d()}}),a=e.forwardRef(({size:t="md",onClick:m,href:o,...i},n)=>o?e.createElement(r,{size:t,...i,ref:n,href:o}):e.createElement(r,{as:"button",size:t,...i,ref:n,onClick:m}));a.displayName="Link";export{a as Link,r as StyledLink};
|
|
@@ -264,7 +264,7 @@ export declare const StyledLi: import("@stitches/react/types/styled-component").
|
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
266
|
}>>;
|
|
267
|
-
declare const StyledList: import("@stitches/react/types/styled-component").StyledComponent<"ul", {
|
|
267
|
+
export declare const StyledList: import("@stitches/react/types/styled-component").StyledComponent<"ul", {
|
|
268
268
|
size?: ("sm" | "md" | "lg" | "xl" | "xs") | undefined;
|
|
269
269
|
as?: "ol" | "ul" | undefined;
|
|
270
270
|
}, {
|
|
@@ -535,7 +535,8 @@ declare const StyledList: import("@stitches/react/types/styled-component").Style
|
|
|
535
535
|
declare type ListProps = React.ComponentProps<typeof StyledList> & {
|
|
536
536
|
ordered?: boolean;
|
|
537
537
|
};
|
|
538
|
-
|
|
538
|
+
declare type ListType = React.ForwardRefExoticComponent<ListProps> & {
|
|
539
539
|
Item: typeof StyledLi;
|
|
540
540
|
};
|
|
541
|
+
export declare const List: ListType;
|
|
541
542
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as e from"react";import{styled as l}from"../../stitches.js";import{textVariantSize as d}from"../text/Text.js";const t=l("li",{}),i=l("ul",{fontFamily:"$body",m:"unset",p:"unset",[`& > ${t}`]:{"&:not(:last-child)":{mb:"$2"},"&:last-child":{mb:0}},variants:{size:d({applyCapsize:!1}),as:{ol:{pl:"$4",listStyle:"decimal",[`& > ${t}`]:{pl:"$1","&::marker":{fontSize:"$sm",fontWeight:"bold"}}},ul:{pl:"$3",[`& > ${t}`]:{pl:"$2","&::marker":{content:"\u2022",fontWeight:"bold"}}}}}}),o=e.forwardRef(({size:r="md",ordered:s,...a},m)=>e.createElement(i,{ref:m,as:s?"ol":"ul",size:r,...a}));o.Item=t;export{o as List,t as StyledLi,i as StyledList};
|