@atom-learning/components 2.29.1-beta.0 → 2.30.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 +20 -0
- package/dist/{lib/src/components → components}/accordion/Accordion.js +0 -0
- package/dist/{lib/src/components → components}/accordion/AccordionContent.js +0 -0
- package/dist/{lib/src/components → components}/accordion/AccordionItem.js +0 -0
- package/dist/components/accordion/AccordionTrigger.d.ts +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -0
- package/dist/{lib/src/components → components}/action-icon/ActionIcon.constants.js +0 -0
- package/dist/components/action-icon/ActionIcon.d.ts +44 -44
- 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 +0 -0
- 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/components/avatar/Avatar.d.ts +2 -2
- 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 +1 -1
- package/dist/{lib/src/components → components}/badge/Badge.js +1 -1
- package/dist/{lib/src/components → components}/box/Box.js +0 -0
- package/dist/components/button/Button.d.ts +44 -45
- package/dist/components/button/Button.js +1 -0
- package/dist/components/calendar/Calendar.js +1 -0
- 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 +0 -0
- package/dist/{lib/src/components → components}/carousel/CarouselPagination.js +0 -0
- package/dist/{lib/src/components → components}/carousel/CarouselSlide.js +0 -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 +0 -0
- package/dist/{lib/src/components → components}/chip/Chip.js +0 -0
- package/dist/{lib/src/components → components}/chip/ChipGroup.js +0 -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 +0 -0
- package/dist/{lib/src/components → components}/chip-dismissible-group/index.js +0 -0
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.d.ts +1 -1
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.js +1 -0
- package/dist/{lib/src/components → components}/chip-toggle-group/ChipToggleGroupRoot.js +1 -1
- 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/components/data-table/DataTable.types.d.ts +1 -2
- package/dist/{lib/src/components → components}/data-table/DataTable.types.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableBody.js +0 -0
- package/dist/components/data-table/DataTableContext.d.ts +1 -1
- package/dist/{lib/src/components → components}/data-table/DataTableContext.js +1 -1
- package/dist/components/data-table/DataTableDataCell.d.ts +1 -1
- package/dist/components/data-table/DataTableDataCell.js +1 -0
- package/dist/{lib/src/components → components}/data-table/DataTableError.js +0 -0
- package/dist/components/data-table/DataTableGlobalFilter.js +1 -0
- package/dist/{lib/src/components → components}/data-table/DataTableHead.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableHeaderCell.js +1 -1
- package/dist/{lib/src/components → components}/data-table/DataTableLoading.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableRow.js +0 -0
- package/dist/{lib/src/components → components}/data-table/DataTableTable.js +0 -0
- package/dist/components/data-table/drag-and-drop/DragAndDropContainer.d.ts +4 -1
- 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/components/data-table/drag-and-drop/Handle.d.ts +1 -1
- package/dist/components/data-table/drag-and-drop/Handle.js +1 -0
- 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/components/data-table/usePagination.d.ts +1 -1
- package/dist/{lib/src/components → components}/data-table/usePagination.js +0 -0
- package/dist/components/data-table/useSorting.d.ts +1 -1
- 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/components/date-input/DateInput.js +1 -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 +0 -0
- package/dist/{lib/src/components → components}/dismissible/DismissibleRoot.js +1 -1
- package/dist/{lib/src/components → components}/dismissible/DismissibleTrigger.js +1 -1
- package/dist/{lib/src/components → components}/dismissible/index.js +0 -0
- package/dist/components/dismissible-group/DismissibleGroupItem.js +1 -0
- package/dist/{lib/src/components → components}/dismissible-group/DismissibleGroupRoot.js +0 -0
- package/dist/components/dismissible-group/index.d.ts +1 -1
- package/dist/components/dismissible-group/index.js +1 -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/{lib/src/components → components}/dropdown-menu/DropdownMenuLinkItem.js +0 -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/{lib/src/components → components}/field-wrapper/FieldDescription.js +0 -0
- package/dist/components/field-wrapper/FieldWrapper.js +1 -0
- package/dist/{lib/src/components → components}/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/{lib/src/components → components}/file-input/FileInput.js +0 -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 +0 -0
- package/dist/{lib/src/components → components}/heading/Heading.js +0 -0
- package/dist/{lib/src/components → components}/icon/Icon.js +0 -0
- package/dist/{lib/src/components → components}/image/Image.js +0 -0
- package/dist/components/inline-message/InlineMessage.config.d.ts +2 -2
- package/dist/{lib/src/components → components}/inline-message/InlineMessage.config.js +0 -0
- package/dist/components/inline-message/InlineMessage.js +1 -0
- 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 +0 -0
- package/dist/{lib/src/components → components}/link/Link.js +0 -0
- 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/{lib/src/components → components}/markdown-content/components/MarkdownEmphasis.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownHeading.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownImage.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownInlineCode.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownLink.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownList.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownListItem.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownParagraph.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownStrong.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownText.js +0 -0
- package/dist/{lib/src/components → components}/markdown-content/components/MarkdownThematicBreak.js +0 -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/components/navigation/NavigationMenuDropdownTrigger.js +1 -0
- package/dist/{lib/src/components → components}/navigation/NavigationMenuLink.js +0 -0
- package/dist/components/navigation/preventHover.d.ts +1 -0
- package/dist/components/navigation/preventHover.js +1 -0
- package/dist/{lib/src/components → components}/notification-badge/NotificationBadge.js +0 -0
- package/dist/{lib/src/components → components}/number-input/NumberInput.js +0 -0
- package/dist/components/number-input/NumberInputStepper.js +1 -0
- package/dist/{lib/src/components → components}/number-input-field/NumberInputField.js +0 -0
- 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 +0 -0
- package/dist/{lib/src/components → components}/progress-bar/ProgressBar.js +0 -0
- package/dist/{lib/src/components → components}/radio-button/RadioButton.js +0 -0
- 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 +0 -0
- package/dist/{lib/src/components → components}/radio-card/RadioCard.js +0 -0
- package/dist/components/radio-card/RadioCardGroup.d.ts +2 -2
- package/dist/{lib/src/components → components}/radio-card/RadioCardGroup.js +0 -0
- package/dist/{lib/src/components → components}/search-field/SearchField.js +0 -0
- package/dist/{lib/src/components → components}/search-input/SearchInput.js +0 -0
- package/dist/{lib/src/components → components}/select/Select.js +0 -0
- package/dist/{lib/src/components → components}/select-field/SelectField.js +0 -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/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionTrigger.js +1 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerBody.js +0 -0
- package/dist/components/sidedrawer/SidedrawerClose.js +1 -0
- package/dist/{lib/src/components → components}/sidedrawer/SidedrawerContent.js +0 -0
- 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 +1 -1
- 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 +0 -0
- package/dist/{lib/src/components → components}/stack/Stack.js +0 -0
- package/dist/{lib/src/components → components}/stack-content/StackContent.js +0 -0
- package/dist/{lib/src/components → components}/stepper/Stepper.js +0 -0
- package/dist/{lib/src/components → components}/stepper/StepperStepBack.js +0 -0
- 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 +0 -0
- package/dist/{lib/src/components → components}/table/TableHeaderCell.js +0 -0
- package/dist/{lib/src/components → components}/table/TableRow.js +0 -0
- package/dist/components/tabs/Tabs.js +1 -0
- package/dist/components/tabs/TabsContent.js +1 -0
- package/dist/{lib/src/components → components}/tabs/TabsTrigger.js +1 -1
- package/dist/components/tabs/TabsTriggerList.d.ts +1 -1
- package/dist/components/tabs/TabsTriggerList.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 +0 -0
- package/dist/{lib/src/components → components}/toast/ToastProvider.js +0 -0
- 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 +1 -1
- 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 +0 -0
- 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 +0 -0
- package/dist/{lib/src/constants → constants}/zIndices.js +0 -0
- package/dist/docgen.json +1 -1
- package/dist/docs/Accordion.mdx +1 -1
- package/dist/docs/Badge.mdx +1 -1
- package/dist/docs/Button.mdx +0 -8
- package/dist/docs/README.mdx +79 -0
- package/dist/docs/Tabs.mdx +1 -1
- package/dist/docs/ToggleGroup.mdx +1 -1
- package/dist/experiments/color-scheme/ColorScheme.d.ts +201 -0
- package/dist/experiments/color-scheme/ColorScheme.js +1 -0
- package/dist/experiments/color-scheme/blue.json.js +1 -0
- package/dist/experiments/color-scheme/generateAlphaColors.d.ts +1 -0
- package/dist/experiments/color-scheme/generateAlphaColors.js +1 -0
- package/dist/experiments/color-scheme/index.d.ts +1 -0
- package/dist/experiments/color-scheme/slate.json.js +1 -0
- package/dist/experiments/color-scheme/stitches.colorscheme.config.d.ts +452 -0
- package/dist/experiments/color-scheme/stitches.colorscheme.config.js +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/{lib/src/index.js → index.js} +0 -0
- package/dist/stitches.d.ts +338 -338
- package/dist/{lib/src/stitches.js → stitches.js} +1 -1
- 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/utilities/hooks/useWindowSize.d.ts +8 -0
- package/dist/utilities/hooks/useWindowSize.js +1 -0
- package/dist/utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js +1 -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 -4
- 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/lib/src/components/accordion/AccordionTrigger.js +0 -1
- package/dist/lib/src/components/button/Button.js +0 -1
- package/dist/lib/src/components/calendar/Calendar.js +0 -1
- package/dist/lib/src/components/chip-toggle-group/ChipToggleGroupItem.js +0 -1
- package/dist/lib/src/components/data-table/DataTable.js +0 -1
- package/dist/lib/src/components/data-table/DataTableDataCell.js +0 -1
- package/dist/lib/src/components/data-table/DataTableGlobalFilter.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/data-table/drag-and-drop/Handle.js +0 -1
- package/dist/lib/src/components/date-input/DateInput.js +0 -1
- package/dist/lib/src/components/dismissible-group/DismissibleGroupItem.js +0 -1
- package/dist/lib/src/components/dismissible-group/index.js +0 -1
- package/dist/lib/src/components/field-wrapper/FieldWrapper.js +0 -1
- package/dist/lib/src/components/inline-message/InlineMessage.js +0 -1
- package/dist/lib/src/components/list/List.js +0 -1
- package/dist/lib/src/components/navigation/NavigationMenuDropdownContent.js +0 -1
- package/dist/lib/src/components/navigation/NavigationMenuDropdownTrigger.js +0 -1
- package/dist/lib/src/components/number-input/NumberInputStepper.js +0 -1
- package/dist/lib/src/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionTrigger.js +0 -1
- package/dist/lib/src/components/sidedrawer/SidedrawerClose.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/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
- package/dist/lib/src/utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js +0 -1
package/dist/docs/Accordion.mdx
CHANGED
|
@@ -73,7 +73,7 @@ The corresponding `Accordion.Content` component's content will be, in this case,
|
|
|
73
73
|
You can pass in a `colorScheme` object to the Accordion.Trigger to customise the colours of the component.
|
|
74
74
|
Defaults to `{ accent: "slate", interactive: "loContrast1"}`
|
|
75
75
|
ColorScheme is experimental and has been implemented only locally but you can read more about how it
|
|
76
|
-
currently works and available options [on the repository's github](https://github.com/Atom-Learning/components/tree/main/color-scheme#readme).
|
|
76
|
+
currently works and available options [on the repository's github](https://github.com/Atom-Learning/components/tree/main/lib/src/experiments/color-scheme#readme).
|
|
77
77
|
|
|
78
78
|
```tsx preview live
|
|
79
79
|
<Accordion type="single" defaultValue="1">
|
package/dist/docs/Badge.mdx
CHANGED
package/dist/docs/Button.mdx
CHANGED
|
@@ -55,14 +55,6 @@ When using a button to request data or fire an action that has a potential delay
|
|
|
55
55
|
<Button isLoading> Hello world</Button>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
## Rounded Variant
|
|
59
|
-
|
|
60
|
-
Setting `isRounded` creates a rounded button
|
|
61
|
-
|
|
62
|
-
```tsx live
|
|
63
|
-
<Button isRounded>Rounded Button</Button>
|
|
64
|
-
```
|
|
65
|
-
|
|
66
58
|
## Polymorphism
|
|
67
59
|
|
|
68
60
|
The `Button` component supports polymorphism, therefore depending on whether it receives an `onClick`/`href` as a prop, it will produce a `button` or `link` respectively
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
## Color Schemes (v.ALPHA)
|
|
2
|
+
|
|
3
|
+
`color-scheme/`, is an **internal** component in an alpha stage (usable but not finalised) which introduces a `ColorScheme` component. It has been worked on heavily in terms of considering the required options and logic from dev but is **not finished and needs more design input**.
|
|
4
|
+
|
|
5
|
+
The problem that this component was introduced to solve is the difficult way we have approached theming so far in our components.
|
|
6
|
+
In the past we have heavily relied on props drilling and passing down theme related stitches variants to children, which means _(1)_ the colours can easily break when the expected children are nested further than directly under the 'theme providing' parent (The component which has a `theme` prop and tries to prop-drill theme). Moreover, _(2)_ we have inconsistent naming for our themes and _(3)_ inconsistent implementations on active components since _(4)_ the theming need to be documented and coded separately for each new component.
|
|
7
|
+
|
|
8
|
+
This `<ColorScheme />` component allows for `base` (`var(--baseX)`) and `accent` (`var(--accentX)`) theme property, as well as an `interactive` contrast mode to affect all interactable components.
|
|
9
|
+
|
|
10
|
+
The props are:
|
|
11
|
+
|
|
12
|
+
- `base` is used for the base colours of the wrapped component: different tones of background and text. It currently only supports the `slate` (grey) colour but can be extended for different base colors.
|
|
13
|
+
- `accent` is used for highlighted elements and interactive elements of the color scheme. It can be used directly but should be used with an interactive theme for interactive elements - see `<Button />`, `Accordion.Trigger` etc. Currently allowed accents are `slate` and `blue`.
|
|
14
|
+
- `interactive` supports 4 versions `loContrast1` and `loContrast2` which on light color schemes are lighter and on a dark mode they would be darker (so low contrast in comparison to the background), and `hiContrast1`, `hiContrast2` which are used for the opposite.
|
|
15
|
+
|
|
16
|
+
All the color scheme configurations setup used in the component can be found in `color-scheme/src/stitches.colorscheme.config.ts`
|
|
17
|
+
|
|
18
|
+
The ColorScheme itself works by re-declaring the needed CSS variables any time it's used. It is heavily inpired by both [stitches theming guidelines](https://stitches.dev/docs/theming) and particularly by [the radix colors project](https://www.radix-ui.com/colors) of which it's almost a copy of but with our own colours defined and some aliasing to match the current design use requirements.
|
|
19
|
+
|
|
20
|
+
Currently in use by a couple of components in library and the full documentation site. This component is subject to change when the Atom Learning colour theming patterns are properly established and we can make final decisions on the colours and API. **There will be changes to this code in the future.**
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
```jsx
|
|
25
|
+
<ColorScheme base="slate" accent="blue" interactive="hiContrast1">
|
|
26
|
+
<Box css={{ background: '$background', color: '$foreground' }}>
|
|
27
|
+
Off-black text over a white background
|
|
28
|
+
</Box>
|
|
29
|
+
<Box css={{ background: '$base1', color: '$foreground' }}>
|
|
30
|
+
Off-black text over very slightly grey background
|
|
31
|
+
</Box>
|
|
32
|
+
<Box css={{ background: '$base7', color: '$foreground6plus' }}>
|
|
33
|
+
White text over darker grey background
|
|
34
|
+
</Box>
|
|
35
|
+
<Box css={{ background: '$accent1', color: '$foreground' }}>
|
|
36
|
+
Off-black text over a slightly blue background
|
|
37
|
+
</Box>
|
|
38
|
+
<Box css={{ background: '$accent7', color: '$foreground6plus' }}>
|
|
39
|
+
White text over darker blue background
|
|
40
|
+
</Box>
|
|
41
|
+
<Box css={{ background: '$accent9', color: '$foreground6plus' }}>
|
|
42
|
+
White text over much darker blue background
|
|
43
|
+
</Box>
|
|
44
|
+
<Button
|
|
45
|
+
css={{
|
|
46
|
+
background: '$interactive1',
|
|
47
|
+
color: '$interactiveForeground',
|
|
48
|
+
['&:hover']: { background: '$interactive2' },
|
|
49
|
+
['&:active']: { background: '$interactive3' }
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
Blue button with white text
|
|
53
|
+
</Button>
|
|
54
|
+
<ColorScheme
|
|
55
|
+
interactive="hiContrast2"
|
|
56
|
+
as={Button}
|
|
57
|
+
css={{
|
|
58
|
+
background: '$interactive1',
|
|
59
|
+
color: '$interactiveForeground',
|
|
60
|
+
['&:hover']: { background: '$interactive2' },
|
|
61
|
+
['&:active']: { background: '$interactive3' }
|
|
62
|
+
}}
|
|
63
|
+
>
|
|
64
|
+
Darker blue button with white text
|
|
65
|
+
</ColorScheme>
|
|
66
|
+
<ColorScheme
|
|
67
|
+
interactive="loContrast2"
|
|
68
|
+
as={Button}
|
|
69
|
+
css={{
|
|
70
|
+
background: '$interactive1',
|
|
71
|
+
color: '$interactiveForeground',
|
|
72
|
+
['&:hover']: { background: '$interactive2' },
|
|
73
|
+
['&:active']: { background: '$interactive3' }
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
Light blue button with off-black text
|
|
77
|
+
</ColorScheme>
|
|
78
|
+
</ColorScheme>
|
|
79
|
+
```
|
package/dist/docs/Tabs.mdx
CHANGED
|
@@ -56,7 +56,7 @@ The corresponding `Tabs.Content` component's content will be, in this case, perm
|
|
|
56
56
|
You can pass in a `colorScheme` object to the TriggerList to customise the colours of the component.
|
|
57
57
|
Defaults to `{ base: "slate", accent: "blue", interactive: "hiContrast1"}`
|
|
58
58
|
ColorScheme is experimental and has been implemented only locally but you can read more about how it
|
|
59
|
-
currently works and available options [on the repository's github](https://github.com/Atom-Learning/components/tree/main/color-scheme#readme).
|
|
59
|
+
currently works and available options [on the repository's github](https://github.com/Atom-Learning/components/tree/main/lib/src/experiments/color-scheme#readme).
|
|
60
60
|
|
|
61
61
|
```tsx preview live
|
|
62
62
|
<Tabs defaultValue="tab2">
|
|
@@ -15,7 +15,7 @@ Extends visually by allowing for different sizing, vertical/horizontal display a
|
|
|
15
15
|
|
|
16
16
|
`orientation="vertical | horizontal"`
|
|
17
17
|
|
|
18
|
-
```jsx preview
|
|
18
|
+
```jsx preview live
|
|
19
19
|
<ToggleGroup.Root type="multiple" orientation="vertical">
|
|
20
20
|
<ToggleGroup.Button value="a">A</ToggleGroup.Button>
|
|
21
21
|
<ToggleGroup.Button value="b">B</ToggleGroup.Button>
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { bases, accents } from './stitches.colorscheme.config';
|
|
3
|
+
declare type TColorSchemeOwnProps = {
|
|
4
|
+
base?: keyof typeof bases;
|
|
5
|
+
accent?: keyof typeof accents;
|
|
6
|
+
interactive?: 'loContrast1' | 'loContrast2' | 'hiContrast1' | 'hiContrast2';
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const StyledColorScheme: import("@stitches/react/types/styled-component").StyledComponent<"div", {}, {
|
|
10
|
+
sm: string;
|
|
11
|
+
md: string;
|
|
12
|
+
lg: string;
|
|
13
|
+
xl: string;
|
|
14
|
+
reducedMotion: string;
|
|
15
|
+
allowMotion: string;
|
|
16
|
+
hover: string;
|
|
17
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
18
|
+
sm: string;
|
|
19
|
+
md: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
xl: string;
|
|
22
|
+
reducedMotion: string;
|
|
23
|
+
allowMotion: string;
|
|
24
|
+
hover: string;
|
|
25
|
+
}, {
|
|
26
|
+
colors: {
|
|
27
|
+
slate1: any;
|
|
28
|
+
slate2: any;
|
|
29
|
+
slate3: any;
|
|
30
|
+
slate4: any;
|
|
31
|
+
slate5: any;
|
|
32
|
+
slate6: any;
|
|
33
|
+
slate7: any;
|
|
34
|
+
slate8: any;
|
|
35
|
+
slate9: any;
|
|
36
|
+
slate10: any;
|
|
37
|
+
blue1: any;
|
|
38
|
+
blue2: any;
|
|
39
|
+
blue3: any;
|
|
40
|
+
blue4: any;
|
|
41
|
+
blue5: any;
|
|
42
|
+
blue6: any;
|
|
43
|
+
blue7: any;
|
|
44
|
+
blue8: any;
|
|
45
|
+
blue9: any;
|
|
46
|
+
blue10: any;
|
|
47
|
+
background: any;
|
|
48
|
+
foreground: any;
|
|
49
|
+
foreground6plus: any;
|
|
50
|
+
};
|
|
51
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
52
|
+
bg: (value: {
|
|
53
|
+
readonly [$$PropertyValue]: "background";
|
|
54
|
+
}) => {
|
|
55
|
+
background: {
|
|
56
|
+
readonly [$$PropertyValue]: "background";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
inset: (value: string | number | {
|
|
60
|
+
readonly [$$ScaleValue]: "space";
|
|
61
|
+
}) => {
|
|
62
|
+
top: string | number | {
|
|
63
|
+
readonly [$$ScaleValue]: "space";
|
|
64
|
+
};
|
|
65
|
+
right: string | number | {
|
|
66
|
+
readonly [$$ScaleValue]: "space";
|
|
67
|
+
};
|
|
68
|
+
bottom: string | number | {
|
|
69
|
+
readonly [$$ScaleValue]: "space";
|
|
70
|
+
};
|
|
71
|
+
left: string | number | {
|
|
72
|
+
readonly [$$ScaleValue]: "space";
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
size: (value: string | number | {
|
|
76
|
+
readonly [$$ScaleValue]: "size";
|
|
77
|
+
}) => {
|
|
78
|
+
height: string | number | {
|
|
79
|
+
readonly [$$ScaleValue]: "size";
|
|
80
|
+
};
|
|
81
|
+
width: string | number | {
|
|
82
|
+
readonly [$$ScaleValue]: "size";
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
p: (value: string | number | {
|
|
86
|
+
readonly [$$ScaleValue]: "space";
|
|
87
|
+
}) => {
|
|
88
|
+
padding: string | number | {
|
|
89
|
+
readonly [$$ScaleValue]: "space";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
pt: (value: string | number | {
|
|
93
|
+
readonly [$$ScaleValue]: "space";
|
|
94
|
+
}) => {
|
|
95
|
+
paddingTop: string | number | {
|
|
96
|
+
readonly [$$ScaleValue]: "space";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
pr: (value: string | number | {
|
|
100
|
+
readonly [$$ScaleValue]: "space";
|
|
101
|
+
}) => {
|
|
102
|
+
paddingRight: string | number | {
|
|
103
|
+
readonly [$$ScaleValue]: "space";
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
pb: (value: string | number | {
|
|
107
|
+
readonly [$$ScaleValue]: "space";
|
|
108
|
+
}) => {
|
|
109
|
+
paddingBottom: string | number | {
|
|
110
|
+
readonly [$$ScaleValue]: "space";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
pl: (value: string | number | {
|
|
114
|
+
readonly [$$ScaleValue]: "space";
|
|
115
|
+
}) => {
|
|
116
|
+
paddingLeft: string | number | {
|
|
117
|
+
readonly [$$ScaleValue]: "space";
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
px: (value: string | number | {
|
|
121
|
+
readonly [$$ScaleValue]: "space";
|
|
122
|
+
}) => {
|
|
123
|
+
paddingLeft: string | number | {
|
|
124
|
+
readonly [$$ScaleValue]: "space";
|
|
125
|
+
};
|
|
126
|
+
paddingRight: string | number | {
|
|
127
|
+
readonly [$$ScaleValue]: "space";
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
py: (value: string | number | {
|
|
131
|
+
readonly [$$ScaleValue]: "space";
|
|
132
|
+
}) => {
|
|
133
|
+
paddingTop: string | number | {
|
|
134
|
+
readonly [$$ScaleValue]: "space";
|
|
135
|
+
};
|
|
136
|
+
paddingBottom: string | number | {
|
|
137
|
+
readonly [$$ScaleValue]: "space";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
m: (value: string | number | {
|
|
141
|
+
readonly [$$ScaleValue]: "space";
|
|
142
|
+
}) => {
|
|
143
|
+
margin: string | number | {
|
|
144
|
+
readonly [$$ScaleValue]: "space";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
mt: (value: string | number | {
|
|
148
|
+
readonly [$$ScaleValue]: "space";
|
|
149
|
+
}) => {
|
|
150
|
+
marginTop: string | number | {
|
|
151
|
+
readonly [$$ScaleValue]: "space";
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
mr: (value: string | number | {
|
|
155
|
+
readonly [$$ScaleValue]: "space";
|
|
156
|
+
}) => {
|
|
157
|
+
marginRight: string | number | {
|
|
158
|
+
readonly [$$ScaleValue]: "space";
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
mb: (value: string | number | {
|
|
162
|
+
readonly [$$ScaleValue]: "space";
|
|
163
|
+
}) => {
|
|
164
|
+
marginBottom: string | number | {
|
|
165
|
+
readonly [$$ScaleValue]: "space";
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
ml: (value: string | number | {
|
|
169
|
+
readonly [$$ScaleValue]: "space";
|
|
170
|
+
}) => {
|
|
171
|
+
marginLeft: string | number | {
|
|
172
|
+
readonly [$$ScaleValue]: "space";
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
mx: (value: string | number | {
|
|
176
|
+
readonly [$$ScaleValue]: "space";
|
|
177
|
+
}) => {
|
|
178
|
+
marginLeft: string | number | {
|
|
179
|
+
readonly [$$ScaleValue]: "space";
|
|
180
|
+
};
|
|
181
|
+
marginRight: string | number | {
|
|
182
|
+
readonly [$$ScaleValue]: "space";
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
my: (value: string | number | {
|
|
186
|
+
readonly [$$ScaleValue]: "space";
|
|
187
|
+
}) => {
|
|
188
|
+
marginTop: string | number | {
|
|
189
|
+
readonly [$$ScaleValue]: "space";
|
|
190
|
+
};
|
|
191
|
+
marginBottom: string | number | {
|
|
192
|
+
readonly [$$ScaleValue]: "space";
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
}>>;
|
|
196
|
+
declare type TColorSchemeProps = React.ComponentProps<typeof StyledColorScheme> & TColorSchemeOwnProps;
|
|
197
|
+
/**
|
|
198
|
+
* @experimental Component has not been finalised. Further design input required. Use with caution.
|
|
199
|
+
*/
|
|
200
|
+
export declare const ColorScheme: React.ForwardRefExoticComponent<Pick<TColorSchemeProps, "css" | "key" | keyof React.HTMLAttributes<HTMLDivElement> | keyof TColorSchemeOwnProps> & React.RefAttributes<HTMLDivElement>>;
|
|
201
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as o from"react";import{styled as f,colorSchemes as e}from"./stitches.colorscheme.config.js";import{Slot as d}from"@radix-ui/react-slot";const p=f("div"),r=o.forwardRef(({base:t="",accent:a="",interactive:c="",className:m,asChild:s=!1,...i},l)=>{const n=[m,e[`interactive-${c}`],e[`accent-${a}`],e[`base-${t}`]].filter(Boolean).join(" ");return o.createElement(s?d:p,{ref:l,className:n,...i})});r.displayName="ColorScheme";export{r as ColorScheme};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e="#F3F8FF",l="#E5F1FF",u="#D6EAFF",b="#C2DEFF",F="#B3D4FA",a="#057AFF",r="#0F67F5",v="#194DCC",D="#102DA3",A="#15235E",E={blue1:e,blue2:l,blue3:u,blue4:b,blue5:F,blue6:a,blue7:r,blue8:v,blue9:D,blue10:A};export{e as blue1,A as blue10,l as blue2,u as blue3,b as blue4,F as blue5,a as blue6,r as blue7,v as blue8,D as blue9,E as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateAlphaColors: (colorName: string, colors: Record<string, string>) => Record<string, string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parseToRgba as u}from"color2k";const M=[255,255,255,1],r=[.05,.1,.15,.2,.27,.35,.5,.7,.8,.95],n=a=>Math.round(Math.max(Math.min(a,255),0)),$=(a,h)=>{const e={};return Object.entries(h).forEach(([f,i],o)=>{const[m,p,b]=u(i),[t,s,c]=M,g=[n((m-t)/r[o]+t),n((p-s)/r[o]+s),n((b-c)/r[o]+c),r[o]];e[`${a}A${o+1}`]=`rgba(${g.join(",")})`}),e};export{$ as generateAlphaColors};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ColorScheme } from './ColorScheme';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a="#F6F6F6",e="#EBEBEB",t="#E0E0E0",l="#CECECE",s="#C2C2C2",r="#757575",v="#545454",C="#333333",E="#1F1F1F",F="#1C1C1C",B={slate1:a,slate2:e,slate3:t,slate4:l,slate5:s,slate6:r,slate7:v,slate8:C,slate9:E,slate10:F};export{B as default,a as slate1,F as slate10,e as slate2,t as slate3,l as slate4,s as slate5,r as slate6,v as slate7,C as slate8,E as slate9};
|