@atom-learning/components 2.2.0 → 2.3.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 +7 -0
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/alert-dialog/AlertDialogContent.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/carousel/CarouselArrows.js +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/chip/Chip.d.ts +1898 -0
- package/dist/components/chip/Chip.js +1 -0
- package/dist/components/chip/ChipGroup.d.ts +7 -0
- package/dist/components/chip/ChipGroup.js +1 -0
- package/dist/components/chip/index.d.ts +2 -0
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.d.ts +553 -0
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.js +1 -0
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.d.ts +6 -0
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +1 -0
- package/dist/components/chip-dismissible-group/index.d.ts +7 -0
- package/dist/components/chip-dismissible-group/index.js +1 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.d.ts +551 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.js +1 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupRoot.d.ts +563 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupRoot.js +1 -0
- package/dist/components/chip-toggle-group/index.d.ts +7 -0
- package/dist/components/chip-toggle-group/index.js +1 -0
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/dismissible/DismissibleRoot.d.ts +17 -0
- package/dist/components/dismissible/DismissibleRoot.js +1 -0
- package/dist/components/dismissible/DismissibleTrigger.d.ts +5 -0
- package/dist/components/dismissible/DismissibleTrigger.js +1 -0
- package/dist/components/dismissible/index.d.ts +7 -0
- package/dist/components/dismissible/index.js +1 -0
- package/dist/components/dismissible-group/DismissibleGroupItem.d.ts +6 -0
- package/dist/components/dismissible-group/DismissibleGroupItem.js +1 -0
- package/dist/components/dismissible-group/DismissibleGroupRoot.d.ts +15 -0
- package/dist/components/dismissible-group/DismissibleGroupRoot.js +1 -0
- package/dist/components/dismissible-group/index.d.ts +9 -0
- package/dist/components/dismissible-group/index.js +1 -0
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +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/grid/Grid.js +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/inline-message/InlineMessage.js +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.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/MarkdownLink.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/navigation/NavigationMenu.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdown.js +1 -1
- package/dist/components/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-card/RadioCardGroup.js +1 -1
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack/Stack.d.ts +2 -1
- package/dist/components/stack/Stack.js +1 -1
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/stepper/StepperStepForward.js +1 -1
- package/dist/components/stepper/StepperSteps.js +1 -1
- package/dist/components/switch/Switch.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/utils.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.js +1 -1
- package/dist/components/top-bar/TopBar.d.ts +17 -0
- package/dist/components/top-bar/TopBar.js +1 -0
- package/dist/components/top-bar/TopBarActionIcon.d.ts +8 -0
- package/dist/components/top-bar/TopBarActionIcon.js +1 -0
- package/dist/components/top-bar/TopBarBrand.d.ts +814 -0
- package/dist/components/top-bar/TopBarBrand.js +1 -0
- package/dist/components/top-bar/index.d.ts +1 -0
- package/dist/constants/zIndices.d.ts +3 -0
- package/dist/constants/zIndices.js +1 -0
- package/dist/docgen.json +1 -1
- package/dist/docs/Chip.mdx +118 -0
- package/dist/docs/ChipDismissibleGroup.mdx +33 -0
- package/dist/docs/ChipToggleGroup.mdx +27 -0
- package/dist/docs/Dismissible.mdx +48 -0
- package/dist/docs/DismissibleGroup.mdx +29 -0
- package/dist/docs/TopBar.mdx +59 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.js +1 -1
- package/dist/utilities/hooks/useCallbackRef.js +1 -1
- package/dist/utilities/hooks/useScrollPosition.d.ts +4 -0
- package/dist/utilities/hooks/useScrollPosition.js +1 -0
- package/dist/utilities/override-stitches-variant-value/overrideStitchesVariantValue.d.ts +1 -0
- package/dist/utilities/override-stitches-variant-value/overrideStitchesVariantValue.js +1 -0
- package/package.json +2 -1
- package/dist/constants/dialog.d.ts +0 -1
- package/dist/constants/dialog.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dismissible } from '../../components/dismissible';
|
|
3
|
+
export declare type TDismissibleGroupItemProps = React.ComponentProps<typeof Dismissible> & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const DismissibleGroupItem: React.FC<TDismissibleGroupItemProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as i from"react";import{DismissibleGroupContext as n}from"./DismissibleGroupRoot.js";import{Dismissible as l}from"../dismissible/index.js";const b=({children:e,disabled:o=!1,...r})=>{const s=i.useContext(n);if(s===void 0)throw new Error("DismissibleGroup.Item can only be used within a DismissibleGroup");const{onDismiss:t,disabled:m}=s;return i.createElement(l,{disabled:m||o,onDismiss:t,...r},e)};export{b as DismissibleGroupItem};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IDismissibleGroupContext {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
onDismiss: (value: React.ReactText) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const DismissibleGroupContext: React.Context<IDismissibleGroupContext>;
|
|
7
|
+
export interface IDismissibleGroupProps {
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onDismiss: (value: React.ReactText) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const DismissibleGroupProvider: React.FC<IDismissibleGroupProps>;
|
|
12
|
+
export interface IDismissibleGroupRootProps extends IDismissibleGroupProps {
|
|
13
|
+
as?: React.ComponentType;
|
|
14
|
+
}
|
|
15
|
+
export declare const DismissibleGroupRoot: React.FC<IDismissibleGroupRootProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as s from"react";const t=s.createContext({onDismiss:()=>null}),n=({children:o,disabled:e,onDismiss:i})=>{const r=s.useMemo(()=>({disabled:e,onDismiss:i}),[e,i]);return s.createElement(t.Provider,{value:r},o)},l=({as:o="div",disabled:e,onDismiss:i,...r})=>s.createElement(n,{disabled:e,onDismiss:i},s.createElement(o,{...r}));export{t as DismissibleGroupContext,n as DismissibleGroupProvider,l as DismissibleGroupRoot};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DismissibleGroupItem } from './DismissibleGroupItem';
|
|
2
|
+
import { DismissibleGroupRoot } from './DismissibleGroupRoot';
|
|
3
|
+
import { DismissibleTrigger } from '../../components/dismissible/DismissibleTrigger';
|
|
4
|
+
declare type TDismissibleGroup = typeof DismissibleGroupRoot & {
|
|
5
|
+
Item: typeof DismissibleGroupItem;
|
|
6
|
+
Trigger: typeof DismissibleTrigger;
|
|
7
|
+
};
|
|
8
|
+
export declare const DismissibleGroup: TDismissibleGroup;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DismissibleGroupItem as s}from"./DismissibleGroupItem.js";import{DismissibleGroupRoot as r}from"./DismissibleGroupRoot.js";import{DismissibleTrigger as m}from"../dismissible/DismissibleTrigger.js";const i=r;i.Item=s,i.Trigger=m,i.displayName="DismissibleGroup";export{i as DismissibleGroup};
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
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:r="horizontal",...e},o)=>t.createElement(i,{ref:o,orientation:r,...e}));export{a as Divider,i as StyledDivider};
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
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:o,href:t,...r})=>e.createElement(m,{...r,asChild:!0},e.createElement(i,{href:t,role:"menuitem"},o));export{l as DropdownMenuLinkItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"react";import{Text as r}from"../text/Text.js";const s=({children:o,css:t})=>e.createElement(r,{size:"sm",css:{color:"$tonal300",maxWidth:"80ch",...t}},o);export{s as Description};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Box as a}from"../box/Box.js";import{Flex as c}from"../flex/Flex.js";import{Label as f}from"../label/Label.js";import{Link as d}from"../link/Link.js";import{InlineMessage as b}from"../inline-message/InlineMessage.js";import{Description as E}from"./FieldDescription.js";const
|
|
1
|
+
import*as e from"react";import{Box as a}from"../box/Box.js";import{Flex as c}from"../flex/Flex.js";import{Label as f}from"../label/Label.js";import{Link as d}from"../link/Link.js";import{InlineMessage as b}from"../inline-message/InlineMessage.js";import{Description as E}from"./FieldDescription.js";const o=({css:i,children:l,error:t,fieldId:s,label:n,prompt:r,description:m,required:p})=>e.createElement(a,{css:i},e.createElement(c,{css:{justifyContent:"space-between",alignItems:"center",mb:"$3"}},e.createElement(f,{htmlFor:s,required:p},n),r&&e.createElement(d,{href:r.link,size:"sm"},r.label)),m&&e.createElement(E,{css:{mb:"$3"}},m),l,t&&e.createElement(b,{css:{mt:"$2"}},t));o.displayName="FieldWrapper";export{o as FieldWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Box as
|
|
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 f}from"../label/Label.js";import{RadioButton as $}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{InlineMessage as u}from"../inline-message/InlineMessage.js";import{Description as E}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(f,{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)===$)&&{transform:"translateY($space$1)"}}},r)),p),o&&e.createElement(u,{css:{mt:"$2"}},o),i&&e.createElement(E,{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 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:
|
|
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:o,multiple:i=!1,onFileSelect:n,...r})=>{const p=a=>{const{files:m}=a.target;n(m)};return e.createElement(s,{as:"label",...r},e.createElement(u,{is:c}),o,e.createElement("input",{type:"file",onChange:p,accept:l,multiple:i,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as p from"react";import{theme as r,styled as d}from"../../stitches.js";const
|
|
1
|
+
import*as p from"react";import{theme as r,styled as d}from"../../stitches.js";const o=Object.keys(r.space).reduce((a,e)=>({...a,[e]:{gap:`$space$${e}`}}),{}),c=d("div",{display:"grid",variants:{gap:o}}),i=({css:a,gap:e=2,minItemSize:t,maxItemSize:m="1fr",...s})=>p.createElement(c,{css:{...t&&{gridTemplateColumns:`repeat(auto-fit, minmax(${t}, ${m}))`},...a},gap:e,...s});i.displayName="Grid";export{i as Grid};
|
|
@@ -1 +1 @@
|
|
|
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)}}}}),
|
|
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)}}}}),o=i.forwardRef(({size:l="md",...n},f)=>i.createElement(t,{ref:f,size:l,...n}));o.displayName="Heading";export{o as Heading,t as StyledHeading};
|
|
@@ -9,10 +9,15 @@ export { Button, StyledButton } from './button';
|
|
|
9
9
|
export { Carousel, useCarousel } from './carousel';
|
|
10
10
|
export { Checkbox } from './checkbox';
|
|
11
11
|
export { CheckboxField } from './checkbox-field';
|
|
12
|
+
export { Chip, ChipGroup } from './chip';
|
|
13
|
+
export { ChipDismissibleGroup } from './chip-dismissible-group';
|
|
14
|
+
export { ChipToggleGroup } from './chip-toggle-group';
|
|
12
15
|
export { Combobox } from './combobox';
|
|
13
16
|
export { Dialog } from './dialog';
|
|
14
17
|
export { DateInput } from './date-input';
|
|
15
18
|
export { DateField } from './date-field';
|
|
19
|
+
export { Dismissible } from './dismissible';
|
|
20
|
+
export { DismissibleGroup } from './dismissible-group';
|
|
16
21
|
export { Divider } from './divider';
|
|
17
22
|
export { DropdownMenu } from './dropdown-menu';
|
|
18
23
|
export { FieldWrapper, InlineFieldWrapper } from './field-wrapper';
|
|
@@ -31,6 +36,7 @@ export { Link, StyledLink } from './link';
|
|
|
31
36
|
export { List } from './list';
|
|
32
37
|
export { Loader } from './loader';
|
|
33
38
|
export { MarkdownContent } from './markdown-content';
|
|
39
|
+
export { TopBar } from './top-bar';
|
|
34
40
|
export { NotificationBadge } from './notification-badge';
|
|
35
41
|
export { PasswordField } from './password-field';
|
|
36
42
|
export { PasswordInput } from './password-input';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{INLINE_MESSAGE_THEMES as c,INLINE_MESSAGE_ICONS as a}from"./InlineMessage.config.js";import{Flex as E}from"../flex/Flex.js";import{Text as l}from"../text/Text.js";import{Icon as f}from"../icon/Icon.js";import{styled as t}from"../../stitches.js";const p=t(E,{variants:{theme:c}}),I=t(f,{flexShrink:"0",mr:"$2"}),h=({css:s,showIcon:
|
|
1
|
+
import*as e from"react";import{INLINE_MESSAGE_THEMES as c,INLINE_MESSAGE_ICONS as a}from"./InlineMessage.config.js";import{Flex as E}from"../flex/Flex.js";import{Text as l}from"../text/Text.js";import{Icon as f}from"../icon/Icon.js";import{styled as t}from"../../stitches.js";const p=t(E,{variants:{theme:c}}),I=t(f,{flexShrink:"0",mr:"$2"}),h=({css:s,showIcon:o=!0,theme:r="error",size:m="sm",children:i,...n})=>e.createElement(p,{theme:r,css:s,...n},o&&e.createElement(I,{size:"sm",is:a[r]}),e.createElement(l,{as:"span",size:m,css:{color:"inherit",transform:"translateY($space$0)"}},i));export{h as InlineMessage};
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
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:o="md",type:l="block",children:s,required:c,...m})=>e.createElement(f,{as:r,size:o,type:l,align:n,direction:a,...m},s,c&&e.createElement(g,{"aria-hidden":!0},"*"));i.displayName="Label";export{i as Label};
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
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:o="md",onClick:m,href:t,...i},n)=>t?e.createElement(r,{size:o,...i,ref:n,href:t}):e.createElement(r,{as:"button",size:o,...i,ref:n,onClick:m}));a.displayName="Link";export{a as Link,r as StyledLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import d from"mdast-util-directive";import k from"mdast-util-from-markdown";import f from"micromark-extension-directive";import*as p from"react";import{StackContent as l}from"../stack-content/StackContent.js";import{MarkdownCode as c}from"./components/MarkdownCode.js";import{MarkdownEmphasis as w}from"./components/MarkdownEmphasis.js";import{MarkdownHeading as M}from"./components/MarkdownHeading.js";import{MarkdownInlineCode as h}from"./components/MarkdownInlineCode.js";import{MarkdownImage as u}from"./components/MarkdownImage.js";import{MarkdownLink as g}from"./components/MarkdownLink.js";import{MarkdownList as
|
|
1
|
+
import d from"mdast-util-directive";import k from"mdast-util-from-markdown";import f from"micromark-extension-directive";import*as p from"react";import{StackContent as l}from"../stack-content/StackContent.js";import{MarkdownCode as c}from"./components/MarkdownCode.js";import{MarkdownEmphasis as w}from"./components/MarkdownEmphasis.js";import{MarkdownHeading as M}from"./components/MarkdownHeading.js";import{MarkdownInlineCode as h}from"./components/MarkdownInlineCode.js";import{MarkdownImage as u}from"./components/MarkdownImage.js";import{MarkdownLink as g}from"./components/MarkdownLink.js";import{MarkdownList as C}from"./components/MarkdownList.js";import{MarkdownListItem as $}from"./components/MarkdownListItem.js";import{MarkdownParagraph as x}from"./components/MarkdownParagraph.js";import{MarkdownStrong as y}from"./components/MarkdownStrong.js";import{MarkdownText as E}from"./components/MarkdownText.js";import{MarkdownThematicBreak as I}from"./components/MarkdownThematicBreak.js";const L={code:c,emphasis:w,heading:M,inlineCode:h,image:u,link:g,list:C,listItem:$,paragraph:x,strong:y,text:E,thematicBreak:I},v=o=>{var r,t;if((r=o.position)!=null&&r.start){const{line:e,column:m,offset:n}=(t=o.position)==null?void 0:t.start;return`${o.type}${e}${m}${n}`}return`${o.type}${+new Date}`},s=({content:o,customComponents:r={},css:t})=>{const e=k(o,{extensions:[f()],mdastExtensions:[d.fromMarkdown]}),m={...L,...r},n=a=>{const i=m[a.type];return i?p.createElement(i,{key:v(a),node:a,handleNode:n}):null};return p.createElement(l,{css:t},e.children.map(n))};s.displayName="MarkdownContent";export{s as MarkdownContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{styled as e}from"../../../stitches.js";import{Box as r}from"../../box/Box.js";const m=e(r,{bg:"$tonal100",borderRadius:"$1",color:"$tonal600",fontFamily:"$mono",fontSize:"$sm",lineHeight:1.4,my:"$4",p:"$3"}),n=({node:o})=>t.createElement(m,{as:"pre"},o.value);export{n as MarkdownCode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{styled as r}from"../../../stitches.js";const l=r("em",{fontStyle:"italic"}),a=({node:
|
|
1
|
+
import*as t from"react";import{styled as r}from"../../../stitches.js";const l=r("em",{fontStyle:"italic"}),a=({node:e,handleNode:n})=>{var o;return t.createElement(l,null,(o=e.children)==null?void 0:o.map(n))};export{a as MarkdownEmphasis};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{Heading as
|
|
1
|
+
import*as i from"react";import{Heading as o}from"../../heading/Heading.js";const c=s=>{switch(s){case 1:return{size:"xl",as:"h1"};case 2:return{size:"lg",as:"h2"};case 3:return{size:"md",as:"h3"};case 4:return{size:"sm",as:"h4"};case 5:return{size:"xs",as:"h5"};default:return{size:"xs",as:"h6"}}},d=({node:s,handleNode:r,css:a})=>{var e;const{as:n,size:t}=c(s.depth);return i.createElement(o,{as:n,size:t,css:{color:"inherit",...a}},(e=s.children)==null?void 0:e.map(r))};export{d as MarkdownHeading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"react";import{Image as t}from"../../image/Image.js";const m=({node:r,css:a})=>{var o;return e.createElement(t,{src:r.url,alt:(o=r.alt)!=null?o:void 0,css:a})};export{m as MarkdownImage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"react";import{Link as i}from"../../link/Link.js";const n=({node:e,handleNode:
|
|
1
|
+
import*as l from"react";import{Link as i}from"../../link/Link.js";const n=({node:e,handleNode:t})=>{var r,o;return l.createElement(i,{title:(r=e.title)!=null?r:void 0,href:e.url},(o=e.children)==null?void 0:o.map(t))};export{n as MarkdownLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{List as n}from"../../list/List.js";const m=({node:t,handleNode:o})=>{var e;return r.createElement(n.Item,null,(e=t.children)==null?void 0:e.map(o))};export{m as MarkdownListItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as n from"react";import{Text as t}from"../../text/Text.js";const c=({node:
|
|
1
|
+
import*as n from"react";import{Text as t}from"../../text/Text.js";const c=({node:o,handleNode:e,css:a})=>{var r;return n.createElement(t,{css:{color:"inherit",...a}},(r=o.children)==null?void 0:r.map(e))};export{c as MarkdownParagraph};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{styled as e}from"../../../stitches.js";const d=e("strong",{fontWeight:600}),l=({node:n,handleNode:r})=>{var o;return t.createElement(d,null,(o=n.children)==null?void 0:o.map(r))};export{l as MarkdownStrong};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as e from"react";import{Divider as o}from"../../divider/Divider.js";const t=({css:r})=>e.createElement(o,{css:{width:"100%",...r}});export{t as MarkdownThematicBreak};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"@radix-ui/react-navigation-menu";import t from"react";import{
|
|
1
|
+
import*as l from"@radix-ui/react-navigation-menu";import t from"react";import{MAX_Z_INDEX as N}from"../../constants/zIndices.js";import{keyframes as h,styled as n}from"../../stitches.js";import{fadeOut as w}from"../../utilities/style/keyframe-animations.js";import{NavigationMenuContext as x}from"./NavigationMenuContext.js";import{NavigationMenuDropdown as E}from"./NavigationMenuDropdown.js";import{NavigationMenuLink as C,NavigationMenuDropdownContent as D,NavigationMenuDropdownItem as $}from"./NavigationMenuItem.js";const I=h({"0%, 50%":{opacity:0},"100%":{opacity:1}}),L=n(l.Root,{display:"flex",justifyContent:"center",position:"relative"}),_=n(l.List,{all:"unset",display:"flex",justifyContent:"center",alignItems:"center",gap:"$1",listStyle:"none"}),k=n(l.Viewport,{zIndex:N}),S=n("div",{position:"absolute",left:0,top:"100%",width:"100%",display:"flex",justifyContent:"center"}),o=({children:f,css:m})=>{const[p,u]=t.useState(),[a,c]=t.useState(),[i,d]=t.useState(0),r=t.useRef(null),s=200;t.useLayoutEffect(()=>{r.current&&d(r.current.offsetWidth)},[]),t.useEffect(()=>{let e;return a===""&&(e=setTimeout(()=>u(null),s)),()=>{e!==null&&clearTimeout(e)}},[a]);const y=(e,v)=>{if(e&&i&&a===v){const g=i/2,M=i-e.offsetLeft-e.offsetWidth+e.offsetWidth/2;u(Math.round(g-M))}return e};return t.createElement(x.Provider,{value:{onNodeUpdate:y}},t.createElement(L,{onValueChange:c,css:m},t.createElement(_,{ref:r},f),t.createElement(S,null,t.createElement(k,{css:{transform:`translateX(${p||0}px)`,'&[data-state="open"]':{animation:`${I} ${s}ms ease`},'&[data-state="closed"]':{animation:`${w} ${s}ms ease-out`}}}))))};o.Link=C,o.Dropdown=E,o.DropdownContent=D,o.DropdownItem=$,o.displayName="NavigationMenu";export{o as NavigationMenu};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"@radix-ui/react-navigation-menu";import t from"react";import{styled as p}from"../../stitches.js";import{useNavigationMenuContext as m}from"./NavigationMenuContext.js";import{NavigationMenuDropdownTrigger as d}from"./NavigationMenuItem.js";const l=p(o.Content,{p:"$3",bg:"white",mt:"4px",boxShadow:"0px 3px 6px rgba(51, 51, 51, 0.15), 0px 3px 6px rgba(51, 51, 51, 0.2)",borderRadius:"$1"}),u=({children:r,title:e,...n})=>{const{onNodeUpdate:a}=m();return t.createElement(o.Item,{value:e},t.createElement(d,{...n,ref:i=>a(i,e)},e),t.createElement(l,null,r))};export{u as NavigationMenuDropdown};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"react";import{styled as e}from"../../stitches.js";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";const l=e(i,{position:"relative"}),a=e(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})=>o.createElement(l,null,!!t&&o.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useFormContext as g,Controller as C}from"react-hook-form";import{Description as F}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as V}from"../form/useFieldError.js";import{Label as b}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as h}from"../radio-button/RadioButtonGroup.js";import{InlineMessage as v}from"../inline-message/InlineMessage.js";import{styled as B}from"../../stitches.js";import{RadioField as R}from"./RadioField.js";const
|
|
1
|
+
import*as e from"react";import{useFormContext as g,Controller as C}from"react-hook-form";import{Description as F}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as V}from"../form/useFieldError.js";import{Label as b}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as h}from"../radio-button/RadioButtonGroup.js";import{InlineMessage as v}from"../inline-message/InlineMessage.js";import{styled as B}from"../../stitches.js";import{RadioField as R}from"./RadioField.js";const $=B("fieldset",{all:"unset"}),r=({children:s,css:d,direction:u="column",defaultValue:t,description:l,label:c,name:n,validation:o,onValueChange:a})=>{const{control:p}=g(),{error:i}=V(n);return e.createElement($,{css:d},e.createElement(b,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(o==null?void 0:o.required)},c),l&&e.createElement(F,{css:{mb:"$3"}},l),e.createElement(C,{control:p,name:n,rules:o,defaultValue:t,render:({onChange:f,value:E})=>e.createElement(h,{direction:u,defaultValue:t,onValueChange:m=>{f(m),a==null||a(m)},value:E},s)}),i&&e.createElement(v,{css:{mt:"$2"}},i))};r.Item=R,r.displayName="RadioButtonField";export{r as RadioButtonField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as d from"@radix-ui/react-radio-group";import*as e from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:t,children:r,size:
|
|
1
|
+
import*as d from"@radix-ui/react-radio-group";import*as e from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:t,children:r,size:o,isFullWidth:l,align:a,gap:s="3",justify:m,...n})=>e.createElement(d.Root,{...n},e.createElement(p,{direction:"row",justify:m,gap:s,css:t},e.Children.map(r,i=>e.isValidElement(i)&&(i==null?void 0:i.type)===c?e.cloneElement(i,{size:o,isFullWidth:l,align:a}):i)));export{f as RadioCardGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Search as
|
|
1
|
+
import{Search as w,Close as z}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as y}from"../action-icon/ActionIcon.js";import{Box as I}from"../box/Box.js";import{Icon as c}from"../icon/Icon.js";import{Input as k}from"../input/Input.js";import{styled as l}from"../../stitches.js";import{useCallbackRef as H}from"../../utilities/hooks/useCallbackRef.js";var L=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(L||{});const $=l(c,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),x=l(k,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),p=({size:e="md",css:u,value:n,clearText:m="Clear",onChange:a,...E})=>{const[h,C]=H(),[b,v]=t.useState(n||""),[f,d]=t.useState(n?"CLEAR":"SEARCH"),A=()=>{var r,i;const s=h.current;if(!s)return;const o=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;(i=o==null?void 0:o.call)==null||i.call(o,s,"");const g=new Event("input",{bubbles:!0});s.dispatchEvent(g),s.focus()},R=r=>{v(r.target.value),d(r.target.value?"CLEAR":"SEARCH"),a==null||a(r)},S=()=>f==="SEARCH"?t.createElement($,{is:w,size:e,css:{size:e=="sm"?"$1":20}}):t.createElement(y,{label:m,theme:"neutral",size:e,css:{position:"absolute",top:"0",right:"$1"},onClick:A},t.createElement(c,{is:z}));return t.createElement(I,{css:{position:"relative",...u}},t.createElement(x,{ref:C,size:e,type:"search",...E,value:b,onChange:R,css:{pr:e==="sm"?"$5":"$6"}}),S())};p.displayName="SearchInput";export{p as SearchInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{useFormContext as x,Controller as E}from"react-hook-form";import{FieldWrapper as V}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as l}from"../slider/Slider.js";const
|
|
1
|
+
import e from"react";import{useFormContext as x,Controller as E}from"react-hook-form";import{FieldWrapper as V}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import{Slider as l}from"../slider/Slider.js";const n=({css:u,label:i,name:t,defaultValue:a,outputLabel:d,min:r=0,max:m=100,steps:p=[],...s})=>{const{control:c}=x();return e.createElement(V,{css:u,fieldId:t,label:i},e.createElement(E,{control:c,name:t,defaultValue:a,render:({onChange:f,value:o})=>e.createElement(l,{name:t,defaultValue:a,onValueChange:f,value:o,min:r,max:m,...s},e.createElement(l.Steps,{min:r,max:m,steps:p}),e.createElement(l.Value,{value:o||a,outputLabel:d}))}))};n.displayName="SliderField";export{n as SliderField};
|
|
@@ -274,6 +274,7 @@ declare const StyledStack: import("@stitches/react/types/styled-component").Styl
|
|
|
274
274
|
}>>;
|
|
275
275
|
declare type StackPropsType = React.ComponentProps<typeof StyledStack> & {
|
|
276
276
|
css?: CSS;
|
|
277
|
+
as?: any;
|
|
277
278
|
};
|
|
278
|
-
export declare const Stack: React.
|
|
279
|
+
export declare const Stack: React.ForwardRefExoticComponent<StackPropsType>;
|
|
279
280
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{theme as c,styled as f}from"../../stitches.js";import{CSSWrapper as m}from"../../utilities/css-wrapper/CSSWrapper.js";const w=Object.keys(c.space).reduce((r,e)=>({...r,[e]:{mt:`-$space$${e}`,ml:`-$space$${e}`,"& > *":{mt:`$space$${e}`,ml:`$space$${e}`}}}),{}),d=f("div",{display:"flex","& > *":{m:0},variants:{direction:{row:{flexDirection:"row"},"row-reverse":{flexDirection:"row-reverse"},column:{flexDirection:"column"}},wrap:{wrap:{flexWrap:"wrap"},"no-wrap":{flexWrap:"no-wrap"},"wrap-reverse":{flexWrap:"wrap-reverse"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},false:{}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},false:{}},gap:{...w,false:{}}}}),s=t.forwardRef(({css:r,gap:e=2,direction:a="row",wrap:i="wrap",justify:o="start",align:n,...l},p)=>t.createElement(m,{css:r},t.createElement(d,{ref:p,direction:a,gap:e,wrap:i,justify:o,align:typeof n>"u"&&a!=="column"?"center":n,...l})));s.displayName="Stack";export{s as Stack};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as d}from"../divider/Divider.js";import{StyledHeading as e}from"../heading/Heading.js";import{StyledImage as l}from"../image/Image.js";import{StyledList as a}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const n=r("div",{[`& > ${e}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${c}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${a}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{my:"$5"},[`& > ${l}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),
|
|
1
|
+
import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as d}from"../divider/Divider.js";import{StyledHeading as e}from"../heading/Heading.js";import{StyledImage as l}from"../image/Image.js";import{StyledList as a}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const n=r("div",{[`& > ${e}`]:{maxWidth:"65ch","&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${c}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${a}`]:{maxWidth:"75ch","&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{my:"$5"},[`& > ${l}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),o=t.forwardRef((m,i)=>t.createElement(n,{ref:i,...m}));o.displayName="StackContent";export{o as StackContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as n from"react";import{Button as p}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:
|
|
1
|
+
import*as n from"react";import{Button as p}from"../button/Button.js";import{useStepper as m}from"./stepper-context/StepperContext.js";const c=({label:e,children:r,onClick:o,...i})=>{const{goToNextStep:t,activeStep:l}=m();return n.createElement(p,{size:"sm",...i,onClick:()=>{if(o)return o(t);t==null||t()},css:{ml:"auto"}},r||(e==null?void 0:e(l)))};export{c as StepperStepForward};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ok as f}from"@atom-learning/icons";import*as i from"react";import{styled as b}from"../../stitches.js";import{Flex as h}from"../flex/Flex.js";import{Icon as v}from"../icon/Icon.js";import{useStepper as g}from"./stepper-context/StepperContext.js";import{StepperStepBullet as D}from"./StepperStepBullet.js";import{StepperStepContainer as I}from"./StepperStepContainer.js";import{StepperStepLabel as U}from"./StepperStepLabel.js";import{Status as r}from"./types.js";const x=b(h,{justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),T=({css:u})=>{const{steps:s,goToStep:m,activeStep:l,viewedSteps:n,allowSkip:c,direction:a,hideLabels:S,completedSteps:p}=g(),d=
|
|
1
|
+
import{Ok as f}from"@atom-learning/icons";import*as i from"react";import{styled as b}from"../../stitches.js";import{Flex as h}from"../flex/Flex.js";import{Icon as v}from"../icon/Icon.js";import{useStepper as g}from"./stepper-context/StepperContext.js";import{StepperStepBullet as D}from"./StepperStepBullet.js";import{StepperStepContainer as I}from"./StepperStepContainer.js";import{StepperStepLabel as U}from"./StepperStepLabel.js";import{Status as r}from"./types.js";const x=b(h,{justifyContent:"space-between",variants:{direction:{vertical:{flexDirection:"column"},horizontal:{flexDirection:"row"}}}}),T=({css:u})=>{const{steps:s,goToStep:m,activeStep:l,viewedSteps:n,allowSkip:c,direction:a,hideLabels:S,completedSteps:p}=g(),d=e=>{const t=s[e];return t.status?t.status:p.length===s.length?r.SUCCESS:l===e&&p.includes(l)?r.REVIEWED:l===e?r.ACTIVE:p.includes(e)?r.COMPLETED:n.includes(e)?r.VIEWED:r.DEFAULT},E=e=>{var t;const o=(t=s[e])==null?void 0:t.status;return p.length===s.length?r.SUCCESS:o===r.SUCCESS?r.SUCCESS:o===r.VIEWED||e<Math.max(...n)?r.ACTIVE:r.DEFAULT};return i.createElement(x,{css:u,direction:a},s.map((e,t)=>{const o=d(t),C=E(t);return i.createElement(I,{tabIndex:0,key:`step_${t}`,direction:a,separator:C,status:o,css:a==="horizontal"?{width:`calc(100% / ${s.length})`}:{height:`calc(100% / ${s.length})`}},i.createElement(D,{as:c?"button":"div",onClick:()=>c&&n.includes(t)?m==null?void 0:m(t):void 0,status:o,"aria-current":t===l?"step":void 0,"aria-label":e.label?"":`step ${t+1}`,"aria-labelledby":e.label?`step-${t}`:void 0,css:{cursor:c&&n.includes(t)?"pointer":"auto"}},e.status==="success"?i.createElement(v,{is:f}):t+1),e.label&&!S&&i.createElement(U,{as:"span",id:`step-${t}`,direction:a,status:o},e.label))}))};export{T as StepperSteps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"@radix-ui/react-switch";import*as r from"react";import{styled as
|
|
1
|
+
import*as o from"@radix-ui/react-switch";import*as r from"react";import{styled as a}from"../../stitches.js";const n=a(o.Root,{appearance:"none",backgroundColor:"$tonal200",border:"none",borderRadius:"$round",cursor:"pointer",display:"flex",overflow:"hidden",p:"$0",position:"relative",transition:"all 50ms ease-out",width:"$4","&:hover":{backgroundColor:"$tonal300"},"&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary"},'&[data-state="checked"]:hover':{backgroundColor:"$primaryMid"}}),i=a(o.Thumb,{backgroundColor:"white",borderRadius:"$round",display:"block",size:"$1",transition:"transform 50ms",willChange:"transform",'&[data-state="checked"]':{transform:"translateX(calc($sizes$2 - $space$1))"}}),e=t=>r.createElement(n,{...t},r.createElement(i,null));e.displayName="Switch";export{e as Switch};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"react";import{styled as d}from"../../stitches.js";import{TableRow as i}from"./TableRow.js";const a=d("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),
|
|
1
|
+
import*as r from"react";import{styled as d}from"../../stitches.js";import{TableRow as i}from"./TableRow.js";const a=d("tbody",{variants:{striped:{true:{[`${i}`]:{"&:nth-child(odd)":{bg:"white"},"&:nth-child(even)":{bg:"$tonal50"}}},false:{bg:"white"}}}}),t=({striped:e=!0,...o})=>r.createElement(a,{striped:e,...o});t.displayName="TableBody";export{t as TableBody};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import m from"react";import{styled as l}from"../../stitches.js";import{TableHeaderCell as
|
|
1
|
+
import m from"react";import{styled as l}from"../../stitches.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";const o=l("thead",{variants:{theme:{primary:{[`${r}`]:{bg:"$primary"}},primaryDark:{[`${r}`]:{bg:"$primaryDark"}},light:{[`${r}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),e=({theme:a="primaryDark",...t})=>m.createElement(o,{theme:a,...t});e.displayName="TableHeader";export{e as TableHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Trigger as l}from"@radix-ui/react-tabs";import{opacify as
|
|
1
|
+
import{Trigger as l}from"@radix-ui/react-tabs";import{opacify as o}from"color2k";import*as n from"react";import{styled as s,theme as e}from"../../stitches.js";const c=s(l,{background:"none",border:"none",cursor:"pointer",flexShrink:0,fontFamily:"$body",p:"$4",height:"$5",userSelect:"none",transition:"0.3s",variants:{theme:{light:{'&[data-state="active"]':{color:"$primary",fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},'&[data-state="inactive"]':{color:"$tonal500"},"&:not([data-disabled]):hover":{color:"$primary",bg:o(e.colors.primary.value,-.9)},"&:not([data-disabled]):active":{color:"$primary",bg:o(e.colors.primary.value,-.8),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}},dark:{color:"white",'&[data-state="active"]':{fontWeight:600,letterSpacing:"-0.005em",boxShadow:"inset 0 -2px 0 0 currentColor"},"&:not([data-disabled]):hover":{bg:o("white",-.8)},"&:not([data-disabled]):active":{bg:o("white",-.7),boxShadow:"none"},"&[data-disabled],&[data-disabled]:hover":{color:"$tonal200",cursor:"not-allowed"}}}}}),a=({children:t,theme:r,disabled:i=!1,...d})=>n.createElement(c,{disabled:i,theme:r,...d},t);a.displayName="TabTrigger";export{a as TabTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Root as l,Content as n}from"@radix-ui/react-tabs";import*as p from"react";import{styled as
|
|
1
|
+
import{Root as l,Content as n}from"@radix-ui/react-tabs";import*as p from"react";import{styled as e}from"../../stitches.js";import{TriggerListWrapper as t}from"./TabsTriggerList.js";import{TabTrigger as s}from"./TabTrigger.js";import{passPropsToChildren as g}from"./utils.js";const h=e(l,{display:"flex",flexDirection:"column",variants:{theme:{light:{color:"$primary"},dark:{color:"white"}}}}),i=e(n,{flexGrow:1,fontFamily:"$body",variants:{theme:{light:{color:"$textForeground"},dark:{bg:"$primaryDark",color:"white"}}}}),r=({theme:o="light",children:m,...a})=>p.createElement(h,{theme:o,...a},g(m,{theme:o},[t,i]));r.TriggerList=t,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"react";const t=(n,e,i=[])=>o.Children.map(n,l=>o.isValidElement(l)&&i.includes(l==null?void 0:l.type)?o.cloneElement(l,{...e}):l);export{t as passPropsToChildren};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Error as g,Close as h}from"@atom-learning/icons";import*as
|
|
1
|
+
import{Error as g,Close as h}from"@atom-learning/icons";import*as t from"react";import{toast as $}from"react-hot-toast";import{keyframes as i,styled as a}from"../../stitches.js";import{ActionIcon as v}from"../action-icon/ActionIcon.js";import{Icon as s}from"../icon/Icon.js";import{Loader as y}from"../loader/Loader.js";import{Text as w}from"../text/Text.js";const n=400,x=i({"0%":{transform:"translate3d(0,-100%,0)",opacity:0},"100%":{transform:"translate3d(0,0,0)",opacity:1}}),E=i({"0%":{transform:"translate3d(0,0,0)",opacity:1},"100%":{transform:"translate3d(0,-100%,0)",opacity:0}}),k=a("div",{position:"absolute",width:"100%",variants:{visible:{true:{"@allowMotion":{animation:`${x} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}},false:{opacity:0,"@allowMotion":{animation:`${E} 250ms cubic-bezier(0.22, 1, 0.36, 1)`}}}}}),I=a("div",{pointerEvents:"auto",alignItems:"center",borderRadius:"$0",boxShadow:"$1",boxSizing:"border-box",color:"white",display:"flex",minHeight:"$5",pl:"$4",position:"relative",pr:"$6",py:"$4",transition:"background-color 50ms ease-out",width:"100%","@sm":{width:n},"@allowMotion":{transition:"background-color 50ms ease-out, transform 150ms ease-out"},variants:{status:{blank:{bg:"$primary"},error:{bg:"$danger"},loading:{bg:"$primary"},success:{bg:"$success"}}}}),T=t.memo(({ariaLive:l,height:m,id:e,message:c,role:p,type:o="blank",visible:d,calculateOffset:u,updateHeight:b})=>{const f=u(e,{reverseOrder:!0,margin:8});return t.createElement(k,{visible:d},t.createElement(I,{ref:r=>{r&&m===void 0&&b(e,r.getBoundingClientRect().height)},status:o,role:p,"aria-live":l,style:{transform:`translateY(${f}px)`}},o==="error"&&t.createElement(s,{size:"sm",css:{mr:"$3",flex:"0 0 auto"},is:g}),t.createElement(w,{css:{color:"inherit"}},c),o==="loading"?t.createElement(y,{css:{flex:"0 0 auto",ml:"auto"}}):t.createElement(v,{css:{position:"absolute",top:"$2",right:"$2",color:"white","&:hover,&:focus":{color:"white",opacity:.5}},label:"Close alert",onClick:()=>$.dismiss(e)},t.createElement(s,{is:h}))))});export{n as TOAST_WIDTH,T as Toast};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{useToaster as p}from"react-hot-toast";import{default as _}from"react-hot-toast";import{styled as c}from"../../stitches.js";import{TOAST_WIDTH as d,Toast as f}from"./Toast.js";import{MAX_Z_INDEX as u}from"../../constants/zIndices.js";const T=c("div",{left:"$2",position:"fixed",top:"$2",right:"$2",zIndex:u,"@sm":{top:"$3",right:"auto",left:`calc(50% - ${d/2}px)`}}),o=({children:a})=>{const{toasts:r,handlers:s}=p(),{startPause:i,endPause:m,calculateOffset:n,updateHeight:l}=s;return t.createElement(t.Fragment,null,t.createElement(T,{onMouseEnter:i,onMouseLeave:m},r.map(e=>t.createElement(f,{key:e.id,calculateOffset:n,updateHeight:l,...e}))),a)};o.displayName="ToastProvider";export{o as ToastProvider,_ as toast};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as n from"react";import{styled as g}from"../../stitches.js";import{StyledIcon as f,Icon as r}from"../icon/Icon.js";import{StyledItem as h}from"./ToggleGroupItem.js";const t={sm:"32px",md:"40px",lg:"48px"}
|
|
1
|
+
import*as n from"react";import{styled as g}from"../../stitches.js";import{StyledIcon as f,Icon as r}from"../icon/Icon.js";import{StyledItem as h}from"./ToggleGroupItem.js";const t={sm:"32px",md:"40px",lg:"48px"},$={sm:"$4",md:"$5",lg:"$5"},u={sm:"$2",md:"$3",lg:"$3"},l=i=>({fontSize:`$${i}`,px:$[i],minHeight:t[i],"& > *:not(:last-child)":{mr:u[i]}}),d=g(h,{flexGrow:1,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600,lineHeight:1,py:"$1",[`& ${f}`]:{flexShrink:0},variants:{size:{sm:l("sm"),md:l("md"),lg:l("lg")},isIconOnly:{true:{}}},compoundVariants:[{isIconOnly:!0,size:"sm",css:{minWidth:t.sm,p:0}},{isIconOnly:!0,size:"md",css:{minWidth:t.md,p:0}},{isIconOnly:!0,size:"lg",css:{minWidth:t.lg,p:0}}]}),x=n.forwardRef(({size:i="md",children:p,...c},a)=>{var o;const s=n.Children.toArray(p),m=s.length<=1,y=m&&n.isValidElement(s[0])&&((o=s[0])==null?void 0:o.type)===r;return n.createElement(d,{ref:a,size:i,isIconOnly:y,...c},s.map(e=>!m&&typeof e=="string"?n.createElement("span",{key:e},e):n.isValidElement(e)&&(e==null?void 0:e.type)===r?n.cloneElement(e,{...e.props,size:i}):e))});export{d as StyledButton,x as ToggleGroupButton};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CSS } from '../../stitches';
|
|
3
|
+
import { TopBarActionIcon } from './TopBarActionIcon';
|
|
4
|
+
import { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand';
|
|
5
|
+
interface TopBarSubComponents {
|
|
6
|
+
Brand: typeof TopBarBrand;
|
|
7
|
+
BrandLogo: typeof TopBarBrandLogo;
|
|
8
|
+
BrandName: typeof TopBarBrandName;
|
|
9
|
+
ActionIcon: typeof TopBarActionIcon;
|
|
10
|
+
Divider: typeof TopBarDivider;
|
|
11
|
+
}
|
|
12
|
+
declare const TopBarDivider: () => JSX.Element;
|
|
13
|
+
interface TopBarProps {
|
|
14
|
+
css?: CSS;
|
|
15
|
+
}
|
|
16
|
+
export declare const TopBar: React.FC<TopBarProps> & TopBarSubComponents;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";import{styled as r}from"../../stitches.js";import{useScrollPosition as i}from"../../utilities/hooks/useScrollPosition.js";import{Divider as n}from"../divider/Divider.js";import{Flex as m}from"../flex/Flex.js";import{TopBarActionIcon as d}from"./TopBarActionIcon.js";import{TopBarBrand as p,TopBarBrandLogo as l,TopBarBrandName as s}from"./TopBarBrand.js";const c=()=>t.createElement(n,{orientation:"vertical",css:{minHeight:28,bg:"$tonal100"}}),x=r("div",{bg:"white",position:"sticky",display:"flex",alignItems:"center",width:"100vw",top:"0",height:"$6",zIndex:1,borderBottom:"1px solid $tonal100",transition:"box-shadow .2s ease-out",variants:{hasScrolled:{true:{boxShadow:"0px 4px 4px -2px rgba(31, 31, 31, 0.1);"}}}}),B=r(m,{alignItems:"center",height:"$4",mx:"$4",width:"100%","@md":{mx:"$5"}}),o=e=>{const{y:a}=i();return t.createElement(x,{hasScrolled:!!a},t.createElement(B,{...e}))};o.Brand=p,o.BrandLogo=l,o.BrandName=s,o.ActionIcon=d,o.Divider=c,o.displayName="TopBar";export{o as TopBar};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ActionIcon } from '../action-icon';
|
|
3
|
+
declare type TopBarActionIconProps = Omit<React.ComponentProps<typeof ActionIcon>, 'size' | 'children'> & {
|
|
4
|
+
icon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const TopBarActionIcon: React.ForwardRefExoticComponent<TopBarActionIconProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{ActionIcon as m}from"../action-icon/ActionIcon.js";import{Icon as n}from"../icon/Icon.js";const c=e.forwardRef(({icon:o,...r},t)=>e.createElement(m,{size:"md",appearance:"simple",theme:"neutral",ref:t,...r},e.createElement(n,{is:o})));export{c as TopBarActionIcon};
|