@atom-learning/components 2.0.0-beta.0 → 2.0.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 +26 -0
- package/dist/components/accordion/Accordion.d.ts +0 -2
- package/dist/components/accordion/AccordionContent.d.ts +0 -2
- package/dist/components/accordion/AccordionContent.js +1 -1
- package/dist/components/accordion/AccordionItem.d.ts +0 -2
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.d.ts +0 -2
- package/dist/components/action-icon/ActionIcon.constants.d.ts +6 -0
- package/dist/components/action-icon/ActionIcon.constants.js +1 -0
- package/dist/components/action-icon/ActionIcon.d.ts +1 -3
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/alert-dialog/AlertDialog.d.ts +0 -2
- package/dist/components/alert-dialog/AlertDialogContent.d.ts +0 -2
- 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/badge/Badge.d.ts +0 -4
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/box/Box.d.ts +0 -2
- package/dist/components/button/Button.d.ts +0 -2
- package/dist/components/button/Button.js +1 -1
- package/dist/components/calendar/Calendar.d.ts +3 -0
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/Day.d.ts +0 -2
- package/dist/components/calendar/constants.d.ts +7 -0
- package/dist/components/calendar/constants.js +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselPagination.d.ts +0 -2
- package/dist/components/carousel/CarouselSlide.d.ts +0 -2
- package/dist/components/carousel/CarouselSlider.d.ts +0 -2
- package/dist/components/checkbox/Checkbox.d.ts +0 -2
- package/dist/components/checkbox/Checkbox.js +1 -1
- package/dist/components/combobox/Combobox.d.ts +0 -2
- package/dist/components/combobox/Combobox.js +1 -1
- package/dist/components/combobox/ComboboxInput.d.ts +0 -2
- package/dist/components/combobox/ComboboxInput.js +1 -1
- package/dist/components/combobox/ComboboxList.d.ts +0 -2
- package/dist/components/combobox/ComboboxOption.d.ts +0 -2
- package/dist/components/combobox/ComboboxPopover.d.ts +0 -2
- package/dist/components/date-input/DateInput.js +1 -1
- package/dist/components/dialog/Dialog.d.ts +0 -2
- package/dist/components/dialog/DialogBackground.d.ts +0 -4
- package/dist/components/dialog/DialogClose.d.ts +0 -2
- package/dist/components/dialog/DialogContent.d.ts +0 -2
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/divider/Divider.d.ts +0 -2
- package/dist/components/divider/Divider.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +0 -2
- package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +0 -2
- package/dist/components/empty-state/EmptyState.d.ts +0 -4
- package/dist/components/empty-state/EmptyState.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.d.ts +0 -4
- package/dist/components/empty-state/EmptyStateBody.js +1 -1
- package/dist/components/empty-state/EmptyStateImage.d.ts +0 -4
- package/dist/components/empty-state/EmptyStateImage.js +1 -1
- package/dist/components/empty-state/EmptyStateTitle.d.ts +0 -2
- package/dist/components/field-wrapper/FieldDescription.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/file-input/FileInput.js +1 -1
- package/dist/components/flex/Flex.d.ts +0 -2
- package/dist/components/form/Form.d.ts +0 -2
- package/dist/components/grid/Grid.d.ts +1 -3
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/heading/Heading.d.ts +0 -2
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/icon/Icon.d.ts +0 -2
- package/dist/components/image/Image.d.ts +0 -2
- package/dist/components/input/Input.d.ts +0 -2
- package/dist/components/label/Label.d.ts +0 -2
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.d.ts +0 -2
- package/dist/components/link/Link.js +1 -1
- package/dist/components/list/List.d.ts +0 -4
- 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/notification-badge/NotificationBadge.d.ts +0 -4
- package/dist/components/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/password-input/PasswordInput.js +1 -1
- package/dist/components/popover/Popover.d.ts +0 -2
- package/dist/components/popover/PopoverContent.d.ts +0 -2
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/progress-bar/ProgressBar.d.ts +0 -2
- package/dist/components/radio-button/RadioButton.d.ts +0 -2
- package/dist/components/radio-button/RadioButtonGroup.d.ts +0 -2
- package/dist/components/radio-button/RadioButtonGroup.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-card/RadioCard.d.ts +0 -2
- 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.d.ts +0 -2
- package/dist/components/select/Select.js +1 -1
- package/dist/components/slider/Slider.d.ts +0 -2
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack/Stack.d.ts +1 -3
- package/dist/components/stack/Stack.js +1 -1
- package/dist/components/stack-content/StackContent.d.ts +0 -2
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/stepper/StepperStepBullet.d.ts +1 -5
- package/dist/components/stepper/StepperStepBullet.js +1 -1
- package/dist/components/stepper/StepperStepContainer.d.ts +1 -4
- package/dist/components/stepper/StepperStepContainer.js +1 -1
- package/dist/components/stepper/StepperStepForward.js +1 -1
- package/dist/components/stepper/StepperStepLabel.d.ts +1 -5
- package/dist/components/stepper/StepperStepLabel.js +1 -1
- package/dist/components/stepper/StepperSteps.js +1 -1
- package/dist/components/stepper/stepper-context/StepperContext.js +1 -1
- package/dist/components/stepper/types.d.ts +4 -1
- package/dist/components/stepper/types.js +1 -1
- package/dist/components/switch/Switch.d.ts +0 -2
- package/dist/components/switch/Switch.js +1 -1
- package/dist/components/table/Table.d.ts +0 -2
- package/dist/components/table/TableBody.d.ts +0 -2
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableCell.d.ts +0 -2
- package/dist/components/table/TableFooter.d.ts +0 -2
- package/dist/components/table/TableFooterCell.d.ts +0 -2
- package/dist/components/table/TableHeader.d.ts +0 -2
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableHeaderCell.d.ts +0 -2
- package/dist/components/table/TableRow.d.ts +0 -2
- package/dist/components/tabs/TabTrigger.d.ts +0 -2
- package/dist/components/tabs/TabTrigger.js +1 -1
- package/dist/components/tabs/Tabs.d.ts +0 -4
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTriggerList.d.ts +0 -2
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/components/tabs/utils.js +1 -1
- package/dist/components/text/Text.d.ts +0 -2
- package/dist/components/textarea/Textarea.d.ts +0 -2
- package/dist/components/toast/Toast.d.ts +0 -2
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.d.ts +0 -4
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.d.ts +0 -4
- package/dist/components/toggle-group/ToggleGroupRoot.d.ts +0 -2
- package/dist/components/toggle-group/index.d.ts +0 -10
- package/dist/components/tooltip/TooltipContent.d.ts +0 -2
- package/dist/components/validation-error/ValidationError.js +1 -1
- package/dist/components/video/Video.d.ts +0 -4
- package/dist/docgen.json +1 -1
- package/dist/docs/ActionIcon.mdx +13 -19
- package/dist/docs/Checkbox.mdx +4 -0
- package/dist/docs/Flex.mdx +3 -3
- package/dist/docs/Icon.mdx +1 -1
- package/dist/docs/Slider.mdx +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/stitches.d.ts +0 -20
- package/dist/utilities/hooks/useCallbackRef.d.ts +9 -0
- package/dist/utilities/hooks/useCallbackRef.js +1 -0
- package/dist/utilities/{use-is-mounted-ref/index.d.ts → hooks/useIsMountedRef.d.ts} +0 -0
- package/dist/utilities/{use-is-mounted-ref/index.js → hooks/useIsMountedRef.js} +0 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
# [2.0.0](https://github.com/Atom-Learning/components/compare/v1.24.2...v2.0.0) (2022-09-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* action icon sizes ([e46f613](https://github.com/Atom-Learning/components/commit/e46f613c030e3e3cc15ab2c8e148fa95e11f01e8))
|
|
7
|
+
* align sizes to buttons ([4df4f1f](https://github.com/Atom-Learning/components/commit/4df4f1fbd8e1a2eaf6f26166a28086a70009a2c2))
|
|
8
|
+
* always base icon size on actionicon size ([2570aaa](https://github.com/Atom-Learning/components/commit/2570aaa26fa919355f33f7eb8fea5f16be6df787))
|
|
9
|
+
* attempting manual merge ([51a1c66](https://github.com/Atom-Learning/components/commit/51a1c666de0b6cad1c086bcc6efe1dd1f57ab47d))
|
|
10
|
+
* changing back missed icon size ([23348a3](https://github.com/Atom-Learning/components/commit/23348a3c3588329de9285aa9002ba77497ac0789))
|
|
11
|
+
* display px value in docs ([fe24ca0](https://github.com/Atom-Learning/components/commit/fe24ca09a74cdfd4c4e8d3fb3603f2c3b61e6c24))
|
|
12
|
+
* fixing type issue ([1510885](https://github.com/Atom-Learning/components/commit/1510885f5b0e97e75d48e8e1414e7b4324dc8ba6))
|
|
13
|
+
* further aligning with design after unintended change to icon ([1ccaf5e](https://github.com/Atom-Learning/components/commit/1ccaf5e087475411f194bd359a6567977c91b9af))
|
|
14
|
+
* merge in main ([52176f2](https://github.com/Atom-Learning/components/commit/52176f203441f96d4e8b702ca63d79db715d4242))
|
|
15
|
+
* moving logic into compound variants ([8567512](https://github.com/Atom-Learning/components/commit/85675123c43f7e4e0c71093163380e42a91fb3ed))
|
|
16
|
+
* moving to size map rather than compound variants ([ab10933](https://github.com/Atom-Learning/components/commit/ab10933dc308cc563dd11fe29245717705c1262b))
|
|
17
|
+
* retaining conditional logic on input fields ([72c1e52](https://github.com/Atom-Learning/components/commit/72c1e52562d4939b1a4cc10771d4885f1f2e55ce))
|
|
18
|
+
* updating mdx to remove unused prop ([94444f3](https://github.com/Atom-Learning/components/commit/94444f3aff999ad4b56216f47fda4e08464667db))
|
|
19
|
+
* updating snapshot ([59e1460](https://github.com/Atom-Learning/components/commit/59e14605b727eb6e46827dc8d524059dd0f6f658))
|
|
20
|
+
* updating snapshots after merge conflict ([8c0577a](https://github.com/Atom-Learning/components/commit/8c0577a4223936fdfbad6c2950798d7c9dbfcddc))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### BREAKING CHANGES
|
|
24
|
+
|
|
25
|
+
* { sizes for ActionIcon are going from sm-xl to xs-lg }
|
|
26
|
+
|
|
1
27
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
2
28
|
|
|
3
29
|
|
|
@@ -62,7 +62,6 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
62
62
|
warning: any;
|
|
63
63
|
warningMid: any;
|
|
64
64
|
warningDark: any;
|
|
65
|
-
warningText: any;
|
|
66
65
|
subjectEnglish: any;
|
|
67
66
|
subjectMaths: any;
|
|
68
67
|
subjectScience: any;
|
|
@@ -82,7 +81,6 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
82
81
|
"7": any;
|
|
83
82
|
"8": any;
|
|
84
83
|
"9": any;
|
|
85
|
-
"10": any;
|
|
86
84
|
};
|
|
87
85
|
fontSizes: {
|
|
88
86
|
xs: any;
|
|
@@ -59,7 +59,6 @@ declare const StyledContent: import("@stitches/react/types/styled-component").St
|
|
|
59
59
|
warning: any;
|
|
60
60
|
warningMid: any;
|
|
61
61
|
warningDark: any;
|
|
62
|
-
warningText: any;
|
|
63
62
|
subjectEnglish: any;
|
|
64
63
|
subjectMaths: any;
|
|
65
64
|
subjectScience: any;
|
|
@@ -79,7 +78,6 @@ declare const StyledContent: import("@stitches/react/types/styled-component").St
|
|
|
79
78
|
"7": any;
|
|
80
79
|
"8": any;
|
|
81
80
|
"9": any;
|
|
82
|
-
"10": any;
|
|
83
81
|
};
|
|
84
82
|
fontSizes: {
|
|
85
83
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes 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};
|
|
@@ -59,7 +59,6 @@ declare const StyledItem: import("@stitches/react/types/styled-component").Style
|
|
|
59
59
|
warning: any;
|
|
60
60
|
warningMid: any;
|
|
61
61
|
warningDark: any;
|
|
62
|
-
warningText: any;
|
|
63
62
|
subjectEnglish: any;
|
|
64
63
|
subjectMaths: any;
|
|
65
64
|
subjectScience: any;
|
|
@@ -79,7 +78,6 @@ declare const StyledItem: import("@stitches/react/types/styled-component").Style
|
|
|
79
78
|
"7": any;
|
|
80
79
|
"8": any;
|
|
81
80
|
"9": any;
|
|
82
|
-
"10": any;
|
|
83
81
|
};
|
|
84
82
|
fontSizes: {
|
|
85
83
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
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};
|
|
@@ -61,7 +61,6 @@ declare const StyledTrigger: import("@stitches/react/types/styled-component").St
|
|
|
61
61
|
warning: any;
|
|
62
62
|
warningMid: any;
|
|
63
63
|
warningDark: any;
|
|
64
|
-
warningText: any;
|
|
65
64
|
subjectEnglish: any;
|
|
66
65
|
subjectMaths: any;
|
|
67
66
|
subjectScience: any;
|
|
@@ -81,7 +80,6 @@ declare const StyledTrigger: import("@stitches/react/types/styled-component").St
|
|
|
81
80
|
"7": any;
|
|
82
81
|
"8": any;
|
|
83
82
|
"9": any;
|
|
84
|
-
"10": any;
|
|
85
83
|
};
|
|
86
84
|
fontSizes: {
|
|
87
85
|
xs: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const m={xs:"sm",sm:"sm",md:"md",lg:"lg"};export{m as ActionIconSizeMap};
|
|
@@ -5,7 +5,7 @@ import { Override } from '../../utilities';
|
|
|
5
5
|
declare const StyledButton: import("@stitches/react/types/styled-component").StyledComponent<"button", {
|
|
6
6
|
theme?: "primary" | "success" | "danger" | "warning" | "neutral" | undefined;
|
|
7
7
|
appearance?: "outline" | "solid" | "simple" | undefined;
|
|
8
|
-
size?: "md" | "lg" | "
|
|
8
|
+
size?: "sm" | "md" | "lg" | "xs" | undefined;
|
|
9
9
|
isRounded?: boolean | "true" | undefined;
|
|
10
10
|
}, {
|
|
11
11
|
sm: string;
|
|
@@ -67,7 +67,6 @@ declare const StyledButton: import("@stitches/react/types/styled-component").Sty
|
|
|
67
67
|
warning: any;
|
|
68
68
|
warningMid: any;
|
|
69
69
|
warningDark: any;
|
|
70
|
-
warningText: any;
|
|
71
70
|
subjectEnglish: any;
|
|
72
71
|
subjectMaths: any;
|
|
73
72
|
subjectScience: any;
|
|
@@ -87,7 +86,6 @@ declare const StyledButton: import("@stitches/react/types/styled-component").Sty
|
|
|
87
86
|
"7": any;
|
|
88
87
|
"8": any;
|
|
89
88
|
"9": any;
|
|
90
|
-
"10": any;
|
|
91
89
|
};
|
|
92
90
|
fontSizes: {
|
|
93
91
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{darken as i}from"color2k";import g from"invariant";import*as
|
|
1
|
+
import{darken as i}from"color2k";import g from"invariant";import*as o from"react";import{styled as D,theme as n}from"../../stitches.js";import{ActionIconSizeMap as w}from"./ActionIcon.constants.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"}}),f=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:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{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(n.colors.primaryDark.value,.1),i(n.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(n.colors.primaryDark.value,.1),i(n.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(n.colors.primaryDark.value,.1),i(n.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=o.forwardRef(({children:e,theme:r="primary",appearance:a="simple",size:$="sm",label:b,href:u,disabled:d,...h},k)=>{const y=`A single ${m.displayName} component is permitted as a child of ${t.displayName}`;return g(o.Children.count(e)===1,y),o.createElement(f,{...h,...u?{as:"a",href:d?null:u,onClick:void 0,"aria-disabled":!!d}:{type:"button"},"aria-label":b,theme:r,appearance:a,size:$,ref:k,disabled:d},o.Children.map(e,s=>{if(!o.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}`),o.cloneElement(s,{size:w[$],css:{...s.props.css?s.props.css:{}}})}))});t.displayName="ActionIcon";export{t as ActionIcon};
|
|
@@ -61,7 +61,6 @@ declare const StyledAlertDialog: import("@stitches/react/types/styled-component"
|
|
|
61
61
|
warning: any;
|
|
62
62
|
warningMid: any;
|
|
63
63
|
warningDark: any;
|
|
64
|
-
warningText: any;
|
|
65
64
|
subjectEnglish: any;
|
|
66
65
|
subjectMaths: any;
|
|
67
66
|
subjectScience: any;
|
|
@@ -81,7 +80,6 @@ declare const StyledAlertDialog: import("@stitches/react/types/styled-component"
|
|
|
81
80
|
"7": any;
|
|
82
81
|
"8": any;
|
|
83
82
|
"9": any;
|
|
84
|
-
"10": any;
|
|
85
83
|
};
|
|
86
84
|
fontSizes: {
|
|
87
85
|
xs: any;
|
|
@@ -61,7 +61,6 @@ declare const StyledAlertDialogContent: import("@stitches/react/types/styled-com
|
|
|
61
61
|
warning: any;
|
|
62
62
|
warningMid: any;
|
|
63
63
|
warningDark: any;
|
|
64
|
-
warningText: any;
|
|
65
64
|
subjectEnglish: any;
|
|
66
65
|
subjectMaths: any;
|
|
67
66
|
subjectScience: any;
|
|
@@ -81,7 +80,6 @@ declare const StyledAlertDialogContent: import("@stitches/react/types/styled-com
|
|
|
81
80
|
"7": any;
|
|
82
81
|
"8": any;
|
|
83
82
|
"9": any;
|
|
84
|
-
"10": any;
|
|
85
83
|
};
|
|
86
84
|
fontSizes: {
|
|
87
85
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
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:"$
|
|
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*as e from"react";import{useIsMountedRef as s}from"../../../utilities/
|
|
1
|
+
import*as e from"react";import{useIsMountedRef as s}from"../../../utilities/hooks/useIsMountedRef.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*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:"$
|
|
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};
|
|
@@ -59,7 +59,6 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
|
|
|
59
59
|
warning: any;
|
|
60
60
|
warningMid: any;
|
|
61
61
|
warningDark: any;
|
|
62
|
-
warningText: any;
|
|
63
62
|
subjectEnglish: any;
|
|
64
63
|
subjectMaths: any;
|
|
65
64
|
subjectScience: any;
|
|
@@ -79,7 +78,6 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
|
|
|
79
78
|
"7": any;
|
|
80
79
|
"8": any;
|
|
81
80
|
"9": any;
|
|
82
|
-
"10": any;
|
|
83
81
|
};
|
|
84
82
|
fontSizes: {
|
|
85
83
|
xs: any;
|
|
@@ -328,7 +326,6 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
|
|
|
328
326
|
warning: any;
|
|
329
327
|
warningMid: any;
|
|
330
328
|
warningDark: any;
|
|
331
|
-
warningText: any;
|
|
332
329
|
subjectEnglish: any;
|
|
333
330
|
subjectMaths: any;
|
|
334
331
|
subjectScience: any;
|
|
@@ -348,7 +345,6 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
|
|
|
348
345
|
"7": any;
|
|
349
346
|
"8": any;
|
|
350
347
|
"9": any;
|
|
351
|
-
"10": any;
|
|
352
348
|
};
|
|
353
349
|
fontSizes: {
|
|
354
350
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as n}from"../../stitches.js";import{Box as a}from"../box/Box.js";import{Flex as m}from"../flex/Flex.js";const l=n(m,{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:"$2"},sm:{fontSize:"$md",px:"$4",height:"$3"},md:{fontSize:"$md",px:"$4",height:"$4"}}}}),
|
|
1
|
+
import*as e from"react";import{styled as n}from"../../stitches.js";import{Box as a}from"../box/Box.js";import{Flex as m}from"../flex/Flex.js";const l=n(m,{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:"$2"},sm:{fontSize:"$md",px:"$4",height:"$3"},md:{fontSize:"$md",px:"$4",height:"$4"}}}}),t=({theme:o="info",size:r="sm",children:i,...s})=>e.createElement(l,{role:"status",theme:o,size:r,...s},e.createElement(a,{as:"div",css:{whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis",py:"$0"}},i));t.displayName="Badge";export{t as Badge};
|
|
@@ -58,7 +58,6 @@ export declare const Box: import("@stitches/react/types/styled-component").Style
|
|
|
58
58
|
warning: any;
|
|
59
59
|
warningMid: any;
|
|
60
60
|
warningDark: any;
|
|
61
|
-
warningText: any;
|
|
62
61
|
subjectEnglish: any;
|
|
63
62
|
subjectMaths: any;
|
|
64
63
|
subjectScience: any;
|
|
@@ -78,7 +77,6 @@ export declare const Box: import("@stitches/react/types/styled-component").Style
|
|
|
78
77
|
"7": any;
|
|
79
78
|
"8": any;
|
|
80
79
|
"9": any;
|
|
81
|
-
"10": any;
|
|
82
80
|
};
|
|
83
81
|
fontSizes: {
|
|
84
82
|
xs: any;
|
|
@@ -69,7 +69,6 @@ export declare const StyledButton: import("@stitches/react/types/styled-componen
|
|
|
69
69
|
warning: any;
|
|
70
70
|
warningMid: any;
|
|
71
71
|
warningDark: any;
|
|
72
|
-
warningText: any;
|
|
73
72
|
subjectEnglish: any;
|
|
74
73
|
subjectMaths: any;
|
|
75
74
|
subjectScience: any;
|
|
@@ -89,7 +88,6 @@ export declare const StyledButton: import("@stitches/react/types/styled-componen
|
|
|
89
88
|
"7": any;
|
|
90
89
|
"8": any;
|
|
91
90
|
"9": any;
|
|
92
|
-
"10": any;
|
|
93
91
|
};
|
|
94
92
|
fontSizes: {
|
|
95
93
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{darken as i,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}}),n=(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:"$
|
|
1
|
+
import{darken as i,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}}),n=(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:"max-content"},true:{width:"100%"}},isRounded:{true:{borderRadius:"$round"}}},compoundVariants:[{theme:"primary",appearance:"solid",css:n("$primary","$primaryMid","$primaryDark")},{theme:"secondary",appearance:"solid",css:n("$primaryDark",i(l.colors.primaryDark.value,.1),i(l.colors.primaryDark.value,.15))},{theme:"success",appearance:"solid",css:n("$success","$successMid","$successDark")},{theme:"warning",appearance:"solid",css:n("$warning","$warningMid","$warningDark","$tonal500")},{theme:"danger",appearance:"solid",css:n("$danger","$dangerMid","$dangerDark")},{theme:"neutral",appearance:"solid",css:n("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",i(l.colors.primaryDark.value,.1),i(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};
|
|
@@ -8,12 +8,15 @@ export declare type CalendarTranslationProps = {
|
|
|
8
8
|
open: string;
|
|
9
9
|
next: string;
|
|
10
10
|
previous: string;
|
|
11
|
+
nextYear: string;
|
|
12
|
+
previousYear: string;
|
|
11
13
|
};
|
|
12
14
|
};
|
|
13
15
|
declare type CalendarProps = DayzedInterface & CalendarTranslationProps & {
|
|
14
16
|
css?: CSS;
|
|
15
17
|
refDateToday?: React.RefObject<HTMLButtonElement>;
|
|
16
18
|
refDateSelected?: React.RefObject<HTMLButtonElement>;
|
|
19
|
+
setYear: (date: Date) => Promise<void>;
|
|
17
20
|
};
|
|
18
21
|
export declare const Calendar: React.FC<CalendarProps>;
|
|
19
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as
|
|
1
|
+
import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as h}from"../box/Box.js";import{Flex as C}from"../flex/Flex.js";import{Icon as Y}from"../icon/Icon.js";import{Text as K}from"../text/Text.js";import{Button as w}from"../button/Button.js";import{styled as F}from"../../stitches.js";import{monthNamesShort as Q,weekdayNamesShort as V,DEFAULT_LABELS as X}from"./constants.js";import{Day as Z}from"./Day.js";const g=F("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),ee=F(w,{color:"$tonal600",p:"$3",width:"$6",variants:{selected:{false:{color:"$tonal600 !important",fontWeight:"400","&:hover":{bg:"$tonal100 !important",color:"$tonal600 !important"},"&[disabled]":{bg:"white !important"}}}}}),te=(i,c)=>{const u=i.slice(0,c);return i.slice(c).concat(u)},S=({css:i,refDateSelected:c,refDateToday:u,firstDayOfWeek:f=0,monthNames:N=Q,weekdayNames:T=V,labels:y=X,date:o=new Date,minDate:l,maxDate:s,setYear:A,...L})=>{const[a,E]=e.useState(!1),[m,k]=e.useState(o==null?void 0:o.getFullYear()),O=t=>{const r=o;r.setFullYear(t),A(r),E(!1)},W=l&&m-16<=l.getFullYear(),z=s&&m>=s.getFullYear(),B=Array.from({length:16},(t,r)=>{const n=m-r;return s&&n>s.getFullYear()||l&&n<l.getFullYear()?0:n}),{calendars:d,getBackProps:I,getForwardProps:M,getDateProps:G}=J({firstDayOfWeek:f,showOutsideDays:!0,date:o,minDate:l,maxDate:s,...L});return d.length?e.createElement(h,{css:{position:"relative",width:"min-content",mt:"-$1",...i}},e.createElement(C,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(x,{label:y[a?"previousYear":"previous"],theme:"neutral",size:"md",...!a&&I({calendars:d}),...a&&{onClick:()=>k(m-16)},disabled:a&&W},e.createElement(Y,{is:q})),e.createElement(x,{label:y[a?"nextYear":"next"],theme:"neutral",size:"md",...!a&&M({calendars:d}),...a&&{onClick:()=>k(m+16)},disabled:a&&z},e.createElement(Y,{is:H}))),a&&e.createElement(g,{css:{gridTemplateColumns:"repeat(4, 1fr)",pt:"$7",direction:"rtl",gridGap:"$3 $1"}},B.map((t,r)=>{const n=t===o.getFullYear();return t?e.createElement(ee,{key:`${t}${r}`,theme:n?"primary":"neutral",isRounded:!0,onClick:()=>O(t),selected:n},t):e.createElement(h,{key:r,css:{width:"$6",height:"$4"}})})),!a&&d.map(({month:t,year:r,weeks:n})=>e.createElement(h,{key:`${t}${r}`},e.createElement(C,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(w,{theme:"neutral",css:{px:"0",color:"$tonal600"},onClick:()=>E(!0)},N[t]," ",r)),e.createElement(g,{css:{mb:"$3"}},te(T,f).map(p=>e.createElement(K,{as:"span",size:"sm",key:`${t}${r}${p}`,css:{fontWeight:600,textAlign:"center"}},p))),e.createElement(g,null,n.map((p,P)=>p.map(($,R)=>{const D=`${t}${r}${P}${R}`;if(!$)return e.createElement("div",{key:D});const{date:j,selected:b,today:v,prevMonth:U,nextMonth:_}=$;return e.createElement(Z,{isOutsideMonth:U||_,isSelected:b,isToday:v,key:D,ref:b?c:v?u:null,...G({dateObj:$}),type:"button"},j.getDate())})))))):null};S.displayName="Calendar";export{S as Calendar};
|
|
@@ -62,7 +62,6 @@ export declare const Day: import("@stitches/react/types/styled-component").Style
|
|
|
62
62
|
warning: any;
|
|
63
63
|
warningMid: any;
|
|
64
64
|
warningDark: any;
|
|
65
|
-
warningText: any;
|
|
66
65
|
subjectEnglish: any;
|
|
67
66
|
subjectMaths: any;
|
|
68
67
|
subjectScience: any;
|
|
@@ -82,7 +81,6 @@ export declare const Day: import("@stitches/react/types/styled-component").Style
|
|
|
82
81
|
"7": any;
|
|
83
82
|
"8": any;
|
|
84
83
|
"9": any;
|
|
85
|
-
"10": any;
|
|
86
84
|
};
|
|
87
85
|
fontSizes: {
|
|
88
86
|
xs: any;
|
|
@@ -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"],r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o={open:"Open calendar",next:"Next month",previous:"Previous month",nextYear:"Next year",previousYear:"Previous year"};export{o as DEFAULT_LABELS,e as monthNamesShort,r as weekdayNamesShort};
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -59,7 +59,6 @@ export declare const CarouselPagination: import("@stitches/react/types/styled-co
|
|
|
59
59
|
warning: any;
|
|
60
60
|
warningMid: any;
|
|
61
61
|
warningDark: any;
|
|
62
|
-
warningText: any;
|
|
63
62
|
subjectEnglish: any;
|
|
64
63
|
subjectMaths: any;
|
|
65
64
|
subjectScience: any;
|
|
@@ -79,7 +78,6 @@ export declare const CarouselPagination: import("@stitches/react/types/styled-co
|
|
|
79
78
|
"7": any;
|
|
80
79
|
"8": any;
|
|
81
80
|
"9": any;
|
|
82
|
-
"10": any;
|
|
83
81
|
};
|
|
84
82
|
fontSizes: {
|
|
85
83
|
xs: any;
|
|
@@ -59,7 +59,6 @@ declare const StyledSlide: import("@stitches/react/types/styled-component").Styl
|
|
|
59
59
|
warning: any;
|
|
60
60
|
warningMid: any;
|
|
61
61
|
warningDark: any;
|
|
62
|
-
warningText: any;
|
|
63
62
|
subjectEnglish: any;
|
|
64
63
|
subjectMaths: any;
|
|
65
64
|
subjectScience: any;
|
|
@@ -79,7 +78,6 @@ declare const StyledSlide: import("@stitches/react/types/styled-component").Styl
|
|
|
79
78
|
"7": any;
|
|
80
79
|
"8": any;
|
|
81
80
|
"9": any;
|
|
82
|
-
"10": any;
|
|
83
81
|
};
|
|
84
82
|
fontSizes: {
|
|
85
83
|
xs: any;
|
|
@@ -61,7 +61,6 @@ export declare const CarouselSlider: import("@stitches/react/types/styled-compon
|
|
|
61
61
|
warning: any;
|
|
62
62
|
warningMid: any;
|
|
63
63
|
warningDark: any;
|
|
64
|
-
warningText: any;
|
|
65
64
|
subjectEnglish: any;
|
|
66
65
|
subjectMaths: any;
|
|
67
66
|
subjectScience: any;
|
|
@@ -81,7 +80,6 @@ export declare const CarouselSlider: import("@stitches/react/types/styled-compon
|
|
|
81
80
|
"7": any;
|
|
82
81
|
"8": any;
|
|
83
82
|
"9": any;
|
|
84
|
-
"10": any;
|
|
85
83
|
};
|
|
86
84
|
fontSizes: {
|
|
87
85
|
xs: any;
|
|
@@ -62,7 +62,6 @@ declare const StyledCheckbox: import("@stitches/react/types/styled-component").S
|
|
|
62
62
|
warning: any;
|
|
63
63
|
warningMid: any;
|
|
64
64
|
warningDark: any;
|
|
65
|
-
warningText: any;
|
|
66
65
|
subjectEnglish: any;
|
|
67
66
|
subjectMaths: any;
|
|
68
67
|
subjectScience: any;
|
|
@@ -82,7 +81,6 @@ declare const StyledCheckbox: import("@stitches/react/types/styled-component").S
|
|
|
82
81
|
"7": any;
|
|
83
82
|
"8": any;
|
|
84
83
|
"9": any;
|
|
85
|
-
"10": any;
|
|
86
84
|
};
|
|
87
85
|
fontSizes: {
|
|
88
86
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Minus as i,Ok as l}from"@atom-learning/icons";import*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};
|
|
@@ -64,7 +64,6 @@ declare const StyledCombobox: import("@stitches/react/types/styled-component").S
|
|
|
64
64
|
warning: any;
|
|
65
65
|
warningMid: any;
|
|
66
66
|
warningDark: any;
|
|
67
|
-
warningText: any;
|
|
68
67
|
subjectEnglish: any;
|
|
69
68
|
subjectMaths: any;
|
|
70
69
|
subjectScience: any;
|
|
@@ -84,7 +83,6 @@ declare const StyledCombobox: import("@stitches/react/types/styled-component").S
|
|
|
84
83
|
"7": any;
|
|
85
84
|
"8": any;
|
|
86
85
|
"9": any;
|
|
87
|
-
"10": any;
|
|
88
86
|
};
|
|
89
87
|
fontSizes: {
|
|
90
88
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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};
|
|
@@ -60,7 +60,6 @@ export declare const ComboboxInput: import("@stitches/react/types/styled-compone
|
|
|
60
60
|
warning: any;
|
|
61
61
|
warningMid: any;
|
|
62
62
|
warningDark: any;
|
|
63
|
-
warningText: any;
|
|
64
63
|
subjectEnglish: any;
|
|
65
64
|
subjectMaths: any;
|
|
66
65
|
subjectScience: any;
|
|
@@ -80,7 +79,6 @@ export declare const ComboboxInput: import("@stitches/react/types/styled-compone
|
|
|
80
79
|
"7": any;
|
|
81
80
|
"8": any;
|
|
82
81
|
"9": any;
|
|
83
|
-
"10": any;
|
|
84
82
|
};
|
|
85
83
|
fontSizes: {
|
|
86
84
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ComboboxInput as o}from"@reach/combobox";import{styled as r,theme as e}from"../../stitches.js";import{encodeBackgroundIcon as a}from"../../utilities/style/encode-background-icon.js";const t=r(o,{boxShadow:"none",fontSize:"$md",appearance:"none",backgroundImage:a(e.colors.tonal300.value,"chevron"),backgroundPosition:"right $space$3 top 50%, 0 0",backgroundRepeat:"no-repeat, repeat",backgroundSize:"20px auto, 100%",border:"1px solid $tonal300",borderRadius:"$0",boxSizing:"border-box",color:"$tonal600",cursor:"text",display:"block",fontFamily:"$body",height:"$4",pl:"$3",pr:"$
|
|
1
|
+
import{ComboboxInput as o}from"@reach/combobox";import{styled as r,theme as e}from"../../stitches.js";import{encodeBackgroundIcon as a}from"../../utilities/style/encode-background-icon.js";const t=r(o,{boxShadow:"none",fontSize:"$md",appearance:"none",backgroundImage:a(e.colors.tonal300.value,"chevron"),backgroundPosition:"right $space$3 top 50%, 0 0",backgroundRepeat:"no-repeat, repeat",backgroundSize:"20px auto, 100%",border:"1px solid $tonal300",borderRadius:"$0",boxSizing:"border-box",color:"$tonal600",cursor:"text",display:"block",fontFamily:"$body",height:"$4",pl:"$3",pr:"$6",transition:"all 100ms ease-out",width:"100%","&::placeholder":{color:"$tonal300",opacity:1},"&:focus-within":{borderColor:"$primary",outline:"none"},"&[disabled]":{backgroundColor:"$tonal100",color:"$tonal400",cursor:"not-allowed"},variants:{state:{error:{border:"1px solid $danger"}}}});export{t as ComboboxInput};
|
|
@@ -58,7 +58,6 @@ export declare const ComboboxList: import("@stitches/react/types/styled-componen
|
|
|
58
58
|
warning: any;
|
|
59
59
|
warningMid: any;
|
|
60
60
|
warningDark: any;
|
|
61
|
-
warningText: any;
|
|
62
61
|
subjectEnglish: any;
|
|
63
62
|
subjectMaths: any;
|
|
64
63
|
subjectScience: any;
|
|
@@ -78,7 +77,6 @@ export declare const ComboboxList: import("@stitches/react/types/styled-componen
|
|
|
78
77
|
"7": any;
|
|
79
78
|
"8": any;
|
|
80
79
|
"9": any;
|
|
81
|
-
"10": any;
|
|
82
80
|
};
|
|
83
81
|
fontSizes: {
|
|
84
82
|
xs: any;
|
|
@@ -58,7 +58,6 @@ export declare const ComboboxOption: import("@stitches/react/types/styled-compon
|
|
|
58
58
|
warning: any;
|
|
59
59
|
warningMid: any;
|
|
60
60
|
warningDark: any;
|
|
61
|
-
warningText: any;
|
|
62
61
|
subjectEnglish: any;
|
|
63
62
|
subjectMaths: any;
|
|
64
63
|
subjectScience: any;
|
|
@@ -78,7 +77,6 @@ export declare const ComboboxOption: import("@stitches/react/types/styled-compon
|
|
|
78
77
|
"7": any;
|
|
79
78
|
"8": any;
|
|
80
79
|
"9": any;
|
|
81
|
-
"10": any;
|
|
82
80
|
};
|
|
83
81
|
fontSizes: {
|
|
84
82
|
xs: any;
|
|
@@ -58,7 +58,6 @@ export declare const ComboboxPopover: import("@stitches/react/types/styled-compo
|
|
|
58
58
|
warning: any;
|
|
59
59
|
warningMid: any;
|
|
60
60
|
warningDark: any;
|
|
61
|
-
warningText: any;
|
|
62
61
|
subjectEnglish: any;
|
|
63
62
|
subjectMaths: any;
|
|
64
63
|
subjectScience: any;
|
|
@@ -78,7 +77,6 @@ export declare const ComboboxPopover: import("@stitches/react/types/styled-compo
|
|
|
78
77
|
"7": any;
|
|
79
78
|
"8": any;
|
|
80
79
|
"9": any;
|
|
81
|
-
"10": any;
|
|
82
80
|
};
|
|
83
81
|
fontSizes: {
|
|
84
82
|
xs: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CalendarEvent as N}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as
|
|
1
|
+
import{CalendarEvent as N}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as O}from"../action-icon/ActionIcon.js";import{Box as S}from"../box/Box.js";import{Calendar as k}from"../calendar/Calendar.js";import{DEFAULT_LABELS as x}from"../calendar/constants.js";import{Icon as z}from"../icon/Icon.js";import{Input as L}from"../input/Input.js";import{Popover as m}from"../popover/Popover.js";import{DEFAULT_DATE_FORMAT as R}from"./constants.js";import{useDate as B}from"./use-date.js";const D=e.forwardRef(({initialDate:E,dateFormat:g=R,firstDayOfWeek:h=1,disabled:s,monthNames:C,weekdayNames:b,size:l="md",labels:v,revalidate:o,onChange:n,minDate:y,maxDate:w,...A},T)=>{const{date:a,dateString:F,setDate:r}=B(E,g),i={...x,...v},[I,d]=e.useState(!1),f=e.useRef(null),c=e.useRef(null);return e.useEffect(()=>{n==null||n(a)},[a,n]),e.createElement(S,{css:{position:"relative"}},e.createElement(L,{name:"date",disabled:s,size:l,...A,onChange:t=>r(t.target.value,!0),value:F,ref:T}),e.createElement(m,{modal:!0,open:I,onOpenChange:d},e.createElement(m.Trigger,{asChild:!0},e.createElement(O,{css:{position:"absolute",top:"0",right:"0"},disabled:s,label:i.open,size:l,theme:"neutral"},e.createElement(z,{is:N}))),e.createElement(m.Content,{css:{pr:"$sizes$2"},side:"bottom",align:"end",showCloseButton:!1,onOpenAutoFocus:t=>{var p,u;t.preventDefault(),a?(p=c.current)==null||p.focus():(u=f.current)==null||u.focus()}},e.createElement(k,{date:a||new Date,selected:a,onDateSelected:async t=>{d(!1),await r(t.date,!1),o&&o()},setYear:async t=>{await r(t,!1),o&&o()},minDate:y,maxDate:w,refDateToday:f,refDateSelected:c,firstDayOfWeek:h,monthNames:C,weekdayNames:b,labels:i}))))});D.displayName="DateInput";export{D as DateInput};
|