@jobber/components 6.118.3-bundle-doc-9aeb47b.16 → 6.118.3-bundle-doc-7eb3517.17
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/dist/docs/AnimatedPresence/AnimatedPresence.md +7 -0
- package/dist/docs/AnimatedPresence/AnimatedPresenceBasicExample.md +81 -0
- package/dist/docs/AnimatedPresence/AnimatedPresenceListExample.md +44 -0
- package/dist/docs/AnimatedPresence/AnimatedPresenceStepperExample.md +70 -0
- package/dist/docs/AnimatedSwitcher/AnimatedSwitcher.md +6 -0
- package/dist/docs/AnimatedSwitcher/AnimatedSwitcherBasicExample.md +32 -0
- package/dist/docs/AnimatedSwitcher/AnimatedSwitcherIconExample.md +54 -0
- package/dist/docs/AtlantisThemeContext/AtlantisThemeContext.md +7 -0
- package/dist/docs/AtlantisThemeContext/AtlantisThemeContextBasicExample.md +108 -0
- package/dist/docs/AtlantisThemeContext/AtlantisThemeContextForceThemeForProviderExample.md +108 -0
- package/dist/docs/AtlantisThemeContext/AtlantisThemeContextOverrideTokensExample.md +78 -0
- package/dist/docs/Autocomplete/AutocompleteAdvancedCustomRenderExample.md +262 -0
- package/dist/docs/Autocomplete/AutocompleteAdvancedSectionHeadingExample.md +410 -0
- package/dist/docs/Autocomplete/AutocompleteAdvancedSectionHeadingStoryExample.md +431 -0
- package/dist/docs/Autocomplete/AutocompleteBasicCustomRenderExample.md +158 -0
- package/dist/docs/Autocomplete/AutocompleteBasicExample.md +45 -0
- package/dist/docs/Autocomplete/AutocompleteCustomRenderingExample.md +933 -0
- package/dist/docs/Autocomplete/AutocompleteSectionHeadingExample.md +58 -0
- package/dist/docs/Autocomplete/AutocompleteSetAValueExample.md +58 -0
- package/dist/docs/Autocomplete/AutocompleteV1.md +27 -0
- package/dist/docs/Autocomplete/AutocompleteV2.md +21 -0
- package/dist/docs/Autocomplete/AutocompleteV2AsyncExample.md +173 -0
- package/dist/docs/Autocomplete/AutocompleteV2CustomRenderOptionExample.md +92 -0
- package/dist/docs/Autocomplete/AutocompleteV2EmptyActionsExample.md +62 -0
- package/dist/docs/Autocomplete/AutocompleteV2EmptyStateAndActionsExample.md +64 -0
- package/dist/docs/Autocomplete/AutocompleteV2EverythingCustomizedExample.md +234 -0
- package/dist/docs/Autocomplete/AutocompleteV2FlatExample.md +35 -0
- package/dist/docs/Autocomplete/AutocompleteV2FocusBehaviorExample.md +148 -0
- package/dist/docs/Autocomplete/AutocompleteV2FreeFormStoryExample.md +52 -0
- package/dist/docs/Autocomplete/AutocompleteV2HeaderFooterStoryExample.md +68 -0
- package/dist/docs/Autocomplete/AutocompleteV2MultipleExample.md +214 -0
- package/dist/docs/Autocomplete/AutocompleteV2SectionedExample.md +59 -0
- package/dist/docs/Autocomplete/AutocompleteV2StayOpenExample.md +49 -0
- package/dist/docs/Autocomplete/AutocompleteV2WithActionsExample.md +103 -0
- package/dist/docs/Autocomplete/AutocompleteWithDetailsExample.md +48 -0
- package/dist/docs/Autocomplete/AutocompleteWithinModalExample.md +573 -0
- package/dist/docs/Avatar/Avatar.md +5 -0
- package/dist/docs/Avatar/AvatarWithTooltipExample.md +16 -0
- package/dist/docs/Banner/Banner.md +9 -0
- package/dist/docs/Banner/BannerActionsExample.md +34 -0
- package/dist/docs/Banner/BannerBasicExample.md +24 -0
- package/dist/docs/Banner/BannerComposedExample.md +76 -0
- package/dist/docs/Banner/BannerControlledExample.md +39 -0
- package/dist/docs/Banner/BannerSuccessExample.md +27 -0
- package/dist/docs/Button/Button.md +8 -0
- package/dist/docs/Button/ButtonComparisonExample.md +88 -0
- package/dist/docs/Button/ButtonComposedLinksExample.md +49 -0
- package/dist/docs/Button/ButtonFormExample.md +24 -0
- package/dist/docs/Button/ButtonRoutingExample.md +29 -0
- package/dist/docs/Card/Card.md +12 -0
- package/dist/docs/Card/CardBasicExample.md +46 -0
- package/dist/docs/Card/CardCompoundComponentExample.md +62 -0
- package/dist/docs/Card/CardCustomHeaderExample.md +53 -0
- package/dist/docs/Card/CardHeaderActionExample.md +29 -0
- package/dist/docs/Card/CardWithAccentExample.md +56 -0
- package/dist/docs/Card/CardWithElevationExample.md +46 -0
- package/dist/docs/Card/CardWithOnClickExample.md +35 -0
- package/dist/docs/Card/CardWithURLExample.md +28 -0
- package/dist/docs/Checkbox/Checkbox.md +6 -0
- package/dist/docs/Checkbox/CheckboxChildrenAsLabelExample.md +36 -0
- package/dist/docs/Checkbox/CheckboxIndeterminateExample.md +44 -0
- package/dist/docs/Chip/Chip.md +10 -0
- package/dist/docs/Chip/ChipClickableSuffixExample.md +31 -0
- package/dist/docs/Chip/ChipDismissibleExample.md +23 -0
- package/dist/docs/Chip/ChipPrefixExample.md +26 -0
- package/dist/docs/Chip/ChipSelectableExample.md +29 -0
- package/dist/docs/Chip/ChipSuffixExample.md +26 -0
- package/dist/docs/Chip/ChipTruncatingExample.md +43 -0
- package/dist/docs/Chips/Chips.md +7 -0
- package/dist/docs/Chips/ChipsBasicExample.md +35 -0
- package/dist/docs/Chips/ChipsMultiSelectExample.md +38 -0
- package/dist/docs/Chips/ChipsSelectionExample.md +96 -0
- package/dist/docs/Combobox/Combobox.md +15 -0
- package/dist/docs/Combobox/ComboboxClearSelectionExample.md +65 -0
- package/dist/docs/Combobox/ComboboxCustomActivatorExample.md +146 -0
- package/dist/docs/Combobox/ComboboxCustomRenderOptionsExample.md +426 -0
- package/dist/docs/Combobox/ComboboxCustomSearchExample.md +67 -0
- package/dist/docs/Combobox/ComboboxDynamicActionExample.md +36 -0
- package/dist/docs/Combobox/ComboboxEmptyStateExample.md +27 -0
- package/dist/docs/Combobox/ComboboxInfiniteScrollExample.md +82 -0
- package/dist/docs/Combobox/ComboboxKeepOpenOnClickExample.md +53 -0
- package/dist/docs/Combobox/ComboboxMultiSelectExample.md +51 -0
- package/dist/docs/Combobox/ComboboxPrefixOptionsExample.md +63 -0
- package/dist/docs/Combobox/ComboboxSingleSelectExample.md +39 -0
- package/dist/docs/ConfirmationModal/ConfirmationModal.md +7 -0
- package/dist/docs/ConfirmationModal/ConfirmationModalBasicExample.md +33 -0
- package/dist/docs/ConfirmationModal/ConfirmationModalControlledExample.md +53 -0
- package/dist/docs/ConfirmationModal/ConfirmationModalDestructiveExample.md +39 -0
- package/dist/docs/Content/Content.md +5 -0
- package/dist/docs/Content/ContentBasicExample.md +36 -0
- package/dist/docs/ContentBlock/ContentBlock.md +8 -0
- package/dist/docs/ContentBlock/ContentBlockBasicExample.md +33 -0
- package/dist/docs/ContentBlock/ContentBlockCustomMaxWidthExample.md +25 -0
- package/dist/docs/ContentBlock/ContentBlockWithAndTextExample.md +35 -0
- package/dist/docs/ContentBlock/ContentBlockWithGuttersStoryExample.md +35 -0
- package/dist/docs/Countdown/Countdown.md +7 -0
- package/dist/docs/Countdown/CountdownBasicExample.md +20 -0
- package/dist/docs/Countdown/CountdownOnCompleteExample.md +38 -0
- package/dist/docs/Countdown/CountdownStylingExample.md +34 -0
- package/dist/docs/Cover/Cover.md +7 -0
- package/dist/docs/Cover/CoverBasicExample.md +25 -0
- package/dist/docs/Cover/CoverTallCoverExample.md +25 -0
- package/dist/docs/Cover/CoverWithTopAndBottomExample.md +33 -0
- package/dist/docs/DataList/DataList.md +9 -0
- package/dist/docs/DataList/DataListBasicExample.md +457 -0
- package/dist/docs/DataList/DataListClearAllFiltersExample.md +377 -0
- package/dist/docs/DataList/DataListCustomItemNavigationExample.md +330 -0
- package/dist/docs/DataList/DataListCustomRenderEmptyStateExample.md +125 -0
- package/dist/docs/DataList/DataListEmptyStateExample.md +294 -0
- package/dist/docs/DataTable/DataTable.md +27 -0
- package/dist/docs/DataTable/DataTableComposableAdvancedFilteringExample.md +373 -0
- package/dist/docs/DataTable/DataTableComposableBasicExample.md +83 -0
- package/dist/docs/DataTable/DataTableComposableBulkSelectionExample.md +255 -0
- package/dist/docs/DataTable/DataTableComposableColumnVisibilityExample.md +138 -0
- package/dist/docs/DataTable/DataTableComposableColumnWidthsExample.md +211 -0
- package/dist/docs/DataTable/DataTableComposableEndAlignedColumnsExample.md +92 -0
- package/dist/docs/DataTable/DataTableComposableFooterWithPageTotalsExample.md +211 -0
- package/dist/docs/DataTable/DataTableComposableFooterWithPaginationExample.md +218 -0
- package/dist/docs/DataTable/DataTableComposableGlobalSearchExample.md +146 -0
- package/dist/docs/DataTable/DataTableComposableLoadingExample.md +129 -0
- package/dist/docs/DataTable/DataTableComposableMobileResponsiveExample.md +174 -0
- package/dist/docs/DataTable/DataTableComposablePaginationExample.md +151 -0
- package/dist/docs/DataTable/DataTableComposableRowActionsExample.md +157 -0
- package/dist/docs/DataTable/DataTableComposableRowSelectionExample.md +180 -0
- package/dist/docs/DataTable/DataTableComposableSortableExample.md +152 -0
- package/dist/docs/DataTable/DataTableComposableTableActionsExample.md +212 -0
- package/dist/docs/DataTable/DataTableComposableWithFooterExample.md +188 -0
- package/dist/docs/DataTable/DataTableEmptyStateExample.md +38 -0
- package/dist/docs/DataTable/DataTableHorizontalScrollingExample.md +140 -0
- package/dist/docs/DataTable/DataTableLoadingStateExample.md +97 -0
- package/dist/docs/DataTable/DataTableManualSortingExample.md +160 -0
- package/dist/docs/DataTable/DataTableWithActionsExample.md +169 -0
- package/dist/docs/DataTable/DataTableWithFooterRowExample.md +143 -0
- package/dist/docs/DescriptionList/DescriptionList.md +5 -0
- package/dist/docs/DescriptionList/DescriptionListCustomLabelExample.md +18 -0
- package/dist/docs/Disclosure/Disclosure.md +7 -0
- package/dist/docs/Disclosure/DisclosureBasicExample.md +19 -0
- package/dist/docs/Disclosure/DisclosureControlledExample.md +39 -0
- package/dist/docs/Disclosure/DisclosureCustomTitleExample.md +31 -0
- package/dist/docs/Divider/Divider.md +6 -0
- package/dist/docs/Divider/DividerHorizontalExample.md +25 -0
- package/dist/docs/Divider/DividerVerticalExample.md +41 -0
- package/dist/docs/Drawer/Drawer.md +5 -0
- package/dist/docs/Drawer/DrawerBasicExample.md +64 -0
- package/dist/docs/FeatureSwitch/FeatureSwitch.md +5 -0
- package/dist/docs/FeatureSwitch/FeatureSwitchBasicExample.md +37 -0
- package/dist/docs/Flex/Flex.md +5 -0
- package/dist/docs/Flex/FlexBasicExample.md +29 -0
- package/dist/docs/Form/Form.md +7 -0
- package/dist/docs/Form/FormBasicExample.md +62 -0
- package/dist/docs/Form/FormOnStateChangeExample.md +46 -0
- package/dist/docs/Form/FormTriggeringSubmissionExample.md +58 -0
- package/dist/docs/FormField/FormField.md +6 -0
- package/dist/docs/FormField/FormFieldInlineExample.md +26 -0
- package/dist/docs/FormField/FormFieldSelectExample.md +21 -0
- package/dist/docs/FormatEmail/FormatEmail.md +5 -0
- package/dist/docs/FormatEmail/FormatEmailBasicExample.md +10 -0
- package/dist/docs/FormatFile/FormatFile.md +7 -0
- package/dist/docs/FormatFile/FormatFileCollapsedExample.md +33 -0
- package/dist/docs/FormatFile/FormatFileExpandedExample.md +24 -0
- package/dist/docs/FormatFile/FormatFileExpandedWithDeleteExample.md +37 -0
- package/dist/docs/FormatRelativeDateTime/FormatRelativeDateTime.md +5 -0
- package/dist/docs/FormatRelativeDateTime/FormatRelativeDateTimeBasicExample.md +14 -0
- package/dist/docs/FormatTime/FormatTime.md +5 -0
- package/dist/docs/FormatTime/FormatTimeBasicExample.md +27 -0
- package/dist/docs/Gallery/Gallery.md +6 -0
- package/dist/docs/Gallery/GalleryBasicExample.md +95 -0
- package/dist/docs/Gallery/GalleryMaxFilesExample.md +103 -0
- package/dist/docs/Glimmer/Glimmer.md +5 -0
- package/dist/docs/Glimmer/GlimmerInDepthExample.md +36 -0
- package/dist/docs/Grid/Grid.md +7 -0
- package/dist/docs/Grid/GridBasicExample.md +44 -0
- package/dist/docs/Grid/GridSpacingExample.md +96 -0
- package/dist/docs/Grid/GridThreeColumnsExample.md +54 -0
- package/dist/docs/Heading/Heading.md +6 -0
- package/dist/docs/Heading/HeadingLevelsExample.md +26 -0
- package/dist/docs/Heading/HeadingTruncationExample.md +109 -0
- package/dist/docs/InputAvatar/InputAvatar.md +5 -0
- package/dist/docs/InputAvatar/InputAvatarBasicExample.md +29 -0
- package/dist/docs/InputDate/InputDate.md +8 -0
- package/dist/docs/InputDate/InputDateBasicExample.md +27 -0
- package/dist/docs/InputDate/InputDateMinMaxExample.md +30 -0
- package/dist/docs/InputDate/InputDateV2BasicExample.md +27 -0
- package/dist/docs/InputDate/InputDateVersionComparisonExample.md +213 -0
- package/dist/docs/InputEmail/InputEmail.md +6 -0
- package/dist/docs/InputEmail/InputEmailV2BasicExample.md +29 -0
- package/dist/docs/InputEmail/InputEmailVersionComparisonExample.md +252 -0
- package/dist/docs/InputFile/InputFile.md +10 -0
- package/dist/docs/InputFile/InputFileCustomButtonContentExample.md +79 -0
- package/dist/docs/InputFile/InputFileCustomDropzoneContentExample.md +157 -0
- package/dist/docs/InputFile/InputFileFileSizeValidatorExample.md +60 -0
- package/dist/docs/InputFile/InputFileMaxFilesExample.md +52 -0
- package/dist/docs/InputFile/InputFileStatefulExample.md +39 -0
- package/dist/docs/InputFile/InputFileVariationsAndSizesExample.md +53 -0
- package/dist/docs/InputGroup/InputGroup.md +8 -0
- package/dist/docs/InputGroup/InputGroupBasicExample.md +22 -0
- package/dist/docs/InputGroup/InputGroupDateRangeExample.md +33 -0
- package/dist/docs/InputGroup/InputGroupNestedExample.md +24 -0
- package/dist/docs/InputGroup/InputGroupVerticalWithHorizontalRowsExample.md +27 -0
- package/dist/docs/InputNumber/InputNumber.md +11 -0
- package/dist/docs/InputNumber/InputNumberControlledExample.md +41 -0
- package/dist/docs/InputNumber/InputNumberFocusAndBlurExample.md +32 -0
- package/dist/docs/InputNumber/InputNumberFormattingExamplesExample.md +137 -0
- package/dist/docs/InputNumber/InputNumberInlineExample.md +35 -0
- package/dist/docs/InputNumber/InputNumberMinMaxValueExample.md +37 -0
- package/dist/docs/InputNumber/InputNumberPrefixAndSuffixExample.md +22 -0
- package/dist/docs/InputNumber/InputNumberSizesExample.md +16 -0
- package/dist/docs/InputPassword/InputPassword.md +5 -0
- package/dist/docs/InputPassword/InputPasswordControlledExample.md +26 -0
- package/dist/docs/InputPhoneNumber/InputPhoneNumber.md +9 -0
- package/dist/docs/InputPhoneNumber/InputPhoneNumberBasicExample.md +26 -0
- package/dist/docs/InputPhoneNumber/InputPhoneNumberCustomPatternExample.md +27 -0
- package/dist/docs/InputPhoneNumber/InputPhoneNumberInitialValueExample.md +26 -0
- package/dist/docs/InputPhoneNumber/InputPhoneNumberVersionComparisonExample.md +196 -0
- package/dist/docs/InputPhoneNumber/InputPhoneNumberWithCountryCodeExample.md +27 -0
- package/dist/docs/InputText/InputText.md +7 -0
- package/dist/docs/InputText/InputTextAutocompleteExample.md +27 -0
- package/dist/docs/InputText/InputTextControlledExample.md +36 -0
- package/dist/docs/InputText/InputTextVersionComparisonExample.md +281 -0
- package/dist/docs/InputTime/InputTime.md +6 -0
- package/dist/docs/InputTime/InputTimeControlledExample.md +36 -0
- package/dist/docs/InputTime/InputTimeV2BasicExample.md +27 -0
- package/dist/docs/InputValidation/InputValidation.md +5 -0
- package/dist/docs/InputValidation/InputValidationBasicExample.md +60 -0
- package/dist/docs/LightBox/LightBox.md +5 -0
- package/dist/docs/LightBox/LightBoxBasicExample.md +41 -0
- package/dist/docs/Link/Link.md +5 -0
- package/dist/docs/Link/LinkBasicExample.md +14 -0
- package/dist/docs/List/List.md +8 -0
- package/dist/docs/List/ListSectionedListWithCustomItemExample.md +135 -0
- package/dist/docs/List/ListSectionedListWithCustomSectionExample.md +93 -0
- package/dist/docs/List/ListSimpleListWithCustomStylesExample.md +90 -0
- package/dist/docs/List/ListWithCustomRendererExample.md +93 -0
- package/dist/docs/Markdown/Markdown.md +5 -0
- package/dist/docs/Markdown/MarkdownBasicExample.md +14 -0
- package/dist/docs/Menu/Menu.md +7 -0
- package/dist/docs/Menu/MenuComposableExample.md +480 -0
- package/dist/docs/Menu/MenuCustomActivatorExample.md +58 -0
- package/dist/docs/Menu/MenuHorizontalExample.md +48 -0
- package/dist/docs/Modal/Modal.md +11 -0
- package/dist/docs/Modal/ModalActionTypesExample.md +62 -0
- package/dist/docs/Modal/ModalBasicExample.md +36 -0
- package/dist/docs/Modal/ModalNestedExample.md +88 -0
- package/dist/docs/Modal/ModalProviderExample.md +179 -0
- package/dist/docs/Modal/ModalSizesExample.md +66 -0
- package/dist/docs/Modal/ModalStickyRegionsExample.md +103 -0
- package/dist/docs/Modal/ModalWithDatePickerExample.md +106 -0
- package/dist/docs/Page/Page.md +16 -0
- package/dist/docs/Page/PageBasicExample.md +23 -0
- package/dist/docs/Page/PageComposableBasicExample.md +21 -0
- package/dist/docs/Page/PageComposableCustomSlotExample.md +46 -0
- package/dist/docs/Page/PageComposableWithActionsExample.md +57 -0
- package/dist/docs/Page/PageComposableWithAllPiecesExample.md +71 -0
- package/dist/docs/Page/PageComposableWithMarkdownExample.md +40 -0
- package/dist/docs/Page/PageComposableWithSubtitleAndIntroExample.md +31 -0
- package/dist/docs/Page/PageCustomTitleExample.md +27 -0
- package/dist/docs/Page/PageSecondaryActionOnlyExample.md +31 -0
- package/dist/docs/Page/PageWithActionsExample.md +91 -0
- package/dist/docs/Page/PageWithAdditionalTitleFieldsExample.md +30 -0
- package/dist/docs/Page/PageWithIntroExample.md +25 -0
- package/dist/docs/Popover/Popover.md +8 -0
- package/dist/docs/Popover/PopoverBasicExample.md +42 -0
- package/dist/docs/Popover/PopoverComposedExample.md +76 -0
- package/dist/docs/Popover/PopoverForceInverseThemeExample.md +55 -0
- package/dist/docs/Popover/PopoverInformationalExample.md +56 -0
- package/dist/docs/ProgressBar/ProgressBar.md +6 -0
- package/dist/docs/ProgressBar/ProgressBarSteppedExample.md +32 -0
- package/dist/docs/ProgressBar/ProgressBarWithStateExample.md +28 -0
- package/dist/docs/RadioGroup/RadioGroup.md +9 -0
- package/dist/docs/RadioGroup/RadioGroupBasicExample.md +22 -0
- package/dist/docs/RadioGroup/RadioGroupCustomRadioOptionContentExample.md +60 -0
- package/dist/docs/RadioGroup/RadioGroupDescriptionExample.md +34 -0
- package/dist/docs/RadioGroup/RadioGroupDisabledExample.md +35 -0
- package/dist/docs/RadioGroup/RadioGroupHorizontalExample.md +53 -0
- package/dist/docs/ResponsiveSwitcher/ResponsiveSwitcher.md +5 -0
- package/dist/docs/ResponsiveSwitcher/ResponsiveSwitcherMultipleItemsExample.md +44 -0
- package/dist/docs/SegmentedControl/SegmentedControl.md +7 -0
- package/dist/docs/SegmentedControl/SegmentedControlControlledExample.md +42 -0
- package/dist/docs/SegmentedControl/SegmentedControlSizesExample.md +46 -0
- package/dist/docs/SegmentedControl/SegmentedControlUncontrolledExample.md +25 -0
- package/dist/docs/Select/Select.md +12 -0
- package/dist/docs/Select/SelectBaseOptionGroupsExample.md +23 -0
- package/dist/docs/Select/SelectCustomOptionGroupSizesExample.md +61 -0
- package/dist/docs/Select/SelectEventsExample.md +21 -0
- package/dist/docs/Select/SelectInitialValueExample.md +17 -0
- package/dist/docs/Select/SelectInlineExample.md +20 -0
- package/dist/docs/Select/SelectOnFocusAndBlurExample.md +24 -0
- package/dist/docs/Select/SelectSizesExample.md +41 -0
- package/dist/docs/Select/SelectVersionComparisonExample.md +338 -0
- package/dist/docs/SideDrawer/SideDrawer.md +10 -0
- package/dist/docs/SideDrawer/SideDrawerActionExample.md +46 -0
- package/dist/docs/SideDrawer/SideDrawerBackButtonExample.md +47 -0
- package/dist/docs/SideDrawer/SideDrawerBasicExample.md +108 -0
- package/dist/docs/SideDrawer/SideDrawerCustomTitleExample.md +46 -0
- package/dist/docs/SideDrawer/SideDrawerInlineExample.md +62 -0
- package/dist/docs/SideDrawer/SideDrawerToolbarExample.md +42 -0
- package/dist/docs/SideKick/SideKick.md +5 -0
- package/dist/docs/SideKick/SideKickComplexExample.md +41 -0
- package/dist/docs/Switch/Switch.md +5 -0
- package/dist/docs/Switch/SwitchBasicExample.md +19 -0
- package/dist/docs/Table/Table.md +5 -0
- package/dist/docs/Table/TableBasicExample.md +54 -0
- package/dist/docs/Tabs/Tabs.md +10 -0
- package/dist/docs/Tabs/TabsBasicExample.md +28 -0
- package/dist/docs/Tabs/TabsControlledExample.md +33 -0
- package/dist/docs/Tabs/TabsDynamicTabsExample.md +41 -0
- package/dist/docs/Tabs/TabsWithCustomReactNodeExample.md +60 -0
- package/dist/docs/Tabs/TabsWithDefaultTabExample.md +28 -0
- package/dist/docs/Tabs/TabsWithTabChangeCallbackExample.md +33 -0
- package/dist/docs/Tiles/Tiles.md +8 -0
- package/dist/docs/Tiles/TilesBasicExample.md +36 -0
- package/dist/docs/Tiles/TilesCustomMinSizeExample.md +36 -0
- package/dist/docs/Tiles/TilesCustomSpaceExample.md +36 -0
- package/dist/docs/Tiles/TilesWithContentExample.md +45 -0
- package/dist/docs/Toast/Toast.md +6 -0
- package/dist/docs/Toast/ToastBasicExample.md +20 -0
- package/dist/docs/Toast/ToastVariationExample.md +21 -0
- package/dist/docs/Tooltip/Tooltip.md +5 -0
- package/dist/docs/Tooltip/TooltipBasicExample.md +21 -0
- package/dist/docs/Typography/Typography.md +7 -0
- package/dist/docs/Typography/TypographyAlignmentExample.md +17 -0
- package/dist/docs/Typography/TypographyFontSizeExample.md +21 -0
- package/dist/docs/Typography/TypographyFontWeightExample.md +10 -0
- package/dist/docs/usage-guidelines/usage-guidelines.md +8 -10
- package/package.json +3 -3
|
@@ -62,3 +62,10 @@ example.
|
|
|
62
62
|
```tsx
|
|
63
63
|
<AnimatedPresence initial={true}>...</AnimatedPresence>
|
|
64
64
|
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Other Examples
|
|
68
|
+
|
|
69
|
+
[Animated Presence Basic Example](./AnimatedPresenceBasicExample.md)
|
|
70
|
+
[Animated Presence List Example](./AnimatedPresenceListExample.md)
|
|
71
|
+
[Animated Presence Stepper Example](./AnimatedPresenceStepperExample.md)
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Animated Presence Basic Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import type { ComponentProps } from "react";
|
|
5
|
+
import React, { useState } from "react";
|
|
6
|
+
import { AnimatedPresence } from "@jobber/components/AnimatedPresence";
|
|
7
|
+
import { AnimatedSwitcher } from "@jobber/components/AnimatedSwitcher";
|
|
8
|
+
import { Button } from "@jobber/components/Button";
|
|
9
|
+
import { Content } from "@jobber/components/Content";
|
|
10
|
+
import { Divider } from "@jobber/components/Divider";
|
|
11
|
+
import { Flex } from "@jobber/components/Flex";
|
|
12
|
+
import { Heading } from "@jobber/components/Heading";
|
|
13
|
+
import { Text } from "@jobber/components/Text";
|
|
14
|
+
|
|
15
|
+
export function AnimatedPresenceBasicExample(
|
|
16
|
+
props: Partial<ComponentProps<typeof AnimatedPresence>>,
|
|
17
|
+
) {
|
|
18
|
+
const [switched, setSwitched] = useState(false);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Content>
|
|
22
|
+
<Flex template={["grow", "shrink"]}>
|
|
23
|
+
<Heading level={2}>Checkout</Heading>
|
|
24
|
+
<AnimatedSwitcher
|
|
25
|
+
switched={switched}
|
|
26
|
+
initialChild={
|
|
27
|
+
<Button
|
|
28
|
+
icon={"arrowDown"}
|
|
29
|
+
iconOnRight={true}
|
|
30
|
+
label={"View details"}
|
|
31
|
+
type="secondary"
|
|
32
|
+
onClick={() => setSwitched(!switched)}
|
|
33
|
+
/>
|
|
34
|
+
}
|
|
35
|
+
switchTo={
|
|
36
|
+
<Button
|
|
37
|
+
icon={"arrowUp"}
|
|
38
|
+
iconOnRight={true}
|
|
39
|
+
label={"Hide details"}
|
|
40
|
+
onClick={() => setSwitched(!switched)}
|
|
41
|
+
/>
|
|
42
|
+
}
|
|
43
|
+
/>
|
|
44
|
+
</Flex>
|
|
45
|
+
<AnimatedPresence {...props}>
|
|
46
|
+
{switched && (
|
|
47
|
+
<Content>
|
|
48
|
+
<Flex template={["grow", "shrink"]}>
|
|
49
|
+
<Text>Monthly subscription</Text>
|
|
50
|
+
<Text>12 x $149.00</Text>
|
|
51
|
+
</Flex>
|
|
52
|
+
<Divider />
|
|
53
|
+
<Flex template={["grow", "shrink"]}>
|
|
54
|
+
<Text>Tax</Text>
|
|
55
|
+
<Text>$89.40</Text>
|
|
56
|
+
</Flex>
|
|
57
|
+
<Divider size="large" />
|
|
58
|
+
</Content>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
<Heading level={4}>
|
|
62
|
+
<Flex template={["grow", "shrink"]}>
|
|
63
|
+
<span>Total</span>
|
|
64
|
+
<span>$1,877.40/year</span>
|
|
65
|
+
</Flex>
|
|
66
|
+
</Heading>
|
|
67
|
+
|
|
68
|
+
{switched && (
|
|
69
|
+
<Content>
|
|
70
|
+
<Divider />
|
|
71
|
+
<Text variation="subdued" size="small">
|
|
72
|
+
You will be charged something. By continuing, you agree to our
|
|
73
|
+
terms and conditions.
|
|
74
|
+
</Text>
|
|
75
|
+
</Content>
|
|
76
|
+
)}
|
|
77
|
+
</AnimatedPresence>
|
|
78
|
+
</Content>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Animated Presence List Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import type { ComponentProps } from "react";
|
|
5
|
+
import React, { useState } from "react";
|
|
6
|
+
import { AnimatedPresence } from "@jobber/components/AnimatedPresence";
|
|
7
|
+
import { Button } from "@jobber/components/Button";
|
|
8
|
+
import { Card } from "@jobber/components/Card";
|
|
9
|
+
import { Content } from "@jobber/components/Content";
|
|
10
|
+
import { Flex } from "@jobber/components/Flex";
|
|
11
|
+
import { Text } from "@jobber/components/Text";
|
|
12
|
+
|
|
13
|
+
export function AnimatedPresenceListExample({
|
|
14
|
+
initial,
|
|
15
|
+
...props
|
|
16
|
+
}: Partial<ComponentProps<typeof AnimatedPresence>>) {
|
|
17
|
+
const [count, setCount] = useState(12);
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Content>
|
|
21
|
+
<Flex template={["shrink", "shrink"]}>
|
|
22
|
+
<Button label="Add" onClick={() => setCount(count + 3)} />
|
|
23
|
+
<Button
|
|
24
|
+
label="Remove"
|
|
25
|
+
onClick={() => setCount(count - 3)}
|
|
26
|
+
disabled={count < 1}
|
|
27
|
+
/>
|
|
28
|
+
</Flex>
|
|
29
|
+
|
|
30
|
+
<Flex template={["grow", "grow", "grow"]} align="start">
|
|
31
|
+
<AnimatedPresence initial={initial ?? true} {...props}>
|
|
32
|
+
{[...Array(count)].map((_, i) => (
|
|
33
|
+
<Card key={i}>
|
|
34
|
+
<Content>
|
|
35
|
+
<Text>Card {i + 1}</Text>
|
|
36
|
+
</Content>
|
|
37
|
+
</Card>
|
|
38
|
+
))}
|
|
39
|
+
</AnimatedPresence>
|
|
40
|
+
</Flex>
|
|
41
|
+
</Content>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Animated Presence Stepper Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import type { ComponentProps } from "react";
|
|
5
|
+
import React, { useState } from "react";
|
|
6
|
+
import type { AnimatedPresenceTransitions } from "@jobber/components/AnimatedPresence";
|
|
7
|
+
import { AnimatedPresence } from "@jobber/components/AnimatedPresence";
|
|
8
|
+
import { Button } from "@jobber/components/Button";
|
|
9
|
+
import { Card } from "@jobber/components/Card";
|
|
10
|
+
import { Content } from "@jobber/components/Content";
|
|
11
|
+
import { Flex } from "@jobber/components/Flex";
|
|
12
|
+
import { Text } from "@jobber/components/Text";
|
|
13
|
+
|
|
14
|
+
export function AnimatedPresenceStepperExample({
|
|
15
|
+
transition: transitionProp,
|
|
16
|
+
...props
|
|
17
|
+
}: Partial<ComponentProps<typeof AnimatedPresence>>) {
|
|
18
|
+
const [step, setStep] = useState(1);
|
|
19
|
+
const [transition, setTransition] = useState<AnimatedPresenceTransitions>(
|
|
20
|
+
transitionProp ?? "fromLeftToRight",
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Content>
|
|
25
|
+
<Flex template={["shrink", "shrink"]}>
|
|
26
|
+
<Button
|
|
27
|
+
label="Previous"
|
|
28
|
+
disabled={step === 1}
|
|
29
|
+
onClick={() => {
|
|
30
|
+
setTransition("fromLeftToRight");
|
|
31
|
+
setTimeout(() => setStep(step - 1), 0);
|
|
32
|
+
}}
|
|
33
|
+
/>
|
|
34
|
+
<Button
|
|
35
|
+
label="Next"
|
|
36
|
+
disabled={step === 3}
|
|
37
|
+
onClick={() => {
|
|
38
|
+
setTransition("fromRightToLeft");
|
|
39
|
+
setTimeout(() => setStep(step + 1), 0);
|
|
40
|
+
}}
|
|
41
|
+
/>
|
|
42
|
+
</Flex>
|
|
43
|
+
|
|
44
|
+
<AnimatedPresence {...props} transition={transition}>
|
|
45
|
+
{step === 1 && (
|
|
46
|
+
<Card>
|
|
47
|
+
<Content>
|
|
48
|
+
<Text>Step 1</Text>
|
|
49
|
+
</Content>
|
|
50
|
+
</Card>
|
|
51
|
+
)}
|
|
52
|
+
{step === 2 && (
|
|
53
|
+
<Card>
|
|
54
|
+
<Content>
|
|
55
|
+
<Text>Step 2</Text>
|
|
56
|
+
</Content>
|
|
57
|
+
</Card>
|
|
58
|
+
)}
|
|
59
|
+
{step === 3 && (
|
|
60
|
+
<Card>
|
|
61
|
+
<Content>
|
|
62
|
+
<Text>Step 3</Text>
|
|
63
|
+
</Content>
|
|
64
|
+
</Card>
|
|
65
|
+
)}
|
|
66
|
+
</AnimatedPresence>
|
|
67
|
+
</Content>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
```
|
|
@@ -10,3 +10,9 @@ Animating between 2 icons is done in a more opinionated way where it would spin
|
|
|
10
10
|
from 1 icon to another. The animation reverses when you want to go back to the
|
|
11
11
|
initial icon. See
|
|
12
12
|
[AnimatedSwitcher/Icon example](/storybook/web/?path=/story/components-utilities-animatedswitcher--icon).
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Other Examples
|
|
16
|
+
|
|
17
|
+
[Animated Switcher Basic Example](./AnimatedSwitcherBasicExample.md)
|
|
18
|
+
[Animated Switcher Icon Example](./AnimatedSwitcherIconExample.md)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Animated Switcher Basic Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import { AnimatedSwitcher } from "@jobber/components/AnimatedSwitcher";
|
|
6
|
+
import { Button } from "@jobber/components/Button";
|
|
7
|
+
import type { AnimatedSwitcherProps } from "../AnimatedSwitcher";
|
|
8
|
+
|
|
9
|
+
export function AnimatedSwitcherBasicExample(
|
|
10
|
+
props: Partial<AnimatedSwitcherProps>,
|
|
11
|
+
) {
|
|
12
|
+
const [switched, setSwitched] = useState(false);
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<AnimatedSwitcher
|
|
16
|
+
{...props}
|
|
17
|
+
switched={switched}
|
|
18
|
+
initialChild={
|
|
19
|
+
<Button label="Mark complete" onClick={() => setSwitched(true)} />
|
|
20
|
+
}
|
|
21
|
+
switchTo={
|
|
22
|
+
<Button
|
|
23
|
+
icon="checkmark"
|
|
24
|
+
label="Complete"
|
|
25
|
+
type="secondary"
|
|
26
|
+
onClick={() => setSwitched(false)}
|
|
27
|
+
/>
|
|
28
|
+
}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Animated Switcher Icon Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import { AnimatedSwitcher } from "@jobber/components/AnimatedSwitcher";
|
|
6
|
+
import { Button } from "@jobber/components/Button";
|
|
7
|
+
import { Text } from "@jobber/components/Text";
|
|
8
|
+
|
|
9
|
+
export function AnimatedSwitcherIconExample() {
|
|
10
|
+
const [switched, setSwitched] = useState(false);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<div
|
|
15
|
+
style={{
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "space-around",
|
|
18
|
+
gap: 24,
|
|
19
|
+
marginBottom: 16,
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
<AnimatedSwitcher.Icon
|
|
23
|
+
switched={switched}
|
|
24
|
+
initialIcon="add"
|
|
25
|
+
switchToIcon="checkmark"
|
|
26
|
+
/>
|
|
27
|
+
<AnimatedSwitcher.Icon
|
|
28
|
+
switched={switched}
|
|
29
|
+
initialIcon="menu"
|
|
30
|
+
switchToIcon="longArrowLeft"
|
|
31
|
+
/>
|
|
32
|
+
<AnimatedSwitcher.Icon
|
|
33
|
+
switched={switched}
|
|
34
|
+
initialIcon="event"
|
|
35
|
+
switchToIcon="remove"
|
|
36
|
+
/>
|
|
37
|
+
<AnimatedSwitcher.Icon
|
|
38
|
+
switched={switched}
|
|
39
|
+
initialIcon="eye"
|
|
40
|
+
switchToIcon="eyeCrossed"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<Text align="center">
|
|
44
|
+
<Button
|
|
45
|
+
label="Switch icons"
|
|
46
|
+
type="tertiary"
|
|
47
|
+
size="small"
|
|
48
|
+
onClick={() => setSwitched(!switched)}
|
|
49
|
+
/>
|
|
50
|
+
</Text>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
@@ -244,3 +244,10 @@ Key features:
|
|
|
244
244
|
* Automatically updates styles when the theme changes
|
|
245
245
|
* Works with React Native's StyleSheet system
|
|
246
246
|
* Memoized so that the StyleSheet is only re-created when the theme changes
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
### Other Examples
|
|
250
|
+
|
|
251
|
+
[Atlantis Theme Context Basic Example](./AtlantisThemeContextBasicExample.md)
|
|
252
|
+
[Atlantis Theme Context Force Theme For Provider Example](./AtlantisThemeContextForceThemeForProviderExample.md)
|
|
253
|
+
[Atlantis Theme Context Override Tokens Example](./AtlantisThemeContextOverrideTokensExample.md)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Atlantis Theme Context Basic Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {
|
|
6
|
+
AtlantisThemeContextProvider,
|
|
7
|
+
updateTheme,
|
|
8
|
+
useAtlantisTheme,
|
|
9
|
+
} from "@jobber/components/AtlantisThemeContext";
|
|
10
|
+
import { Text } from "@jobber/components/Text";
|
|
11
|
+
import { Content } from "@jobber/components/Content";
|
|
12
|
+
import { Button } from "@jobber/components/Button";
|
|
13
|
+
import { InlineLabel } from "@jobber/components/InlineLabel";
|
|
14
|
+
import { Flex } from "@jobber/components/Flex";
|
|
15
|
+
import { Box } from "@jobber/components/Box";
|
|
16
|
+
|
|
17
|
+
function ChildrenComponent({
|
|
18
|
+
message = "It is possible to have multiple Atlantis Theme providers.",
|
|
19
|
+
}: {
|
|
20
|
+
readonly message?: string;
|
|
21
|
+
}) {
|
|
22
|
+
const { theme, tokens } = useAtlantisTheme();
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box background="surface" padding="base">
|
|
26
|
+
<Content>
|
|
27
|
+
<Text>{message}</Text>
|
|
28
|
+
<Text size="small">Current theme {theme}</Text>
|
|
29
|
+
<Text size="small">
|
|
30
|
+
Tokens can be accessed using tokens[token-name]
|
|
31
|
+
</Text>
|
|
32
|
+
<Text size="small">
|
|
33
|
+
For example color-surface: {tokens["color-surface"]}
|
|
34
|
+
</Text>
|
|
35
|
+
<Flex
|
|
36
|
+
gap="base"
|
|
37
|
+
align="center"
|
|
38
|
+
direction="row"
|
|
39
|
+
template={["grow", "grow"]}
|
|
40
|
+
>
|
|
41
|
+
<Button label="Set dark theme" onClick={() => updateTheme("dark")} />
|
|
42
|
+
<Button
|
|
43
|
+
label="Set light theme"
|
|
44
|
+
onClick={() => updateTheme("light")}
|
|
45
|
+
/>
|
|
46
|
+
</Flex>
|
|
47
|
+
</Content>
|
|
48
|
+
</Box>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function SecondProviderUsage({
|
|
53
|
+
message = "ThemeProviders can update the theme for all providers on a page. ",
|
|
54
|
+
}: {
|
|
55
|
+
readonly message?: string;
|
|
56
|
+
}) {
|
|
57
|
+
const { theme } = useAtlantisTheme();
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Box background="surface" padding={"base"}>
|
|
61
|
+
<Content>
|
|
62
|
+
<Text>{message}</Text>
|
|
63
|
+
<Text size="small">Current theme {theme}</Text>
|
|
64
|
+
<div style={{ display: "flex", gap: "8px" }}>
|
|
65
|
+
<InlineLabel color="red">Past due</InlineLabel>
|
|
66
|
+
<InlineLabel color="red">Changes requested</InlineLabel>
|
|
67
|
+
<InlineLabel color="yellow">Unscheduled</InlineLabel>
|
|
68
|
+
<InlineLabel color="yellow">Awaiting response</InlineLabel>
|
|
69
|
+
<InlineLabel color="green">Approved</InlineLabel>
|
|
70
|
+
<InlineLabel color="green">Paid</InlineLabel>
|
|
71
|
+
<InlineLabel color="greyBlue">Draft</InlineLabel>
|
|
72
|
+
<InlineLabel color="greyBlue">Archived</InlineLabel>
|
|
73
|
+
<InlineLabel color="lightBlue">Sent</InlineLabel>
|
|
74
|
+
<InlineLabel color="lightBlue">Converted</InlineLabel>
|
|
75
|
+
</div>
|
|
76
|
+
<Flex
|
|
77
|
+
gap="base"
|
|
78
|
+
align="center"
|
|
79
|
+
direction="row"
|
|
80
|
+
template={["grow", "grow"]}
|
|
81
|
+
>
|
|
82
|
+
<Button
|
|
83
|
+
label="Set dark theme in another provider"
|
|
84
|
+
onClick={() => updateTheme("dark")}
|
|
85
|
+
/>
|
|
86
|
+
<Button
|
|
87
|
+
label="Set light theme in another provider"
|
|
88
|
+
onClick={() => updateTheme("light")}
|
|
89
|
+
/>
|
|
90
|
+
</Flex>
|
|
91
|
+
</Content>
|
|
92
|
+
</Box>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function AtlantisThemeContextBasicExample() {
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
<AtlantisThemeContextProvider>
|
|
100
|
+
<ChildrenComponent />
|
|
101
|
+
</AtlantisThemeContextProvider>
|
|
102
|
+
<AtlantisThemeContextProvider>
|
|
103
|
+
<SecondProviderUsage />
|
|
104
|
+
</AtlantisThemeContextProvider>
|
|
105
|
+
</>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Atlantis Theme Context Force Theme For Provider Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {
|
|
6
|
+
AtlantisThemeContextProvider,
|
|
7
|
+
updateTheme,
|
|
8
|
+
useAtlantisTheme,
|
|
9
|
+
} from "@jobber/components/AtlantisThemeContext";
|
|
10
|
+
import { Text } from "@jobber/components/Text";
|
|
11
|
+
import { Content } from "@jobber/components/Content";
|
|
12
|
+
import { Button } from "@jobber/components/Button";
|
|
13
|
+
import { InlineLabel } from "@jobber/components/InlineLabel";
|
|
14
|
+
import { Flex } from "@jobber/components/Flex";
|
|
15
|
+
import { Box } from "@jobber/components/Box";
|
|
16
|
+
|
|
17
|
+
function ChildrenComponent({
|
|
18
|
+
message = "It is possible to have multiple Atlantis Theme providers.",
|
|
19
|
+
}: {
|
|
20
|
+
readonly message?: string;
|
|
21
|
+
}) {
|
|
22
|
+
const { theme, tokens } = useAtlantisTheme();
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Box background="surface" padding="base">
|
|
26
|
+
<Content>
|
|
27
|
+
<Text>{message}</Text>
|
|
28
|
+
<Text size="small">Current theme {theme}</Text>
|
|
29
|
+
<Text size="small">
|
|
30
|
+
Tokens can be accessed using tokens[token-name]
|
|
31
|
+
</Text>
|
|
32
|
+
<Text size="small">
|
|
33
|
+
For example color-surface: {tokens["color-surface"]}
|
|
34
|
+
</Text>
|
|
35
|
+
<Flex
|
|
36
|
+
gap="base"
|
|
37
|
+
align="center"
|
|
38
|
+
direction="row"
|
|
39
|
+
template={["grow", "grow"]}
|
|
40
|
+
>
|
|
41
|
+
<Button label="Set dark theme" onClick={() => updateTheme("dark")} />
|
|
42
|
+
<Button
|
|
43
|
+
label="Set light theme"
|
|
44
|
+
onClick={() => updateTheme("light")}
|
|
45
|
+
/>
|
|
46
|
+
</Flex>
|
|
47
|
+
</Content>
|
|
48
|
+
</Box>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function SecondProviderUsage({
|
|
53
|
+
message = "ThemeProviders can update the theme for all providers on a page. ",
|
|
54
|
+
}: {
|
|
55
|
+
readonly message?: string;
|
|
56
|
+
}) {
|
|
57
|
+
const { theme } = useAtlantisTheme();
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<Box background="surface" padding={"base"}>
|
|
61
|
+
<Content>
|
|
62
|
+
<Text>{message}</Text>
|
|
63
|
+
<Text size="small">Current theme {theme}</Text>
|
|
64
|
+
<div style={{ display: "flex", gap: "8px" }}>
|
|
65
|
+
<InlineLabel color="red">Past due</InlineLabel>
|
|
66
|
+
<InlineLabel color="red">Changes requested</InlineLabel>
|
|
67
|
+
<InlineLabel color="yellow">Unscheduled</InlineLabel>
|
|
68
|
+
<InlineLabel color="yellow">Awaiting response</InlineLabel>
|
|
69
|
+
<InlineLabel color="green">Approved</InlineLabel>
|
|
70
|
+
<InlineLabel color="green">Paid</InlineLabel>
|
|
71
|
+
<InlineLabel color="greyBlue">Draft</InlineLabel>
|
|
72
|
+
<InlineLabel color="greyBlue">Archived</InlineLabel>
|
|
73
|
+
<InlineLabel color="lightBlue">Sent</InlineLabel>
|
|
74
|
+
<InlineLabel color="lightBlue">Converted</InlineLabel>
|
|
75
|
+
</div>
|
|
76
|
+
<Flex
|
|
77
|
+
gap="base"
|
|
78
|
+
align="center"
|
|
79
|
+
direction="row"
|
|
80
|
+
template={["grow", "grow"]}
|
|
81
|
+
>
|
|
82
|
+
<Button
|
|
83
|
+
label="Set dark theme in another provider"
|
|
84
|
+
onClick={() => updateTheme("dark")}
|
|
85
|
+
/>
|
|
86
|
+
<Button
|
|
87
|
+
label="Set light theme in another provider"
|
|
88
|
+
onClick={() => updateTheme("light")}
|
|
89
|
+
/>
|
|
90
|
+
</Flex>
|
|
91
|
+
</Content>
|
|
92
|
+
</Box>
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function AtlantisThemeContextForceThemeForProviderExample() {
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
<AtlantisThemeContextProvider>
|
|
100
|
+
<ChildrenComponent message="It is possible to have a provider ignore Theme Changes" />
|
|
101
|
+
</AtlantisThemeContextProvider>
|
|
102
|
+
<AtlantisThemeContextProvider dangerouslyOverrideTheme="dark">
|
|
103
|
+
<SecondProviderUsage message="This theme provider will always use the dark theme" />
|
|
104
|
+
</AtlantisThemeContextProvider>
|
|
105
|
+
</>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
```
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Atlantis Theme Context Override Tokens Example
|
|
2
|
+
|
|
3
|
+
```tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import {
|
|
6
|
+
AtlantisThemeContextProvider,
|
|
7
|
+
updateTheme,
|
|
8
|
+
useAtlantisTheme,
|
|
9
|
+
} from "@jobber/components/AtlantisThemeContext";
|
|
10
|
+
import { Text } from "@jobber/components/Text";
|
|
11
|
+
import { Content } from "@jobber/components/Content";
|
|
12
|
+
import { Button } from "@jobber/components/Button";
|
|
13
|
+
import { InlineLabel } from "@jobber/components/InlineLabel";
|
|
14
|
+
import { Flex } from "@jobber/components/Flex";
|
|
15
|
+
import { Box } from "@jobber/components/Box";
|
|
16
|
+
|
|
17
|
+
function OverrideTokensComponent({ message }: { readonly message: string }) {
|
|
18
|
+
const { theme, tokens, overrideTokens } = useAtlantisTheme();
|
|
19
|
+
const customBrandColor = overrideTokens?.["custom-brand-color"];
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<Box background="surface" padding="base">
|
|
23
|
+
<Content>
|
|
24
|
+
<Text>{message}</Text>
|
|
25
|
+
<Text size="small">Current theme: {theme}</Text>
|
|
26
|
+
<Text size="small">Original color-text: {tokens["color-text"]}</Text>
|
|
27
|
+
<Text size="small">Original space-base: {tokens["space-base"]}</Text>
|
|
28
|
+
<div style={{ backgroundColor: "var(--custom-brand-color)" }}>
|
|
29
|
+
<Text size="small">Custom token example: {customBrandColor}</Text>
|
|
30
|
+
</div>
|
|
31
|
+
<div style={{ display: "flex", gap: "8px", marginTop: "16px" }}>
|
|
32
|
+
<InlineLabel color="red">Notice the custom styling</InlineLabel>
|
|
33
|
+
<InlineLabel color="green">With overridden tokens</InlineLabel>
|
|
34
|
+
<InlineLabel color="lightBlue">Applied throughout</InlineLabel>
|
|
35
|
+
</div>
|
|
36
|
+
<Flex
|
|
37
|
+
gap="base"
|
|
38
|
+
align="center"
|
|
39
|
+
direction="row"
|
|
40
|
+
template={["grow", "grow"]}
|
|
41
|
+
>
|
|
42
|
+
<Button label="Test dark theme" onClick={() => updateTheme("dark")} />
|
|
43
|
+
<Button
|
|
44
|
+
label="Test light theme"
|
|
45
|
+
onClick={() => updateTheme("light")}
|
|
46
|
+
/>
|
|
47
|
+
</Flex>
|
|
48
|
+
</Content>
|
|
49
|
+
</Box>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function AtlantisThemeContextOverrideTokensExample() {
|
|
54
|
+
const customTokens = {
|
|
55
|
+
"color-text": "hsl(280, 100%, 50%)",
|
|
56
|
+
"color-critical--onSurface": "blue",
|
|
57
|
+
"color-success--onSurface": "blue",
|
|
58
|
+
"color-informative--onSurface": "blue",
|
|
59
|
+
"color-interactive": "hsl(280, 100%, 50%)",
|
|
60
|
+
"color-interactive--hover": "hsl(280, 85%, 37%)",
|
|
61
|
+
"custom-brand-color": "hsl(120, 81%, 50%)",
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<>
|
|
66
|
+
<AtlantisThemeContextProvider dangerouslyOverrideTokens={customTokens}>
|
|
67
|
+
<OverrideTokensComponent message="Provider with overridden tokens" />
|
|
68
|
+
</AtlantisThemeContextProvider>
|
|
69
|
+
<AtlantisThemeContextProvider
|
|
70
|
+
dangerouslyOverrideTheme="dark"
|
|
71
|
+
dangerouslyOverrideTokens={customTokens}
|
|
72
|
+
>
|
|
73
|
+
<OverrideTokensComponent message="Provider with overridden tokens - forced dark" />
|
|
74
|
+
</AtlantisThemeContextProvider>
|
|
75
|
+
</>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
```
|