@atom-learning/components 2.28.1-beta.0 → 2.28.2
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/{lib/src/components → components}/accordion/Accordion.js +0 -0
- package/dist/components/accordion/AccordionContent.js +1 -0
- package/dist/components/accordion/AccordionItem.js +1 -0
- package/dist/components/accordion/AccordionTrigger.d.ts +4 -5
- package/dist/components/accordion/AccordionTrigger.js +1 -0
- package/dist/{lib/src/components → components}/action-icon/ActionIcon.constants.js +0 -0
- package/dist/{lib/src/components → components}/action-icon/ActionIcon.js +0 -0
- package/dist/{lib/src/components → components}/alert-dialog/AlertDialog.js +0 -0
- package/dist/{lib/src/components → components}/alert-dialog/AlertDialogContent.js +1 -1
- package/dist/{lib/src/components → components}/alert-dialog/alert-context/AlertContext.js +0 -0
- package/dist/{lib/src/components → components}/alert-dialog/alert-context/AlertDialog.js +0 -0
- package/dist/{lib/src/components → components}/alert-dialog/alert-context/reducer.js +0 -0
- package/dist/{lib/src/components → components}/avatar/Avatar.js +1 -1
- package/dist/{lib/src/components → components}/avatar/AvatarIcon.js +0 -0
- package/dist/{lib/src/components → components}/avatar/AvatarImage.js +0 -0
- package/dist/{lib/src/components → components}/avatar/AvatarInitial.js +0 -0
- package/dist/{lib/src/components → components}/avatar/AvatarPlaceholder.js +0 -0
- package/dist/{lib/src/components → components}/badge/Badge.js +0 -0
- package/dist/{lib/src/components → components}/box/Box.js +0 -0
- package/dist/{lib/src/components → components}/button/Button.js +1 -1
- package/dist/{lib/src/components → components}/calendar/Calendar.js +1 -1
- package/dist/{lib/src/components → components}/calendar/Day.js +0 -0
- package/dist/{lib/src/components → components}/calendar/constants.js +0 -0
- package/dist/{lib/src/components → components}/carousel/Carousel.js +0 -0
- package/dist/{lib/src/components → components}/carousel/CarouselArrows.js +1 -1
- package/dist/{lib/src/components → components}/carousel/CarouselPagination.js +0 -0
- package/dist/components/carousel/CarouselSlide.js +1 -0
- package/dist/{lib/src/components → components}/carousel/CarouselSlider.js +0 -0
- package/dist/{lib/src/components → components}/checkbox/Checkbox.js +0 -0
- package/dist/{lib/src/components → components}/checkbox-field/CheckboxField.js +1 -1
- package/dist/{lib/src/components → components}/chip/Chip.js +1 -1
- package/dist/components/chip/ChipGroup.js +1 -0
- package/dist/{lib/src/components → components}/chip-dismissible-group/ChipDismissibleGroupItem.js +0 -0
- package/dist/{lib/src/components → components}/chip-dismissible-group/ChipDismissibleGroupRoot.js +1 -1
- package/dist/{lib/src/components → components}/chip-dismissible-group/index.js +0 -0
- package/dist/{lib/src/components → components}/chip-toggle-group/ChipToggleGroupItem.js +0 -0
- package/dist/{lib/src/components → components}/chip-toggle-group/ChipToggleGroupRoot.js +0 -0
- package/dist/{lib/src/components → components}/chip-toggle-group/index.js +0 -0
- package/dist/{lib/src/components → components}/combobox/Combobox.js +0 -0
- package/dist/{lib/src/components → components}/combobox/ComboboxInput.js +0 -0
- package/dist/{lib/src/components → components}/combobox/ComboboxList.js +0 -0
- package/dist/{lib/src/components → components}/combobox/ComboboxOption.js +0 -0
- package/dist/{lib/src/components → components}/combobox/ComboboxPopover.js +0 -0
- package/dist/components/data-table/DataTable.js +1 -0
- package/dist/{lib/src/components → components}/data-table/DataTable.types.js +0 -0
- package/dist/components/data-table/DataTableBody.js +1 -0
- package/dist/{lib/src/components → components}/data-table/DataTableContext.js +0 -0
- package/dist/components/data-table/DataTableDataCell.js +1 -0
- package/dist/{lib/src/components → components}/data-table/DataTableError.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableGlobalFilter.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableHead.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableHeaderCell.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableLoading.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableRow.js +1 -1
- package/dist/{lib/src/components → components}/data-table/DataTableTable.js +0 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropContainer.d.ts +3 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropContainer.js +1 -0
- package/dist/{lib/src/components → components}/data-table/drag-and-drop/DragAndDropTable.js +0 -0
- package/dist/{lib/src/components → components}/data-table/drag-and-drop/DragAndDropTableBody.js +0 -0
- package/dist/components/data-table/drag-and-drop/DraggableRow.js +1 -0
- package/dist/{lib/src/components → components}/data-table/drag-and-drop/Handle.js +1 -1
- package/dist/components/data-table/drag-and-drop/index.d.ts +1 -1
- package/dist/{lib/src/components → components}/data-table/getNewAsyncData.js +0 -0
- package/dist/{lib/src/components → components}/data-table/pagination/Pagination.js +0 -0
- package/dist/{lib/src/components → components}/data-table/pagination/PaginationButtons.js +0 -0
- package/dist/{lib/src/components → components}/data-table/usePagination.js +0 -0
- package/dist/{lib/src/components → components}/data-table/useSorting.js +0 -0
- package/dist/{lib/src/components → components}/date-field/DateField.js +0 -0
- package/dist/{lib/src/components → components}/date-input/DateInput.js +0 -0
- package/dist/{lib/src/components → components}/date-input/constants.js +0 -0
- package/dist/{lib/src/components → components}/date-input/use-date.js +0 -0
- package/dist/{lib/src/components → components}/dialog/Dialog.js +0 -0
- package/dist/{lib/src/components → components}/dialog/DialogBackground.js +0 -0
- package/dist/{lib/src/components → components}/dialog/DialogClose.js +0 -0
- package/dist/{lib/src/components → components}/dialog/DialogContent.js +1 -1
- package/dist/components/dismissible/DismissibleRoot.js +1 -0
- package/dist/components/dismissible/DismissibleTrigger.js +1 -0
- package/dist/{lib/src/components → components}/dismissible/index.js +0 -0
- package/dist/{lib/src/components → components}/dismissible-group/DismissibleGroupItem.js +0 -0
- package/dist/{lib/src/components → components}/dismissible-group/DismissibleGroupRoot.js +0 -0
- package/dist/{lib/src/components → components}/dismissible-group/index.js +0 -0
- package/dist/{lib/src/components → components}/divider/Divider.js +0 -0
- package/dist/{lib/src/components → components}/dropdown-menu/DropdownMenu.js +0 -0
- package/dist/{lib/src/components → components}/dropdown-menu/DropdownMenuContent.js +0 -0
- package/dist/{lib/src/components → components}/dropdown-menu/DropdownMenuItem.js +0 -0
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -0
- package/dist/{lib/src/components → components}/dropdown-menu/DropdownMenuSeparator.js +0 -0
- package/dist/{lib/src/components → components}/dropdown-menu/DropdownMenuTrigger.js +0 -0
- package/dist/{lib/src/components → components}/empty-state/EmptyState.js +0 -0
- package/dist/{lib/src/components → components}/empty-state/EmptyStateBody.js +0 -0
- package/dist/{lib/src/components → components}/empty-state/EmptyStateImage.js +0 -0
- package/dist/{lib/src/components → components}/empty-state/EmptyStateTitle.js +0 -0
- package/dist/components/field-wrapper/FieldDescription.js +1 -0
- package/dist/{lib/src/components → components}/field-wrapper/FieldWrapper.js +0 -0
- package/dist/{lib/src/components → components}/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/file-input/FileInput.js +1 -0
- package/dist/{lib/src/components → components}/flex/Flex.js +0 -0
- package/dist/{lib/src/components → components}/form/Form.js +0 -0
- package/dist/{lib/src/components → components}/form/Form.types.js +0 -0
- package/dist/{lib/src/components → components}/form/useFieldError.js +0 -0
- package/dist/{lib/src/components → components}/grid/Grid.js +1 -1
- package/dist/{lib/src/components → components}/heading/Heading.js +0 -0
- package/dist/{lib/src/components → components}/icon/Icon.js +1 -1
- package/dist/{lib/src/components → components}/image/Image.js +0 -0
- package/dist/{lib/src/components → components}/inline-message/InlineMessage.config.js +0 -0
- package/dist/{lib/src/components → components}/inline-message/InlineMessage.js +1 -1
- package/dist/{lib/src/components → components}/input/Input.js +0 -0
- package/dist/{lib/src/components → components}/input-field/InputField.js +0 -0
- package/dist/{lib/src/components → components}/label/Label.js +1 -1
- package/dist/{lib/src/components → components}/link/Link.js +1 -1
- package/dist/components/list/List.d.ts +1 -0
- package/dist/components/list/List.js +1 -0
- package/dist/{lib/src/components → components}/loader/Loader.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/MarkdownContent.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownCode.js +0 -0
- package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -0
- package/dist/components/markdown-content/components/MarkdownHeading.js +1 -0
- package/dist/components/markdown-content/components/MarkdownImage.js +1 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownInlineCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.js +1 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownList.js +0 -0
- package/dist/components/markdown-content/components/MarkdownListItem.js +1 -0
- package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -0
- package/dist/components/markdown-content/components/MarkdownStrong.js +1 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownText.js +0 -0
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenu.js +0 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenu.styles.js +0 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenuContext.js +0 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenuDropdown.js +0 -0
- package/dist/components/navigation/NavigationMenuDropdownContent.js +1 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenuDropdownItem.js +0 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenuDropdownTrigger.js +0 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenuLink.js +1 -1
- package/dist/{lib/src/components → components}/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/number-input/NumberInput.js +1 -0
- package/dist/{lib/src/components → components}/number-input/NumberInputStepper.js +0 -0
- package/dist/{lib/src/components → components}/number-input-field/NumberInputField.js +1 -1
- package/dist/{lib/src/components → components}/password-field/PasswordField.js +0 -0
- package/dist/{lib/src/components → components}/password-input/PasswordInput.js +0 -0
- package/dist/{lib/src/components → components}/popover/Popover.js +0 -0
- package/dist/{lib/src/components → components}/popover/PopoverContent.js +1 -1
- package/dist/{lib/src/components → components}/progress-bar/ProgressBar.js +0 -0
- package/dist/{lib/src/components → components}/radio-button/RadioButton.js +1 -1
- package/dist/{lib/src/components → components}/radio-button/RadioButtonGroup.js +0 -0
- package/dist/{lib/src/components → components}/radio-button-field/RadioButtonField.js +1 -1
- package/dist/{lib/src/components → components}/radio-button-field/RadioField.js +1 -1
- package/dist/{lib/src/components → components}/radio-card/RadioCard.js +0 -0
- package/dist/components/radio-card/RadioCardGroup.js +1 -0
- package/dist/{lib/src/components → components}/search-field/SearchField.js +0 -0
- package/dist/{lib/src/components → components}/search-input/SearchInput.js +1 -1
- package/dist/{lib/src/components → components}/select/Select.js +0 -0
- package/dist/components/select-field/SelectField.js +1 -0
- package/dist/{lib/src/components → components}/sidedrawer/Sidedrawer.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/Sidedrawer.styles.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js +1 -1
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerAccordion/SidedrawerAccordionItem.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerAccordion/SidedrawerAccordionRoot.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerAccordion/SidedrawerAccordionTrigger.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerBody.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerClose.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerContent.js +1 -1
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerFooter.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerHeader.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerItem.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerOverlay.js +0 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerTrigger.js +0 -0
- package/dist/{lib/src/components → components}/slider/Slider.js +0 -0
- package/dist/{lib/src/components → components}/slider/SliderSteps.js +0 -0
- package/dist/{lib/src/components → components}/slider/SliderValue.js +0 -0
- package/dist/{lib/src/components → components}/slider-field/SliderField.js +1 -1
- package/dist/{lib/src/components → components}/stack/Stack.js +0 -0
- package/dist/{lib/src/components → components}/stack-content/StackContent.js +1 -1
- package/dist/{lib/src/components → components}/stepper/Stepper.js +0 -0
- package/dist/{lib/src/components → components}/stepper/StepperStepBack.js +1 -1
- package/dist/{lib/src/components → components}/stepper/StepperStepBullet.js +0 -0
- package/dist/{lib/src/components → components}/stepper/StepperStepContainer.js +0 -0
- package/dist/{lib/src/components → components}/stepper/StepperStepForward.js +0 -0
- package/dist/{lib/src/components → components}/stepper/StepperStepLabel.js +0 -0
- package/dist/{lib/src/components → components}/stepper/StepperSteps.js +0 -0
- package/dist/{lib/src/components → components}/stepper/stepper-context/StepperContext.js +0 -0
- package/dist/{lib/src/components → components}/stepper/types.js +0 -0
- package/dist/{lib/src/components → components}/switch/Switch.js +0 -0
- package/dist/{lib/src/components → components}/table/Table.js +0 -0
- package/dist/{lib/src/components → components}/table/TableBody.js +0 -0
- package/dist/{lib/src/components → components}/table/TableCell.js +0 -0
- package/dist/{lib/src/components → components}/table/TableFooter.js +0 -0
- package/dist/{lib/src/components → components}/table/TableFooterCell.js +0 -0
- package/dist/{lib/src/components → components}/table/TableHeader.js +1 -1
- package/dist/{lib/src/components → components}/table/TableHeaderCell.js +0 -0
- package/dist/components/table/TableRow.js +1 -0
- package/dist/components/tabs/{TabsTrigger.d.ts → TabTrigger.d.ts} +6 -3
- package/dist/components/tabs/TabTrigger.js +1 -0
- package/dist/components/tabs/Tabs.d.ts +276 -7
- package/dist/components/tabs/Tabs.js +1 -0
- package/dist/components/tabs/TabsTriggerList.d.ts +9 -5
- package/dist/components/tabs/TabsTriggerList.js +1 -0
- package/dist/components/tabs/utils.d.ts +2 -0
- package/dist/components/tabs/utils.js +1 -0
- package/dist/{lib/src/components → components}/text/Text.js +0 -0
- package/dist/{lib/src/components → components}/textarea/Textarea.js +0 -0
- package/dist/{lib/src/components → components}/textarea-field/TextareaField.js +0 -0
- package/dist/{lib/src/components → components}/toast/Toast.js +1 -1
- package/dist/{lib/src/components → components}/toast/ToastProvider.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -0
- package/dist/{lib/src/components → components}/toggle-group/ToggleGroupItem.js +0 -0
- package/dist/{lib/src/components → components}/toggle-group/ToggleGroupRoot.js +0 -0
- package/dist/{lib/src/components → components}/toggle-group/index.js +0 -0
- package/dist/{lib/src/components → components}/tooltip/Tooltip.js +0 -0
- package/dist/{lib/src/components → components}/tooltip/TooltipContent.js +1 -1
- package/dist/{lib/src/components → components}/top-bar/TopBar.js +0 -0
- package/dist/{lib/src/components → components}/top-bar/TopBarActionIcon.js +0 -0
- package/dist/{lib/src/components → components}/top-bar/TopBarBrand.js +0 -0
- package/dist/{lib/src/components → components}/video/Video.js +1 -1
- package/dist/{lib/src/constants → constants}/zIndices.js +0 -0
- package/dist/docgen.json +1 -1
- package/dist/docs/Accordion.mdx +7 -56
- package/dist/docs/Tabs.mdx +57 -31
- package/dist/index.cjs.js +1 -1
- package/dist/{lib/src/index.js → index.js} +0 -0
- package/dist/{lib/src/stitches.js → stitches.js} +0 -0
- package/dist/{lib/src/utilities → utilities}/create-theme-variants/createThemeVariants.js +0 -0
- package/dist/{lib/src/utilities → utilities}/css-wrapper/CSSWrapper.js +0 -0
- package/dist/utilities/hooks/useCallbackRef.js +1 -0
- package/dist/{lib/src/utilities → utilities}/hooks/useIsMountedRef.js +0 -0
- package/dist/{lib/src/utilities → utilities}/hooks/useScrollPosition.js +0 -0
- package/dist/{lib/src/utilities → utilities}/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js +0 -0
- package/dist/{lib/src/utilities → utilities}/override-stitches-variant-value/overrideStitchesVariantValue.js +0 -0
- package/dist/{lib/src/utilities → utilities}/style/capsize.js +0 -0
- package/dist/{lib/src/utilities → utilities}/style/encode-background-icon.js +0 -0
- package/dist/{lib/src/utilities → utilities}/style/focus-visible-style-block.js +0 -0
- package/dist/{lib/src/utilities → utilities}/style/keyframe-animations.js +0 -0
- package/package.json +5 -6
- package/dist/color-scheme/dist/ColorScheme.js +0 -1
- package/dist/color-scheme/dist/blue.json.js +0 -1
- package/dist/color-scheme/dist/generateAlphaColors.js +0 -1
- package/dist/color-scheme/dist/slate.json.js +0 -1
- package/dist/color-scheme/dist/stitches.colorscheme.config.js +0 -1
- package/dist/components/tabs/TabsContent.d.ts +0 -267
- package/dist/lib/src/components/accordion/AccordionContent.js +0 -1
- package/dist/lib/src/components/accordion/AccordionItem.js +0 -1
- package/dist/lib/src/components/accordion/AccordionTrigger.js +0 -1
- package/dist/lib/src/components/carousel/CarouselSlide.js +0 -1
- package/dist/lib/src/components/chip/ChipGroup.js +0 -1
- package/dist/lib/src/components/data-table/DataTable.js +0 -1
- package/dist/lib/src/components/data-table/DataTableBody.js +0 -1
- package/dist/lib/src/components/data-table/DataTableDataCell.js +0 -1
- package/dist/lib/src/components/data-table/drag-and-drop/DragAndDropContainer.js +0 -1
- package/dist/lib/src/components/data-table/drag-and-drop/DraggableRow.js +0 -1
- package/dist/lib/src/components/dismissible/DismissibleRoot.js +0 -1
- package/dist/lib/src/components/dismissible/DismissibleTrigger.js +0 -1
- package/dist/lib/src/components/dropdown-menu/DropdownMenuLinkItem.js +0 -1
- package/dist/lib/src/components/field-wrapper/FieldDescription.js +0 -1
- package/dist/lib/src/components/file-input/FileInput.js +0 -1
- package/dist/lib/src/components/list/List.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownEmphasis.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownHeading.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownImage.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownLink.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownListItem.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownParagraph.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownStrong.js +0 -1
- package/dist/lib/src/components/markdown-content/components/MarkdownThematicBreak.js +0 -1
- package/dist/lib/src/components/navigation/NavigationMenuDropdownContent.js +0 -1
- package/dist/lib/src/components/number-input/NumberInput.js +0 -1
- package/dist/lib/src/components/radio-card/RadioCardGroup.js +0 -1
- package/dist/lib/src/components/select-field/SelectField.js +0 -1
- package/dist/lib/src/components/table/TableRow.js +0 -1
- package/dist/lib/src/components/tabs/Tabs.js +0 -1
- package/dist/lib/src/components/tabs/TabsContent.js +0 -1
- package/dist/lib/src/components/tabs/TabsTrigger.js +0 -1
- package/dist/lib/src/components/tabs/TabsTriggerList.js +0 -1
- package/dist/lib/src/components/toggle-group/ToggleGroupButton.js +0 -1
- package/dist/lib/src/utilities/hooks/useCallbackRef.js +0 -1
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as r from"@radix-ui/react-navigation-menu";import t from"react";import{styled as e}from"../../stitches.js";const i=e("ul",{listStyle:"none",m:0,p:0}),l=e(r.Content,{p:"$3",bg:"white",mt:"4px",boxShadow:"$1",borderRadius:"$1"}),o=({children:n})=>t.createElement(l,null,t.createElement(i,null,n));o.displayName="NavigationMenuDropdownContent";export{o as NavigationMenuDropdownContent};
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"@radix-ui/react-navigation-menu";import e from"react";import{styled as t}from"../../stitches.js";import{navigationMenuBaseItemStyles as o,navigationMenuDisabledItemStyles as p,navigationMenuActiveItemStyles as v}from"./NavigationMenu.styles.js";const u=t("button",{...o,...p}),y=t(n.Item),f=t(n.Link,o,{display:"block",textDecoration:"none",lineHeight:1,variants:{elementType:{dropdownItem:{"&[data-active]":{background:"$primaryLight",color:"$primary","*":{color:"$primary"},"&:hover":{background:"$tonal50"},"&:active":{background:"$tonal100"},"&:focus-visible":{boxShadow:"0 0 0 2px $colors$primary"}}},link:{"&[data-active]":{...v}}}}}),r=e.forwardRef(({children:a,href:l,disabled:m,css:s,variant:c="link",...i},d)=>e.createElement(y,null,m?e.createElement(u,{disabled:!0,...i},a):e.createElement(f,{href:l,ref:d,elementType:c,css:s,...i},a)));r.displayName="NavigationMenuLink";export{r as NavigationMenuLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{styled as o}from"../../stitches.js";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";const l=o(i,{position:"relative"}),a=o(n,{fontFamily:"$body",fontSize:"$sm",flexDirection:"column",justifyContent:"center",position:"absolute",top:"0",right:"0",transform:"translate(calc($sizes$2 / 2), -50%)",borderRadius:"$round",p:"$2",height:"$2",minWidth:"$2",textAlign:"center",color:"#fff",bg:"$primary"}),m=({value:t,children:r})=>e.createElement(l,null,!!t&&e.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Minus as B,Plus as $}from"@atom-learning/icons";import*as t from"react";import{Flex as F}from"../flex/Flex.js";import{Input as H}from"../input/Input.js";import{NumberInputStepper as x}from"./NumberInputStepper.js";const N=t.forwardRef((g,k)=>{const{name:E,min:o=0,max:l=Number.MAX_SAFE_INTEGER,step:s=1,initialValue:y=0,disabled:u=!1,readonly:m=!1,size:v="md",onChange:C,stepperButtonLabels:T,disabledTooltipContent:A,css:I,...L}=g,[r,M]=t.useState(y),i=t.useRef(null);t.useImperativeHandle(k,()=>i.current);const w={increment:"increment",decrement:"decrement",...T},R={decrement:`Cannot enter values below ${o}`,increment:`Cannot enter values above ${l}`,...A},d=r>=l,c=r<=o,p=t.useCallback(e=>Math.min(Math.max(e,o),l),[l,o]),a=t.useCallback(e=>{M(e),C==null||C(Number(e))},[C]),z=t.useCallback(e=>{const n=e.target.value.replace(/\D/g,"");a(n)},[a]),b=t.useCallback(()=>{var e;if(d||m)return;(e=i==null?void 0:i.current)==null||e.focus();let n;r===""?n=s:n=Number(r)+s,a(p(n))},[p,d,m,s,a,r]),f=t.useCallback(()=>{var e;if(c||m)return;(e=i==null?void 0:i.current)==null||e.focus();let n;r===""?n=o:n=Number(r)-s,a(p(n))},[p,c,m,o,s,a,r]),D=t.useCallback(e=>{if(e.nativeEvent.isComposing)return;const n=e.key,h={ArrowUp:b,ArrowRight:b,ArrowDown:f,ArrowLeft:f,Home:()=>a(o),End:()=>a(l)}[n];h&&(e.preventDefault(),h(e))},[b,f,a,o,l]),S={name:E,type:"number",value:r,...L,onChange:z,onKeyDown:D,size:v,css:{borderRadius:"0px",width:"$6","&:disabled":{opacity:.3,pointerEvents:"none"}},ref:i,readOnly:m,disabled:u,"aria-valuemin":o,"aria-valuemax":l,"aria-valuenow":Number(r),role:"spinbutton"};return t.createElement(F,{css:I},t.createElement(x,{onClick:f,icon:B,css:{borderRight:"none",borderTopRightRadius:"0px",borderBottomRightRadius:"0px"},size:v,disabled:c||u,showTooltip:c&&!u,disabledTooltipContent:R.decrement,label:w.decrement}),t.createElement(H,{...S}),t.createElement(x,{onClick:b,icon:$,css:{borderLeft:"none",borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px"},size:v,disabled:d||u,showTooltip:d&&!u,disabledTooltipContent:R.increment,label:w.increment}))});N.displayName="NumberInput";export{N as NumberInput};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{useFormContext as c}from"react-hook-form";import{FieldWrapper as f}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{NumberInput as F}from"../number-input/NumberInput.js";const m=({css:p,label:n,name:r,validation:e,prompt:a,description:l,...d})=>{const{register:
|
|
1
|
+
import*as i from"react";import{useFormContext as c}from"react-hook-form";import{FieldWrapper as f}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{NumberInput as F}from"../number-input/NumberInput.js";const m=({css:p,label:n,name:r,validation:e,prompt:a,description:l,...d})=>{const{register:t,trigger:s}=c(),{error:o}=b(r),u=e?t(e):t;return i.createElement(f,{css:p,description:l,error:o,fieldId:r,label:n,prompt:a,required:Boolean(e==null?void 0:e.required)},i.createElement(F,{id:r,name:r,ref:u,...o&&{state:"error","aria-invalid":!0},...d,onChange:s}))};m.displayName="NumberInputField";export{m as NumberInputField};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{POPOVER_Z_INDEX as c}from"../../constants/zIndices.js";import{styled as t}from"../../stitches.js";import{ActionIcon as f}from"../action-icon/ActionIcon.js";import{Icon as
|
|
1
|
+
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{POPOVER_Z_INDEX as c}from"../../constants/zIndices.js";import{styled as t}from"../../stitches.js";import{ActionIcon as f}from"../action-icon/ActionIcon.js";import{Icon as x}from"../icon/Icon.js";import{slideDownAndFade as $,slideLeftAndFade as g,slideUpAndFade as w,slideRightAndFade as z}from"../../utilities/style/keyframe-animations.js";const b=t(l,{bg:"white",borderRadius:"$1",boxShadow:"$2",maxWidth:"90vw",p:"$sizes$2",pr:"$6",position:"relative",zIndex:c,"@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:$},'&[data-side="right"]':{animationName:g},'&[data-side="bottom"]':{animationName:w},'&[data-side="left"]':{animationName:z}}},variants:{size:{sm:{maxWidth:"200px"},md:{maxWidth:"400px"},lg:{maxWidth:"600px"}}}}),C=t(p,{fill:"white",zIndex:1,'[data-align="end"] &':{mr:"$sizes$2"},'[data-align="start"] &':{ml:"$sizes$2"}}),u=({children:i,side:o="top",sideOffset:a=8,closePopoverText:s="Close popover",showCloseButton:n=!0,size:m="md",...d})=>e.createElement(b,{size:m,side:o,sideOffset:a,...d},n&&e.createElement(f,{as:h,css:{position:"absolute",right:"$0",top:"$0"},label:s,size:"md",theme:"neutral"},e.createElement(x,{is:r})),i,e.createElement(C,{width:16,height:8}));export{u as PopoverContent};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"@radix-ui/react-radio-group";import*as r from"react";import{styled as
|
|
1
|
+
import*as o from"@radix-ui/react-radio-group";import*as r from"react";import{styled as t}from"../../stitches.js";const n=t(o.Item,{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $tonal400",borderRadius:"$round",color:"white",cursor:"pointer",display:"flex",justifyContent:"center",p:0,size:"$1",transition:"all 50ms ease-out","&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary",borderColor:"$primary"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),l=t(o.Indicator,{size:"6px",borderRadius:"$round",backgroundColor:"currentcolor",position:"absolute"}),e=a=>r.createElement(n,{...a},r.createElement(l,null));e.displayName="RadioButton";export{e as RadioButton};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useFormContext as F,Controller as g}from"react-hook-form";import{Description as C}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 F,Controller as g}from"react-hook-form";import{Description as C}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 q=B("fieldset",{all:"unset"}),t=({children:s,css:d,direction:u="column",defaultValue:r,description:l,label:c,name:n,validation:o,onValueChange:a})=>{const{control:p}=F(),{error:m}=V(n);return e.createElement(q,{css:d},e.createElement(b,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(o==null?void 0:o.required)},c),l&&e.createElement(C,{css:{mb:"$3"}},l),e.createElement(g,{control:p,name:n,rules:o,defaultValue:r,render:({onChange:f,value:E})=>e.createElement(h,{direction:u,defaultValue:r,onValueChange:i=>{f(i),a==null||a(i)},value:E},s)}),m&&e.createElement(v,{css:{mt:"$2"}},m))};t.Item=R,t.displayName="RadioButtonField";export{t as RadioButtonField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as
|
|
1
|
+
import*as e from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as r}from"../field-wrapper/InlineFieldWrapper.js";import{RadioButton as m}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";const o=({css:t,label:a,value:i,...l})=>e.createElement(r,{css:t,label:a},e.createElement(m,{value:i,...l}));o.displayName="RadioField";export{o as RadioField};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as d from"@radix-ui/react-radio-group";import*as t from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:e,children:r,size:l,isFullWidth:o,align:a,gap:s="3",justify:m,...n})=>t.createElement(d.Root,{...n},t.createElement(p,{direction:"row",justify:m,gap:s,css:e},t.Children.map(r,i=>t.isValidElement(i)&&(i==null?void 0:i.type)===c?t.cloneElement(i,{size:l,isFullWidth:o,align:a}):i)));export{f as RadioCardGroup};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Search as
|
|
1
|
+
import{Search as $,Close as z}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as y}from"../action-icon/ActionIcon.js";import{Box as H}from"../box/Box.js";import{Icon as l}from"../icon/Icon.js";import{Input as I}from"../input/Input.js";import{styled as p}from"../../stitches.js";import{useCallbackRef as k}from"../../utilities/hooks/useCallbackRef.js";var L=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(L||{});const x=p(l,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),O=p(I,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),u=t.forwardRef(({size:e="md",css:m,value:n,clearText:E="Clear",onChange:a,...h},b)=>{const[i,f]=k(),[v,C]=t.useState(n||""),[d,R]=t.useState(n?"CLEAR":"SEARCH");t.useImperativeHandle(b,()=>i.current);const A=()=>{var r,c;const o=i.current;if(!o)return;const s=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;(c=s==null?void 0:s.call)==null||c.call(s,o,"");const w=new Event("input",{bubbles:!0});o.dispatchEvent(w),o.focus()},S=r=>{C(r.target.value),R(r.target.value?"CLEAR":"SEARCH"),a==null||a(r)},g=()=>d==="SEARCH"?t.createElement(x,{is:$,size:e,css:{size:e=="sm"?"$1":20}}):t.createElement(y,{label:E,theme:"neutral",size:e,css:{position:"absolute",top:"0",right:"$1"},onClick:A},t.createElement(l,{is:z}));return t.createElement(H,{css:{position:"relative",...m}},t.createElement(O,{ref:f,size:e,type:"search",...h,value:v,onChange:S,css:{pr:e==="sm"?"$5":"$6"}}),g())});u.displayName="SearchInput";export{u as SearchInput};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as i from"react";import{useFormContext as u}from"react-hook-form";import{FieldWrapper as F}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Select as h}from"../select/Select.js";const l=({css:m=void 0,children:d,name:e,label:p,validation:r,prompt:a,description:n,hideLabel:s,...c})=>{const{register:o}=u(),{error:t}=b(e),f=r?o(r):o;return i.createElement(F,{css:m,description:n,error:t,fieldId:e,label:p,prompt:a,required:Boolean(r==null?void 0:r.required),hideLabel:s},i.createElement(h,{name:e,id:e,...c,ref:f,...t&&{state:"error"}},d))};l.displayName="SelectField";export{l as SelectField};
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import{Content as i}from"@radix-ui/react-accordion";import{Box as n}from"../../box/Box.js";import{keyframes as
|
|
1
|
+
import t from"react";import{Content as i}from"@radix-ui/react-accordion";import{Box as n}from"../../box/Box.js";import{keyframes as e,styled as m}from"../../../stitches.js";const c=e({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),d=e({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),h=m(i,{bg:"white",overflow:"hidden","@allowMotion":{'&[data-state="open"]':{animation:`${c} 300ms ease-out`},'&[data-state="closed"]':{animation:`${d} 300ms ease-out`}}}),s=({children:o,...a})=>t.createElement(h,{...a},t.Children.map(o,r=>t.createElement(n,{css:{"> a":{px:"$6"},"> button":{px:"$6"}}},r)));export{s as SidedrawerAccordionContent};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Content as a,Portal as i}from"@radix-ui/react-dialog";import
|
|
1
|
+
import{Content as a,Portal as i}from"@radix-ui/react-dialog";import t from"react";import{MAX_Z_INDEX as r}from"../../constants/zIndices.js";import{styled as n}from"../../stitches.js";import{SidedrawerOverlay as d}from"./SidedrawerOverlay.js";import{slideInLeft as l,slideOutLeft as m}from"../../utilities/style/keyframe-animations.js";const s=n(a,{bg:"white",boxShadow:"$2",display:"flex",flexDirection:"column",position:"fixed",top:0,left:0,height:"100%",maxWidth:"304px",width:"100%",zIndex:r,"@allowMotion":{'&[data-state="open"]':{animation:`${l} 250ms ease-out`},'&[data-state="closed"]':{animation:`${m} 250ms ease-out`}}}),f=({children:e,...o})=>t.createElement(i,null,t.createElement(d,{"data-testid":"sidedrawer_overlay"}),t.createElement(s,{role:"navigation",...o},e));export{f as SidedrawerContent};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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 o=({css:u,label:i,name:t,defaultValue:a,outputLabel:p,min:r=0,max:m=100,steps:d=[],...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:n})=>e.createElement(l,{name:t,defaultValue:a,onValueChange:f,value:n,min:r,max:m,...s},e.createElement(l.Steps,{min:r,max:m,steps:d}),e.createElement(l.Value,{value:n||a,outputLabel:p}))}))};o.displayName="SliderField";export{o as SliderField};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import{styled as r}from"../../stitches.js";import{StyledDivider as e}from"../divider/Divider.js";import{StyledHeading as d}from"../heading/Heading.js";import{StyledImage as a}from"../image/Image.js";import{StyledList as l}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const f=r("div",{"& > *":{"&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{maxWidth:"65ch"},[`& > ${c}`]:{maxWidth:"75ch"},[`& > ${l}`]:{maxWidth:"75ch"},[`& > ${e}`]:{my:"$5"},[`& > ${a}`]:{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 e}from"../divider/Divider.js";import{StyledHeading as d}from"../heading/Heading.js";import{StyledImage as a}from"../image/Image.js";import{StyledList as l}from"../list/List.js";import{StyledText as c}from"../text/Text.js";const f=r("div",{"& > *":{"&:not(:first-child)":{mt:"$5"},"&:not(:last-child)":{mb:"$5"}},[`& > ${d}`]:{maxWidth:"65ch"},[`& > ${c}`]:{maxWidth:"75ch"},[`& > ${l}`]:{maxWidth:"75ch"},[`& > ${e}`]:{my:"$5"},[`& > ${a}`]:{display:"block","&:not(:first-child)":{mt:"$6"},"&:not(:last-child)":{mb:"$6"}}}),m=t.forwardRef((o,i)=>t.createElement(f,{ref:i,...o}));m.displayName="StackContent";export{m as StackContent};
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{Button as n}from"../button/Button.js";import{useStepper as a}from"./stepper-context/StepperContext.js";const l=({label:e,children:
|
|
1
|
+
import*as i from"react";import{Button as n}from"../button/Button.js";import{useStepper as a}from"./stepper-context/StepperContext.js";const l=({label:e,children:o,...r})=>{const{activeStep:t,goToPreviousStep:p}=a();return i.createElement(n,{size:"sm",appearance:"outline",...r,disabled:t===0,onClick:p},o||(e==null?void 0:e(t)))};export{l as StepperStepBack};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import l from"react";import{styled as o}from"../../stitches.js";import{TableHeaderCell as e}from"./TableHeaderCell.js";const r={PRIMARY:"primary",PRIMARY_DARK:"primaryDark",LIGHT:"light"},i=o("thead",{variants:{theme:{[r.PRIMARY]:{[`${e}`]:{bg:"$primary"}},[r.PRIMARY_DARK]:{[`${e}`]:{bg:"$primaryDark"}},[r.LIGHT]:{[`${e}`]:{bg:"$tonal50",color:"$tonal600"}}}}}),a=({theme:t="primaryDark",...m})=>l.createElement(i,{theme:t,...m});a.displayName="TableHeader";export{r as TABLE_HEADER_THEMES,a as TableHeader};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{styled as l}from"../../stitches.js";const t=l("tr",{bg:"unset"}),o=e.forwardRef((r,a)=>e.createElement(t,{...r,ref:a}));o.displayName="TableRow";export{t as StyledRow,o as TableRow};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const
|
|
2
|
+
declare const StyledTabTrigger: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>, {
|
|
3
|
+
theme?: "dark" | "light" | undefined;
|
|
4
|
+
}, {
|
|
3
5
|
sm: string;
|
|
4
6
|
md: string;
|
|
5
7
|
lg: string;
|
|
@@ -265,8 +267,9 @@ declare const StyledTabsTrigger: import("@stitches/react/types/styled-component"
|
|
|
265
267
|
};
|
|
266
268
|
};
|
|
267
269
|
}>>;
|
|
268
|
-
interface
|
|
270
|
+
interface TabTriggerProps extends React.ComponentProps<typeof StyledTabTrigger> {
|
|
269
271
|
value: string;
|
|
272
|
+
disabled?: boolean;
|
|
270
273
|
}
|
|
271
|
-
export declare const
|
|
274
|
+
export declare const TabTrigger: React.FC<TabTriggerProps>;
|
|
272
275
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
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,9 +1,278 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { TabsContent } from './TabsContent';
|
|
2
|
+
import { TriggerListWrapper } from './TabsTriggerList';
|
|
3
|
+
import { TabTrigger } from './TabTrigger';
|
|
5
4
|
declare type TabsProps = React.ComponentProps<typeof StyledRoot>;
|
|
6
|
-
declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {
|
|
5
|
+
declare const StyledRoot: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & React.RefAttributes<HTMLDivElement>>, {
|
|
6
|
+
theme?: "dark" | "light" | undefined;
|
|
7
|
+
}, {
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
reducedMotion: string;
|
|
13
|
+
allowMotion: string;
|
|
14
|
+
hover: string;
|
|
15
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
16
|
+
sm: string;
|
|
17
|
+
md: string;
|
|
18
|
+
lg: string;
|
|
19
|
+
xl: string;
|
|
20
|
+
reducedMotion: string;
|
|
21
|
+
allowMotion: string;
|
|
22
|
+
hover: string;
|
|
23
|
+
}, {
|
|
24
|
+
colors: {
|
|
25
|
+
textForeground: any;
|
|
26
|
+
textSubtle: any;
|
|
27
|
+
textPlaceholder: any;
|
|
28
|
+
background: any;
|
|
29
|
+
backgroundAccent: any;
|
|
30
|
+
tonal50: any;
|
|
31
|
+
tonal100: any;
|
|
32
|
+
tonal200: any;
|
|
33
|
+
tonal300: any;
|
|
34
|
+
tonal400: any;
|
|
35
|
+
tonal500: any;
|
|
36
|
+
tonal600: any;
|
|
37
|
+
alpha100: any;
|
|
38
|
+
alpha150: any;
|
|
39
|
+
alpha200: any;
|
|
40
|
+
alpha250: any;
|
|
41
|
+
alpha600: any;
|
|
42
|
+
primaryLight: any;
|
|
43
|
+
primary: any;
|
|
44
|
+
primaryMid: any;
|
|
45
|
+
primaryDark: any;
|
|
46
|
+
secondary: any;
|
|
47
|
+
brandRed: any;
|
|
48
|
+
brandRedAccent: any;
|
|
49
|
+
brandGreen: any;
|
|
50
|
+
brandGreenAccent: any;
|
|
51
|
+
brandPurple: any;
|
|
52
|
+
brandPurpleAccent: any;
|
|
53
|
+
brandYellow: any;
|
|
54
|
+
brandYellowAccent: any;
|
|
55
|
+
successLight: any;
|
|
56
|
+
success: any;
|
|
57
|
+
successMid: any;
|
|
58
|
+
successDark: any;
|
|
59
|
+
dangerLight: any;
|
|
60
|
+
danger: any;
|
|
61
|
+
dangerMid: any;
|
|
62
|
+
dangerDark: any;
|
|
63
|
+
warningLight: any;
|
|
64
|
+
warning: any;
|
|
65
|
+
warningMid: any;
|
|
66
|
+
warningDark: any;
|
|
67
|
+
warningText: any;
|
|
68
|
+
subjectEnglish: any;
|
|
69
|
+
subjectMaths: any;
|
|
70
|
+
subjectScience: any;
|
|
71
|
+
subjectVerbalReasoning: any;
|
|
72
|
+
subjectNonVerbalReasoning: any;
|
|
73
|
+
subjectCreativeWriting: any;
|
|
74
|
+
subjectExamSkills: any;
|
|
75
|
+
};
|
|
76
|
+
space: {
|
|
77
|
+
"0": any;
|
|
78
|
+
"1": any;
|
|
79
|
+
"2": any;
|
|
80
|
+
"3": any;
|
|
81
|
+
"4": any;
|
|
82
|
+
"5": any;
|
|
83
|
+
"6": any;
|
|
84
|
+
"7": any;
|
|
85
|
+
"8": any;
|
|
86
|
+
"9": any;
|
|
87
|
+
};
|
|
88
|
+
fontSizes: {
|
|
89
|
+
xs: any;
|
|
90
|
+
sm: any;
|
|
91
|
+
md: any;
|
|
92
|
+
lg: any;
|
|
93
|
+
xl: any;
|
|
94
|
+
"2xl": any;
|
|
95
|
+
"3xl": any;
|
|
96
|
+
"4xl": any;
|
|
97
|
+
};
|
|
98
|
+
fonts: {
|
|
99
|
+
sans: any;
|
|
100
|
+
mono: any;
|
|
101
|
+
display: any;
|
|
102
|
+
body: any;
|
|
103
|
+
};
|
|
104
|
+
sizes: {
|
|
105
|
+
"0": any;
|
|
106
|
+
"1": any;
|
|
107
|
+
"2": any;
|
|
108
|
+
"3": any;
|
|
109
|
+
"4": any;
|
|
110
|
+
"5": any;
|
|
111
|
+
"6": any;
|
|
112
|
+
"7": any;
|
|
113
|
+
"8": any;
|
|
114
|
+
};
|
|
115
|
+
radii: {
|
|
116
|
+
"0": any;
|
|
117
|
+
"1": any;
|
|
118
|
+
"2": any;
|
|
119
|
+
"3": any;
|
|
120
|
+
round: any;
|
|
121
|
+
};
|
|
122
|
+
shadows: {
|
|
123
|
+
"0": any;
|
|
124
|
+
"1": any;
|
|
125
|
+
"2": any;
|
|
126
|
+
"3": any;
|
|
127
|
+
};
|
|
128
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
129
|
+
bg: (value: {
|
|
130
|
+
readonly [$$PropertyValue]: "background";
|
|
131
|
+
}) => {
|
|
132
|
+
background: {
|
|
133
|
+
readonly [$$PropertyValue]: "background";
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
inset: (value: string | number | {
|
|
137
|
+
readonly [$$ScaleValue]: "space";
|
|
138
|
+
}) => {
|
|
139
|
+
top: string | number | {
|
|
140
|
+
readonly [$$ScaleValue]: "space";
|
|
141
|
+
};
|
|
142
|
+
right: string | number | {
|
|
143
|
+
readonly [$$ScaleValue]: "space";
|
|
144
|
+
};
|
|
145
|
+
bottom: string | number | {
|
|
146
|
+
readonly [$$ScaleValue]: "space";
|
|
147
|
+
};
|
|
148
|
+
left: string | number | {
|
|
149
|
+
readonly [$$ScaleValue]: "space";
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
size: (value: string | number | {
|
|
153
|
+
readonly [$$ScaleValue]: "size";
|
|
154
|
+
}) => {
|
|
155
|
+
height: string | number | {
|
|
156
|
+
readonly [$$ScaleValue]: "size";
|
|
157
|
+
};
|
|
158
|
+
width: string | number | {
|
|
159
|
+
readonly [$$ScaleValue]: "size";
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
p: (value: string | number | {
|
|
163
|
+
readonly [$$ScaleValue]: "space";
|
|
164
|
+
}) => {
|
|
165
|
+
padding: string | number | {
|
|
166
|
+
readonly [$$ScaleValue]: "space";
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
pt: (value: string | number | {
|
|
170
|
+
readonly [$$ScaleValue]: "space";
|
|
171
|
+
}) => {
|
|
172
|
+
paddingTop: string | number | {
|
|
173
|
+
readonly [$$ScaleValue]: "space";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
pr: (value: string | number | {
|
|
177
|
+
readonly [$$ScaleValue]: "space";
|
|
178
|
+
}) => {
|
|
179
|
+
paddingRight: string | number | {
|
|
180
|
+
readonly [$$ScaleValue]: "space";
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
pb: (value: string | number | {
|
|
184
|
+
readonly [$$ScaleValue]: "space";
|
|
185
|
+
}) => {
|
|
186
|
+
paddingBottom: string | number | {
|
|
187
|
+
readonly [$$ScaleValue]: "space";
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
pl: (value: string | number | {
|
|
191
|
+
readonly [$$ScaleValue]: "space";
|
|
192
|
+
}) => {
|
|
193
|
+
paddingLeft: string | number | {
|
|
194
|
+
readonly [$$ScaleValue]: "space";
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
px: (value: string | number | {
|
|
198
|
+
readonly [$$ScaleValue]: "space";
|
|
199
|
+
}) => {
|
|
200
|
+
paddingLeft: string | number | {
|
|
201
|
+
readonly [$$ScaleValue]: "space";
|
|
202
|
+
};
|
|
203
|
+
paddingRight: string | number | {
|
|
204
|
+
readonly [$$ScaleValue]: "space";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
py: (value: string | number | {
|
|
208
|
+
readonly [$$ScaleValue]: "space";
|
|
209
|
+
}) => {
|
|
210
|
+
paddingTop: string | number | {
|
|
211
|
+
readonly [$$ScaleValue]: "space";
|
|
212
|
+
};
|
|
213
|
+
paddingBottom: string | number | {
|
|
214
|
+
readonly [$$ScaleValue]: "space";
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
m: (value: string | number | {
|
|
218
|
+
readonly [$$ScaleValue]: "space";
|
|
219
|
+
}) => {
|
|
220
|
+
margin: string | number | {
|
|
221
|
+
readonly [$$ScaleValue]: "space";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
mt: (value: string | number | {
|
|
225
|
+
readonly [$$ScaleValue]: "space";
|
|
226
|
+
}) => {
|
|
227
|
+
marginTop: string | number | {
|
|
228
|
+
readonly [$$ScaleValue]: "space";
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
mr: (value: string | number | {
|
|
232
|
+
readonly [$$ScaleValue]: "space";
|
|
233
|
+
}) => {
|
|
234
|
+
marginRight: string | number | {
|
|
235
|
+
readonly [$$ScaleValue]: "space";
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
mb: (value: string | number | {
|
|
239
|
+
readonly [$$ScaleValue]: "space";
|
|
240
|
+
}) => {
|
|
241
|
+
marginBottom: string | number | {
|
|
242
|
+
readonly [$$ScaleValue]: "space";
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
ml: (value: string | number | {
|
|
246
|
+
readonly [$$ScaleValue]: "space";
|
|
247
|
+
}) => {
|
|
248
|
+
marginLeft: string | number | {
|
|
249
|
+
readonly [$$ScaleValue]: "space";
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
mx: (value: string | number | {
|
|
253
|
+
readonly [$$ScaleValue]: "space";
|
|
254
|
+
}) => {
|
|
255
|
+
marginLeft: string | number | {
|
|
256
|
+
readonly [$$ScaleValue]: "space";
|
|
257
|
+
};
|
|
258
|
+
marginRight: string | number | {
|
|
259
|
+
readonly [$$ScaleValue]: "space";
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
my: (value: string | number | {
|
|
263
|
+
readonly [$$ScaleValue]: "space";
|
|
264
|
+
}) => {
|
|
265
|
+
marginTop: string | number | {
|
|
266
|
+
readonly [$$ScaleValue]: "space";
|
|
267
|
+
};
|
|
268
|
+
marginBottom: string | number | {
|
|
269
|
+
readonly [$$ScaleValue]: "space";
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
}>>;
|
|
273
|
+
declare const StyledTabContent: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsContentProps & React.RefAttributes<HTMLDivElement>>, {
|
|
274
|
+
theme?: "dark" | "light" | undefined;
|
|
275
|
+
}, {
|
|
7
276
|
sm: string;
|
|
8
277
|
md: string;
|
|
9
278
|
lg: string;
|
|
@@ -270,8 +539,8 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
270
539
|
};
|
|
271
540
|
}>>;
|
|
272
541
|
export declare const Tabs: React.FC<TabsProps> & {
|
|
273
|
-
TriggerList: typeof
|
|
274
|
-
Trigger: typeof
|
|
275
|
-
Content: typeof
|
|
542
|
+
TriggerList: typeof TriggerListWrapper;
|
|
543
|
+
Trigger: typeof TabTrigger;
|
|
544
|
+
Content: typeof StyledTabContent;
|
|
276
545
|
};
|
|
277
546
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
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 o}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:t="light",children:m,...a})=>p.createElement(h,{theme:t,...a},g(m,{theme:t},[o,i]));r.TriggerList=o,r.Trigger=s,r.Content=i,r.displayName="Tabs";export{r as Tabs};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
interface ListProps extends React.ComponentProps<typeof StyledTriggerList> {
|
|
3
|
+
enableTabScrolling?: boolean;
|
|
4
|
+
scrollPercentage?: number;
|
|
5
|
+
}
|
|
6
|
+
declare const StyledTriggerList: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsListProps & React.RefAttributes<HTMLDivElement>>, {
|
|
7
|
+
theme?: "dark" | "light" | undefined;
|
|
8
|
+
appearance?: "uppercase" | undefined;
|
|
9
|
+
}, {
|
|
4
10
|
sm: string;
|
|
5
11
|
md: string;
|
|
6
12
|
lg: string;
|
|
@@ -266,7 +272,5 @@ declare const StyledTriggerList: import("@stitches/react/types/styled-component"
|
|
|
266
272
|
};
|
|
267
273
|
};
|
|
268
274
|
}>>;
|
|
269
|
-
export declare const
|
|
270
|
-
colorScheme?: typeof ColorScheme;
|
|
271
|
-
}>;
|
|
275
|
+
export declare const TriggerListWrapper: React.FC<ListProps>;
|
|
272
276
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ChevronLeft as P,ChevronRight as R}from"@atom-learning/icons";import{List as _}from"@radix-ui/react-tabs";import{opacify as y}from"color2k";import o,{useRef as F,useState as f,useCallback as J,useEffect as k}from"react";import{debounce as K}from"throttle-debounce";import{ActionIcon as M}from"../action-icon/ActionIcon.js";import{Flex as X}from"../flex/Flex.js";import{Icon as W}from"../icon/Icon.js";import{theme as j,styled as x}from"../../stitches.js";import{TabTrigger as L}from"./TabTrigger.js";import{passPropsToChildren as C}from"./utils.js";const q=y("white",-.2),G=y(j.colors.primaryDark.value,-.2),T=x(M,{position:"absolute",transition:"all 125ms",variants:{theme:{light:{bg:`${q} !important`},dark:{bg:`${G} !important`,color:"currentColor !important"}},visible:{true:{opacity:1,visibility:"visible",pointerEvents:"all"},false:{opacity:0,visibility:"hidden",pointerEvents:"none"}}}}),S=x(_,{flexShrink:0,display:"flex",width:"100%",overflowX:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none",variants:{theme:{light:{borderBottom:"1px solid $tonal300"},dark:{bg:"$primaryDark",borderBottom:"1px solid $tonal200"}},appearance:{uppercase:{"& button":{textTransform:"uppercase"}}}}}),H=({children:h,theme:i,appearance:d,enableTabScrolling:$,scrollPercentage:z=10,...b})=>{const s=F(null),[u,a]=f(!1),[v,c]=f(!1),[D,I]=f(),g=J(t=>{const e=s.current;if(e){const{scrollWidth:l,scrollLeft:n,offsetWidth:m}=e,E=Math.round(l*(z/100));let p=n;if(t==="right"){const r=n+E;p=r+m<=l?r:l-m}else{const r=n-E;p=r>0?r:0}e.scroll({left:p,behavior:"smooth"}),setTimeout(()=>{const{scrollWidth:r,scrollLeft:w,offsetWidth:A}=e,B=r-(w+A);w===0?(a(!1),c(!0)):B<5?(c(!1),a(!0)):(a(!0),c(!0))},500)}},[]);return k(()=>{const t=K(500,()=>{I(window.innerWidth)});return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),k(()=>{var t;const e=s.current;if(e){const{offsetWidth:l,scrollWidth:n}=e,m=n>l;(t=e.scroll)==null||t.call(e,{left:0}),a(!1),c(m)}},[D]),u||v||$?o.createElement(X,{css:{position:"relative"}},o.createElement(T,{size:"lg",label:"Scroll Left",theme:i,onClick:()=>g("left"),visible:u,css:{left:0}},o.createElement(W,{is:P})),o.createElement(S,{...b,ref:s,appearance:d,theme:i},C(h,{theme:i},[L])),o.createElement(T,{size:"lg",label:"Scroll right",theme:i,onClick:()=>g("right"),visible:v,css:{right:0}},o.createElement(W,{is:R}))):o.createElement(S,{theme:i,...b,appearance:d,ref:s},C(h,{theme:i},[L]))};export{H as TriggerListWrapper};
|