├── .codesandbox └── ci.json ├── .eslintignore ├── .eslintrc.js ├── .github ├── CODEOWNERS ├── PULL_REQUEST_TEMPLATE.md ├── renovate.json └── workflows │ ├── codeql-analysis.yml │ ├── main.yml │ └── pr.yml ├── .gitignore ├── .husky ├── pre-commit └── pre-push ├── .loki ├── .gitignore └── reference │ └── chrome.laptop │ ├── Data_Display │ ├── Avatar_Basic.png │ ├── Avatar_Image.png │ ├── Avatar_Text.png │ ├── Chip_Examples.png │ ├── DescriptionList_Description_Raw.png │ ├── DescriptionList_Fallback.png │ ├── DescriptionList_Inset.png │ ├── DescriptionList_Large.png │ ├── DescriptionList_Medium.png │ ├── DescriptionList_Nested.png │ ├── DescriptionList_Payment.png │ ├── DescriptionList_Small.png │ ├── OverflowText_Basic.png │ ├── OverflowText_Custom_Tooltip.png │ ├── SvgIcon_Basic.png │ ├── SvgIcon_Custom_Size.png │ ├── Tag_Bold.png │ ├── Tag_Subtle.png │ ├── Tooltip_Basic.png │ ├── Typography_Basic.png │ ├── Typography_Error.png │ ├── Typography_Primary.png │ ├── Typography_Secondary.png │ ├── Typography_Text_Primary.png │ └── Typography_Text_Secondary.png │ ├── Dates │ ├── Calendar_Basic.png │ ├── Calendar_Disabled_Days.png │ ├── Calendar_Footer.png │ ├── Calendar_Highlighted_Days.png │ ├── Calendar_Quick_Selection.png │ ├── DateField_Adornment.png │ ├── DateField_Advanced.png │ ├── DateField_Basic.png │ ├── DateField_Custom_Empty_Text.png │ ├── DateField_Disable_Close_On_Select.png │ ├── DateField_Disabled.png │ ├── DateField_Enable_Clearable.png │ ├── DateField_Error_State.png │ ├── DateField_Full_Width.png │ ├── DateRangeField_Adornment.png │ ├── DateRangeField_Advanced.png │ ├── DateRangeField_Basic.png │ ├── DateRangeField_Custom_Empty_Text.png │ ├── DateRangeField_Disable_Close_On_Select.png │ ├── DateRangeField_Disabled.png │ ├── DateRangeField_Enable_Clearable.png │ ├── DateRangeField_Error_State.png │ ├── DateRangeField_Full_Width.png │ ├── TimeField_Adornment.png │ ├── TimeField_Advanced.png │ ├── TimeField_Basic.png │ ├── TimeField_Disabled.png │ └── TimeField_Error_State.png │ ├── Feedback │ └── Dialog_Basic.png │ ├── Inputs │ ├── Autocomplete_Basic.png │ ├── Autocomplete_Disable_Clearable.png │ ├── Autocomplete_Disabled.png │ ├── Autocomplete_Error.png │ ├── Autocomplete_Force_Popup_Icon.png │ ├── Autocomplete_Loading.png │ ├── Avatar_Button_Basic.png │ ├── Avatar_Button_Disabled.png │ ├── Avatar_Button_Interactive.png │ ├── Avatar_Button_Loading.png │ ├── Avatar_Button_Picture_Basic.png │ ├── Avatar_Button_Picture_Disabled.png │ ├── Avatar_Button_Picture_Loading.png │ ├── Avatar_Button_Text_Basic.png │ ├── Avatar_Button_Text_Disabled.png │ ├── Avatar_Button_Text_Loading.png │ ├── CardButton_Basic.png │ ├── CardButton_Disabled.png │ ├── CardButton_End_Icon.png │ ├── CardButton_Error.png │ ├── CardButton_Large.png │ ├── CardButton_Small.png │ ├── CheckboxField_Basic.png │ ├── CheckboxField_Disabled.png │ ├── CheckboxField_Error.png │ ├── CheckboxField_Group.png │ ├── CheckboxField_Indeterminate.png │ ├── CheckboxField_Inline_Form.png │ ├── CheckboxField_Label_Placement.png │ ├── IconButton_Basic.png │ ├── IconButton_Colors.png │ ├── IconButton_Disabled.png │ ├── IconButton_Sizes.png │ ├── NumberField_Basic.png │ ├── NumberField_Decimal_Scale.png │ ├── NumberField_Decimal_Separator.png │ ├── NumberField_Error.png │ ├── NumberField_Format.png │ ├── NumberField_Prefix.png │ ├── NumberField_Text.png │ ├── NumberField_Without_Separator.png │ ├── Pagination_Basic.png │ ├── Pagination_Disabled.png │ ├── PatternField_Card.png │ ├── PatternField_Error.png │ ├── PatternField_Phone.png │ ├── PatternField_Value_Check.png │ ├── RadioField_Basic.png │ ├── RadioField_Disabled.png │ ├── RadioField_Error.png │ ├── RadioField_Group.png │ ├── RadioField_Inline_Form.png │ ├── RadioField_Label_Placement.png │ ├── RadioField_Radio_Card.png │ ├── RadioField_Radio_Card_Disabled.png │ ├── RadioField_Radio_Group_Card.png │ ├── Switch_Basic.png │ ├── Switch_Disabled.png │ ├── Switch_Inline_Form.png │ ├── Switch_Labelled.png │ ├── TextField_Basic.png │ ├── TextField_Disabled.png │ ├── TextField_End_Adornment.png │ ├── TextField_Error.png │ ├── TextField_Full_Width.png │ ├── TextField_Multiline.png │ ├── TextField_Select.png │ └── TextField_Start_Adornment.png │ ├── Lab │ ├── Alert_Basic.png │ ├── Banner_Basic.png │ ├── Box_Basic.png │ ├── ButtonArea_Basic.png │ ├── Button_Anchor.png │ ├── Button_Basic.png │ ├── Button_Full_Width.png │ ├── Button_Sizes.png │ ├── Chat_Empty_Array_Chat.png │ ├── Chat_Empty_Chat.png │ ├── Chat_Empty_Nullable_Chat.png │ ├── Chat_Lorem_Ipsum.png │ ├── Chat_Multiple_Messages.png │ ├── Chat_Single_Message.png │ ├── Chat_Styling_The_Chat.png │ ├── DescriptionDottedLineItem_Description.png │ ├── DescriptionDottedLineItem_Description_Raw.png │ ├── DescriptionItem_Basic.png │ ├── DescriptionItem_Complex.png │ ├── DescriptionItem_Description_Raw.png │ ├── DescriptionItem_Fallback.png │ ├── DescriptionItem_Inset.png │ ├── DescriptionItem_Wrap.png │ ├── DescriptionLineItem_Description.png │ ├── FileDropZone_Accept.png │ ├── FileDropZone_Basic.png │ ├── FileDropZone_Max_Files.png │ ├── FileDropZone_Max_Size.png │ ├── FileListItem_Basic.png │ ├── FileListItem_Status.png │ ├── FlagList_Basic.png │ ├── FlagList_Headerless.png │ ├── FlagList_With_Tooltips.png │ ├── LinkedText_Basic.png │ ├── LinkedText_Custom_Link_Component.png │ ├── MultilineText_Basic.png │ ├── Navbar_Basic.png │ ├── Sidebar_Basic.png │ ├── Sidebar_Checkbox.png │ ├── Sidebar_Checkbox_Many.png │ ├── Sidebar_Complex.png │ ├── Sidebar_List.png │ ├── TextBox_Alignment.png │ ├── TextBox_Basic.png │ ├── TextBox_Colors.png │ ├── TextBox_No_Wrap.png │ ├── TextBox_Responsive_Alignment.png │ ├── TextBox_Variants.png │ └── TextBox_Wrap_Overflow.png │ ├── Layout │ ├── Columns_Alignment.png │ ├── Columns_Available_Widths.png │ ├── Columns_Collapse_Below_Desktop.png │ ├── Columns_Collapse_Below_Tablet.png │ ├── Columns_Custom_Space.png │ ├── Columns_No_Space.png │ ├── Columns_Overflow_Text.png │ ├── Columns_Responsive_Alignment.png │ ├── Columns_Responsive_Reverse.png │ ├── Columns_Responsive_Space.png │ ├── Columns_Responsive_Widths.png │ ├── Columns_Reverse.png │ ├── Columns_Reverse_And_Collapse_Below_Tablet.png │ ├── Inline_Basic.png │ ├── Inline_Empty_Elements.png │ ├── Inline_Horizontal_Alignment.png │ ├── Inline_No_Wrap.png │ ├── Inline_Responsive_Horizontal_Alignment.png │ ├── Inline_Responsive_Space.png │ ├── Inline_Responsive_Vertical_Alignment.png │ ├── Inline_Vertical_Alignment.png │ ├── Preloader_Basic.png │ ├── Preloader_Linear.png │ ├── Stack_Alignment.png │ ├── Stack_Basic.png │ ├── Stack_Dynamic_Width.png │ ├── Stack_Empty_Elements.png │ ├── Stack_Responsive_Alignment.png │ ├── Stack_Responsive_Space.png │ ├── Tiles_Basic.png │ ├── Tiles_Responsive_Columns.png │ └── Tiles_Responsive_Space.png │ ├── Navigation │ ├── AppDrawer_Basic.png │ ├── AppDrawer_Drawer_List.png │ ├── AppDrawer_Drawer_With_Back_Button.png │ ├── Drawer_Basic.png │ ├── Drawer_Drawer_List.png │ ├── Drawer_Title_End_Action.png │ ├── Drawer_Title_Start_Action.png │ ├── Link_Basic.png │ ├── Link_Colors.png │ ├── Link_Multiline.png │ ├── Link_Multiline_Button.png │ ├── Tabs_Basic.png │ └── Tabs_Scroll_Buttons.png │ ├── Phones │ ├── PhoneField_Basic.png │ ├── PhoneField_Disabled.png │ ├── PhoneField_Validation.png │ ├── PhoneLink_Basic.png │ ├── PhoneLink_Fallback.png │ ├── PhoneText_Basic.png │ └── PhoneText_Fallback.png │ ├── Recipes │ ├── Forms_Number_Fields.png │ └── Forms_Sign_Up.png │ └── Surfaces │ ├── AdaptiveToolbar_Basic.png │ ├── AdaptiveToolbar_Group.png │ ├── AdaptiveVerticalToolbar_Basic.png │ ├── AdaptiveVerticalToolbar_Custom_More.png │ ├── AppBar_Basic.png │ ├── AppBar_Dense.png │ ├── Card_Basic.png │ ├── InfoCard_Basic.png │ ├── InfoCard_Large.png │ ├── InfoTooltip_Basic.png │ ├── InfoTooltip_Large.png │ ├── InfoTooltip_Medium.png │ ├── InfoTooltip_Noninteractive.png │ └── InfoTooltip_With_Label.png ├── .prettierignore ├── .storybook ├── main.js └── preview.js ├── LICENSE ├── README.md ├── babel.config.js ├── config └── createBabelConfig.js ├── cypress.json ├── cypress ├── integration │ └── lab │ │ ├── DescriptionItem.spec.ts │ │ └── Sidebar.spec.ts ├── plugins │ └── index.js ├── support │ ├── commands.ts │ └── index.ts └── tsconfig.json ├── firebase.json ├── globalSetup.ts ├── jest-resolver.js ├── lerna.json ├── loki.config.js ├── package.json ├── packages ├── __docs__ │ ├── Empty.tsx │ ├── FrameComponent.tsx │ ├── Placeholder.tsx │ ├── PropsLink.tsx │ ├── UseState.tsx │ ├── index.ts │ └── package.json ├── __testutils__ │ ├── DateTestUtils.ts │ ├── defer.ts │ ├── index.ts │ ├── package.json │ ├── renderCSS.tsx │ ├── renderComponent.tsx │ ├── renderTheme.tsx │ └── tsconfig.json ├── dates │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── playroom.ts │ ├── src │ │ ├── __tests__ │ │ │ └── index.spec.ts │ │ ├── base-date-picker │ │ │ └── BaseDatePicker.tsx │ │ ├── calendar │ │ │ ├── Calendar.playroom.tsx │ │ │ ├── Calendar.spec.tsx │ │ │ ├── Calendar.stories.tsx │ │ │ ├── Calendar.tsx │ │ │ ├── CalendarQuickSelection.tsx │ │ │ └── InternalCalendarComponents.tsx │ │ ├── date-config │ │ │ ├── DateConfig.spec.tsx │ │ │ └── DateConfig.tsx │ │ ├── date-field │ │ │ ├── DateField.playroom.tsx │ │ │ ├── DateField.spec.tsx │ │ │ ├── DateField.stories.tsx │ │ │ └── DateField.tsx │ │ ├── date-range-field │ │ │ ├── DateRangeField.playroom.tsx │ │ │ ├── DateRangeField.spec.tsx │ │ │ ├── DateRangeField.stories.tsx │ │ │ └── DateRangeField.tsx │ │ ├── date-time-utils │ │ │ ├── DateTimeUtils.spec.ts │ │ │ └── DateTimeUtils.ts │ │ ├── date-utils │ │ │ ├── DateUtils.spec.ts │ │ │ └── DateUtils.ts │ │ ├── formatted-date │ │ │ ├── FormattedDate.spec.tsx │ │ │ ├── FormattedDate.stories.tsx │ │ │ └── FormattedDate.ts │ │ ├── formatted-relative-time │ │ │ ├── FormattedRelativeTime.spec.tsx │ │ │ └── FormattedRelativeTime.ts │ │ ├── index.ts │ │ ├── time-field │ │ │ ├── TimeField.playroom.tsx │ │ │ ├── TimeField.stories.tsx │ │ │ └── TimeField.tsx │ │ ├── use-date-time-range │ │ │ ├── useDateTimeRange.spec.ts │ │ │ └── useDateTimeRange.ts │ │ └── use-date-time │ │ │ ├── useDateTime.spec.ts │ │ │ └── useDateTime.ts │ └── tsconfig.json ├── eslint-plugin │ ├── README.md │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── rules │ │ │ ├── no-color-literals.spec.ts │ │ │ ├── no-color-literals.ts │ │ │ ├── no-restricted-modules.spec.ts │ │ │ └── no-restricted-modules.ts │ │ └── utils │ │ │ └── createRule.ts │ └── tsconfig.json ├── forms │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── src │ │ ├── Forms.stories.tsx │ │ ├── Numbers.stories.tsx │ │ ├── __tests__ │ │ │ └── index.spec.ts │ │ ├── __testutils__ │ │ │ ├── renderFormField.tsx │ │ │ └── renderProvider.tsx │ │ ├── checkbox │ │ │ ├── FormikCheckboxField.spec.tsx │ │ │ └── FormikCheckboxField.tsx │ │ ├── date │ │ │ ├── FormikDateField.spec.tsx │ │ │ └── FormikDateField.tsx │ │ ├── enhanced │ │ │ ├── FormikEnhanced.spec.tsx │ │ │ ├── FormikEnhanced.tsx │ │ │ ├── FormsProvider.tsx │ │ │ └── useFormikEnhanced.ts │ │ ├── index.ts │ │ ├── phone │ │ │ ├── FormikPhoneField.spec.tsx │ │ │ └── FormikPhoneField.tsx │ │ ├── radio │ │ │ ├── FormikRadioFieldCard.tsx │ │ │ ├── FormikRadioGroupField.spec.tsx │ │ │ └── FormikRadioGroupField.tsx │ │ └── text │ │ │ ├── FormikCurrencyField.tsx │ │ │ ├── FormikMaxLengthTextField.spec.tsx │ │ │ ├── FormikMaxLengthTextField.tsx │ │ │ ├── FormikNumberField.tsx │ │ │ ├── FormikPasswordField.tsx │ │ │ ├── FormikPatternField.tsx │ │ │ ├── FormikTextField.spec.tsx │ │ │ ├── FormikTextField.tsx │ │ │ ├── constants.ts │ │ │ └── utils.tsx │ └── tsconfig.json ├── hooks │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── src │ │ ├── constant │ │ │ ├── useConstant.spec.ts │ │ │ └── useConstant.ts │ │ ├── deep-equal-memo │ │ │ ├── useDeepEqualMemo.spec.ts │ │ │ └── useDeepEqualMemo.ts │ │ ├── deep-equal-value │ │ │ ├── useDeepEqualValue.spec.ts │ │ │ └── useDeepEqualValue.ts │ │ ├── event-handler │ │ │ ├── useEventHandler.spec.ts │ │ │ └── useEventHandler.ts │ │ ├── index.spec.ts │ │ ├── index.ts │ │ ├── is-mounted │ │ │ └── useIsMounted.ts │ │ ├── isomorphic-layout-effect │ │ │ └── useIsomorphicLayoutEffect.ts │ │ └── value-observer │ │ │ ├── useValueObserver.spec.ts │ │ │ └── useValueObserver.ts │ └── tsconfig.json ├── jestutils │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── src │ │ ├── __tests__ │ │ │ ├── index.ts │ │ │ ├── mockEndpoint.spec.ts │ │ │ └── mockEndpoints.spec.ts │ │ ├── index.ts │ │ ├── matchers │ │ │ └── date-matchers.ts │ │ ├── mockEndpoint.ts │ │ ├── mockEndpoints.ts │ │ ├── serializers │ │ │ ├── __tests__ │ │ │ │ ├── blob-serializer.spec.ts │ │ │ │ ├── form-data-serializer.spec.ts │ │ │ │ └── location-serializer.spec.ts │ │ │ ├── blob-serializer.ts │ │ │ ├── form-data-serializer.ts │ │ │ └── location-serializer.ts │ │ └── spyLogs.ts │ └── tsconfig.json ├── lab │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── playroom.ts │ ├── src │ │ ├── alert │ │ │ ├── Alert.stories.tsx │ │ │ └── Alert.tsx │ │ ├── banner │ │ │ ├── Banner.stories.tsx │ │ │ └── Banner.tsx │ │ ├── box │ │ │ ├── Box.stories.tsx │ │ │ └── Box.tsx │ │ ├── button-area │ │ │ ├── ButtonArea.stories.tsx │ │ │ └── ButtonArea.tsx │ │ ├── button │ │ │ ├── Button.stories.tsx │ │ │ └── Button.tsx │ │ ├── chat │ │ │ ├── Chat.stories.tsx │ │ │ ├── Chat.tsx │ │ │ ├── ChatMessage.tsx │ │ │ ├── README.MD │ │ │ └── __tests__ │ │ │ │ ├── Chat.spec.tsx │ │ │ │ └── ChatMessage.spec.tsx │ │ ├── container │ │ │ └── Container.tsx │ │ ├── description-item │ │ │ ├── DescriptionItem.stories.tsx │ │ │ └── DescriptionItem.tsx │ │ ├── description-line-item │ │ │ ├── DescriptionLineItem.stories.tsx │ │ │ └── DescriptionLineItem.tsx │ │ ├── file-drop-zone │ │ │ ├── FileDropZone.stories.tsx │ │ │ └── FileDropZone.tsx │ │ ├── file-list-item │ │ │ ├── FileListItem.stories.tsx │ │ │ ├── FileListItem.tsx │ │ │ └── __tests__ │ │ │ │ └── FileListItem.spec.tsx │ │ ├── flag-list │ │ │ ├── FlagList.stories.tsx │ │ │ ├── FlagList.tsx │ │ │ └── FlagListItem.tsx │ │ ├── index.spec.ts │ │ ├── index.ts │ │ ├── linked-text │ │ │ ├── LinkeText.stories.tsx │ │ │ └── LinkedText.tsx │ │ ├── multiline-text │ │ │ ├── MultilineText.stories.tsx │ │ │ └── MultilineText.ts │ │ ├── navbar │ │ │ ├── Navbar.stories.tsx │ │ │ ├── Navbar.tsx │ │ │ ├── NavbarAccordion.tsx │ │ │ ├── NavbarAvatar.tsx │ │ │ ├── NavbarBottomBar.tsx │ │ │ ├── NavbarContext.tsx │ │ │ ├── NavbarItem.tsx │ │ │ ├── NavbarList.tsx │ │ │ └── NavbarMenu.tsx │ │ ├── sidebar │ │ │ ├── Sidebar.stories.tsx │ │ │ ├── Sidebar.tsx │ │ │ ├── SidebarBackButton.tsx │ │ │ ├── SidebarContainer.tsx │ │ │ ├── SidebarContent.tsx │ │ │ ├── SidebarDivider.tsx │ │ │ ├── SidebarMenuItem.tsx │ │ │ ├── SidebarMenuItemAction.tsx │ │ │ ├── SidebarMenuItemAvatar.tsx │ │ │ ├── SidebarMenuItemContext.tsx │ │ │ └── SidebarSubheader.tsx │ │ ├── styled.d.ts │ │ ├── text-box │ │ │ ├── TextBox.stories.tsx │ │ │ └── TextBox.tsx │ │ └── utils │ │ │ ├── RuleNormalizer.ts │ │ │ └── mergeStyles.ts │ └── tsconfig.json ├── phones │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── playroom.ts │ ├── src │ │ ├── __tests__ │ │ │ └── index.spec.ts │ │ ├── apn │ │ │ └── APN.ts │ │ ├── country-code-metadata │ │ │ ├── CountryCodeMetadata.spec.ts │ │ │ └── CountryCodeMetadata.ts │ │ ├── formatted-phone-number │ │ │ └── FormattedPhoneNumber.ts │ │ ├── index.ts │ │ ├── phone-field │ │ │ ├── PhoneField.playroom.tsx │ │ │ ├── PhoneField.spec.tsx │ │ │ ├── PhoneField.stories.tsx │ │ │ ├── PhoneField.tsx │ │ │ ├── PhoneFieldFlag.tsx │ │ │ ├── PhoneFieldMenu.tsx │ │ │ ├── PhoneFieldMenuItem.spec.tsx │ │ │ ├── PhoneFieldMenuItem.tsx │ │ │ └── PhoneFieldStartAdornment.tsx │ │ ├── phone-link │ │ │ ├── PhoneLink.spec.tsx │ │ │ ├── PhoneLink.stories.tsx │ │ │ └── PhoneLink.tsx │ │ ├── phone-service │ │ │ ├── PhoneService.spec.ts │ │ │ └── PhoneService.ts │ │ └── phone-text │ │ │ ├── PhoneText.spec.tsx │ │ │ ├── PhoneText.stories.tsx │ │ │ └── PhoneText.tsx │ └── tsconfig.json ├── testutils │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── src │ │ ├── MockSchema.ts │ │ ├── __tests__ │ │ │ └── index.ts │ │ └── index.ts │ └── tsconfig.json └── ui │ ├── .babelrc.js │ ├── README.md │ ├── package.json │ ├── playroom.ts │ ├── src │ ├── Image │ │ └── Image.tsx │ ├── LightDark │ │ └── LightDark.tsx │ ├── __tests__ │ │ └── index.spec.ts │ ├── adaptive-toolbar │ │ ├── AdaptiveToolbar.stories.tsx │ │ ├── AdaptiveToolbar.tsx │ │ └── __tests__ │ │ │ └── AdaptiveToolbar.spec.tsx │ ├── adaptive-vertical-toolbar │ │ ├── AdaptiveVerticalToolbar.stories.tsx │ │ └── AdaptiveVerticalToolbar.tsx │ ├── app-bar │ │ ├── AppBar.stories.tsx │ │ ├── AppBarOverrides.ts │ │ └── __tests__ │ │ │ └── AppBar.spec.tsx │ ├── app-drawer │ │ ├── AppDrawer.stories.tsx │ │ ├── AppDrawer.tsx │ │ └── constants.ts │ ├── autocomplete │ │ ├── Autocomplete.stories.tsx │ │ ├── AutocompleteOverrides.tsx │ │ └── __tests__ │ │ │ └── Autocomplete.spec.tsx │ ├── avatar-button │ │ ├── AvatarButton.stories.tsx │ │ ├── AvatarButton.tsx │ │ └── __tests__ │ │ │ └── AvatarButton.spec.tsx │ ├── avatar │ │ ├── Avatar.stories.tsx │ │ ├── AvatarOverrides.ts │ │ └── __tests__ │ │ │ └── Avatar.spec.tsx │ ├── button │ │ ├── Button.tsx │ │ ├── ButtonOverrides.ts │ │ └── __tests__ │ │ │ └── Button.spec.tsx │ ├── card-button │ │ ├── CardButton.stories.tsx │ │ ├── CardButton.tsx │ │ └── __tests__ │ │ │ └── CardButton.spec.tsx │ ├── card │ │ ├── Card.stories.tsx │ │ ├── CardOverrides.ts │ │ └── __tests__ │ │ │ └── Card.spec.tsx │ ├── checkbox │ │ ├── CheckboxField.stories.tsx │ │ ├── CheckboxField.tsx │ │ ├── CheckboxGroudField.tsx │ │ ├── CheckboxOverrides.tsx │ │ └── __tests__ │ │ │ └── Checkbox.spec.tsx │ ├── chip │ │ ├── Chip.stories.tsx │ │ ├── ChipOverrides.tsx │ │ └── __tests__ │ │ │ └── Chip.spec.tsx │ ├── columns │ │ ├── Column.tsx │ │ ├── Columns.stories.tsx │ │ └── Columns.tsx │ ├── description-list │ │ ├── DescriptionList.spec.tsx │ │ ├── DescriptionList.stories.tsx │ │ └── DescriptionList.tsx │ ├── dialog │ │ ├── Dialog.playroom.tsx │ │ ├── Dialog.stories.tsx │ │ ├── DialogOverrides.ts │ │ └── __tests__ │ │ │ └── Dialog.spec.tsx │ ├── drawer │ │ ├── Drawer.playroom.tsx │ │ ├── Drawer.stories.tsx │ │ ├── DrawerActions.tsx │ │ ├── DrawerContent.tsx │ │ ├── DrawerList.tsx │ │ ├── DrawerOverrides.ts │ │ ├── DrawerTitle.tsx │ │ └── __tests__ │ │ │ └── Drawer.spec.tsx │ ├── dropdown-button │ │ ├── DropdownButton.stories.tsx │ │ └── DropdownButton.tsx │ ├── grid │ │ ├── GridStack.tsx │ │ └── InlineGrid.tsx │ ├── icon-button │ │ ├── IconButton.stories.tsx │ │ ├── IconButtonOverrides.ts │ │ └── __tests__ │ │ │ └── IconButton.spec.tsx │ ├── index.ts │ ├── info-card │ │ ├── InfoCard.stories.tsx │ │ ├── InfoCard.tsx │ │ └── __tests__ │ │ │ └── InfoCard.spec.tsx │ ├── info-tooltip │ │ ├── InfoTooltip.stories.tsx │ │ ├── InfoTooltip.tsx │ │ └── __tests__ │ │ │ └── InfoTooltip.spec.tsx │ ├── inline │ │ ├── Inline.stories.tsx │ │ └── Inline.tsx │ ├── link │ │ ├── Link.stories.tsx │ │ ├── LinkOverrides.ts │ │ └── __tests__ │ │ │ └── Link.spec.tsx │ ├── list │ │ ├── ListOverrides.ts │ │ └── __tests__ │ │ │ └── List.spec.tsx │ ├── menu │ │ ├── Menu.stories.tsx │ │ ├── MenuOverrides.ts │ │ └── __tests__ │ │ │ └── Menu.spec.tsx │ ├── number-field │ │ ├── NumberField.stories.tsx │ │ └── NumberField.tsx │ ├── overflow-text │ │ ├── OverflowText.stories.tsx │ │ ├── OverflowText.tsx │ │ └── __tests__ │ │ │ └── OverflowText.spec.tsx │ ├── pagination │ │ ├── Pagination.stories.tsx │ │ ├── PaginationOverrides.ts │ │ └── __tests__ │ │ │ └── Pagination.spec.tsx │ ├── paper │ │ ├── PaperOverrides.ts │ │ └── __tests__ │ │ │ └── Paper.spec.tsx │ ├── pattern-field │ │ ├── PatternField.spec.tsx │ │ ├── PatternField.stories.tsx │ │ └── PatternField.tsx │ ├── preloader │ │ ├── PreLoaderOverrides.ts │ │ ├── Preloader.stories.tsx │ │ └── __tests__ │ │ │ └── Preloader.spec.tsx │ ├── props │ │ ├── AlignProps.ts │ │ ├── CollapseProp.ts │ │ ├── ResponsiveProp.ts │ │ └── SpaceProp.ts │ ├── radio │ │ ├── RadioField.stories.tsx │ │ ├── RadioField.tsx │ │ ├── RadioFieldCard.tsx │ │ ├── RadioGroupField.tsx │ │ ├── RadioOverrides.tsx │ │ └── __tests__ │ │ │ ├── Radio.spec.tsx │ │ │ └── RadioFieldCard.spec.tsx │ ├── responsive │ │ ├── CollapseBreakpoint.ts │ │ ├── MinBreakpoint.ts │ │ └── ResponsiveContext.tsx │ ├── snackbar │ │ ├── Snackbar.stories.tsx │ │ ├── Snackbar.tsx │ │ ├── SnackbarContent.tsx │ │ ├── SnackbarOverrides.ts │ │ ├── SnackbarStack.tsx │ │ └── __tests__ │ │ │ └── Snackbar.spec.tsx │ ├── stack │ │ ├── Stack.stories.tsx │ │ └── Stack.tsx │ ├── svg-icon │ │ ├── SvgIcon.stories.tsx │ │ ├── SvgIconOverrides.ts │ │ └── __tests__ │ │ │ └── SvgIcon.spec.tsx │ ├── switch │ │ ├── Switch.stories.tsx │ │ ├── SwitchOverrides.ts │ │ └── __tests__ │ │ │ └── Switch.spec.tsx │ ├── tabs │ │ ├── Tabs.stories.tsx │ │ ├── TabsOverrides.ts │ │ └── __tests__ │ │ │ └── Tabs.spec.tsx │ ├── tag │ │ ├── Tag.stories.tsx │ │ ├── Tag.tsx │ │ └── __tests__ │ │ │ └── Tag.spec.tsx │ ├── text-field │ │ ├── TextField.stories.tsx │ │ ├── TextFieldOverrides.tsx │ │ └── __tests__ │ │ │ └── TextField.spec.tsx │ ├── theme │ │ ├── Color.ts │ │ ├── GlobalStyles.tsx │ │ ├── SuperDispatchTheme.ts │ │ ├── ThemeProvider.tsx │ │ └── __tests__ │ │ │ ├── CssBaseline.spec.tsx │ │ │ ├── ThemeProvider.spec.ts │ │ │ └── __snapshots__ │ │ │ └── ThemeProvider.spec.ts.snap │ ├── tiles │ │ ├── Tiles.stories.tsx │ │ ├── Tiles.tsx │ │ └── __tests__ │ │ │ └── Tiles.spec.tsx │ ├── toolbar │ │ ├── ToolbarOverrides.ts │ │ └── __tests__ │ │ │ └── Toolbar.spec.tsx │ ├── tooltip │ │ ├── Tooltip.stories.tsx │ │ ├── TooltipOverrides.ts │ │ └── __tests__ │ │ │ └── Tooltip.spec.tsx │ ├── typography │ │ ├── Typography.stories.tsx │ │ ├── TypographyOverrides.ts │ │ └── __tests__ │ │ │ └── Typography.spec.tsx │ └── utils │ │ ├── ExitTransitionPlaceholder.tsx │ │ ├── ResizeObserver.tsx │ │ ├── VisibilityObserver.tsx │ │ ├── __tests__ │ │ └── ExitTransitionPlaceholder.spec.tsx │ │ ├── isEmptyReactNode.ts │ │ ├── mergeRefs.ts │ │ ├── renderChildren.ts │ │ └── useUID.ts │ └── tsconfig.json ├── patches └── @pika+pack+0.5.0.patch ├── playroom.config.js ├── plopfile.js ├── scripts ├── generate-playroom-components.ts ├── plop-templates │ ├── README.hbs │ ├── lab-component │ │ ├── component.hbs │ │ ├── story.hbs │ │ └── test.hbs │ └── overrides │ │ ├── component.hbs │ │ ├── playroom.hbs │ │ ├── story.hbs │ │ └── test.hbs └── remove-old-tags.ts ├── setupTests.ts ├── tools ├── babel-plugin-inject-display-name.js ├── babel-plugin-inject-story-source.js └── codemods │ ├── normalize-story-name.js │ ├── remove-playroom-story.js │ └── use-dark-color.js ├── tsconfig.build.json ├── tsconfig.json └── yarn.lock /.codesandbox/ci.json: -------------------------------------------------------------------------------- 1 | { 2 | "node": "20", 3 | "buildCommand": "build", 4 | "sandboxes": ["react-typescript-react-ts"], 5 | "packages": [ 6 | "packages/dates", 7 | "packages/eslint-plugin", 8 | "packages/forms", 9 | "packages/jestutils", 10 | "packages/lab", 11 | "packages/phones", 12 | "packages/testutils", 13 | "packages/ui" 14 | ], 15 | "publishDirectory": { 16 | "@superdispatch/dates": "packages/dates/pkg", 17 | "@superdispatch/eslint-plugin-ui": "packages/eslint-plugin", 18 | "@superdispatch/forms": "packages/forms/pkg", 19 | "@superdispatch/jestutils": "packages/jestutils/pkg", 20 | "@superdispatch/phones": "packages/phones/pkg", 21 | "@superdispatch/testutils": "packages/testutils/pkg", 22 | "@superdispatch/ui": "packages/ui/pkg", 23 | "@superdispatch/ui-lab": "packages/lab/pkg" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | pkg/ 2 | docs/ 3 | coverage/ 4 | node_modules/ 5 | plop-templates/ 6 | packages/*/generated/ 7 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @superdispatch/web 2 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | **PR description:** 2 | 3 | 4 | 5 | **Implemented:** 6 | 7 | 8 | 9 | **Checklist:** 10 | 11 | - [ ] I ran this code locally 12 | - [ ] I wrote the necessary tests 13 | - [ ] My code follows the [style guidelines](http://bit.ly/sd-web-style-guide) 14 | - [ ] I followed the [instructions](http://bit.ly/sd-web-pr) to create a pull request 15 | 16 | **JIRA card:** 17 | 18 | 19 | 20 | **Should know about:** 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /.github/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@superdispatch", "config:js-lib"] 3 | } 4 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | name: 'CodeQL' 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | schedule: 9 | - cron: '28 4 * * 4' 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ubuntu-latest 15 | permissions: 16 | actions: read 17 | contents: read 18 | security-events: write 19 | 20 | steps: 21 | - uses: actions/checkout@v2 22 | - uses: github/codeql-action/init@v1 23 | with: 24 | languages: javascript 25 | 26 | - uses: github/codeql-action/analyze@v1 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # editors 2 | .idea 3 | .vscode 4 | *.code-workspace 5 | 6 | # tests 7 | coverage 8 | cypress/videos 9 | cypress/screenshots 10 | 11 | # dependencies 12 | node_modules/ 13 | 14 | # distributive 15 | .turbo 16 | *.tgz 17 | docs/ 18 | packages/*/pkg/ 19 | packages/*/generated/ 20 | 21 | # logs 22 | logs 23 | *.log 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # misc 29 | .DS_Store 30 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn lint-staged 5 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn check:types 5 | -------------------------------------------------------------------------------- /.loki/.gitignore: -------------------------------------------------------------------------------- 1 | current 2 | difference 3 | -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Avatar_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Avatar_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Avatar_Image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Avatar_Image.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Avatar_Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Avatar_Text.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Chip_Examples.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Chip_Examples.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Description_Raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Description_Raw.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Fallback.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Inset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Inset.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Large.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Medium.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Nested.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Nested.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Payment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Payment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/DescriptionList_Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/DescriptionList_Small.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/OverflowText_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/OverflowText_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/OverflowText_Custom_Tooltip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/OverflowText_Custom_Tooltip.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/SvgIcon_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/SvgIcon_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/SvgIcon_Custom_Size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/SvgIcon_Custom_Size.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Tag_Bold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Tag_Bold.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Tag_Subtle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Tag_Subtle.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Tooltip_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Tooltip_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Typography_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Typography_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Typography_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Typography_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Typography_Primary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Typography_Primary.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Typography_Secondary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Typography_Secondary.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Typography_Text_Primary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Typography_Text_Primary.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Data_Display/Typography_Text_Secondary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Data_Display/Typography_Text_Secondary.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/Calendar_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/Calendar_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/Calendar_Disabled_Days.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/Calendar_Disabled_Days.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/Calendar_Footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/Calendar_Footer.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/Calendar_Highlighted_Days.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/Calendar_Highlighted_Days.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/Calendar_Quick_Selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/Calendar_Quick_Selection.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Adornment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Adornment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Advanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Advanced.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Custom_Empty_Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Custom_Empty_Text.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Disable_Close_On_Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Disable_Close_On_Select.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Enable_Clearable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Enable_Clearable.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Error_State.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Error_State.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateField_Full_Width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateField_Full_Width.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Adornment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Adornment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Advanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Advanced.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Custom_Empty_Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Custom_Empty_Text.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Disable_Close_On_Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Disable_Close_On_Select.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Enable_Clearable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Enable_Clearable.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Error_State.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Error_State.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/DateRangeField_Full_Width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/DateRangeField_Full_Width.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/TimeField_Adornment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/TimeField_Adornment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/TimeField_Advanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/TimeField_Advanced.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/TimeField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/TimeField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/TimeField_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/TimeField_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Dates/TimeField_Error_State.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Dates/TimeField_Error_State.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Feedback/Dialog_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Feedback/Dialog_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Autocomplete_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Autocomplete_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Autocomplete_Disable_Clearable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Autocomplete_Disable_Clearable.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Autocomplete_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Autocomplete_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Autocomplete_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Autocomplete_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Autocomplete_Force_Popup_Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Autocomplete_Force_Popup_Icon.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Autocomplete_Loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Autocomplete_Loading.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Interactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Interactive.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Loading.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Picture_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Picture_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Picture_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Picture_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Picture_Loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Picture_Loading.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Text_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Text_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Text_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Text_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Avatar_Button_Text_Loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Avatar_Button_Text_Loading.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CardButton_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CardButton_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CardButton_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CardButton_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CardButton_End_Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CardButton_End_Icon.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CardButton_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CardButton_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CardButton_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CardButton_Large.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CardButton_Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CardButton_Small.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CheckboxField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CheckboxField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CheckboxField_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CheckboxField_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CheckboxField_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CheckboxField_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CheckboxField_Group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CheckboxField_Group.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CheckboxField_Indeterminate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CheckboxField_Indeterminate.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CheckboxField_Inline_Form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CheckboxField_Inline_Form.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/CheckboxField_Label_Placement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/CheckboxField_Label_Placement.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/IconButton_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/IconButton_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/IconButton_Colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/IconButton_Colors.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/IconButton_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/IconButton_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/IconButton_Sizes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/IconButton_Sizes.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Decimal_Scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Decimal_Scale.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Decimal_Separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Decimal_Separator.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Format.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Format.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Prefix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Prefix.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Text.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/NumberField_Without_Separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/NumberField_Without_Separator.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Pagination_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Pagination_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Pagination_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Pagination_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/PatternField_Card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/PatternField_Card.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/PatternField_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/PatternField_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/PatternField_Phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/PatternField_Phone.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/PatternField_Value_Check.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/PatternField_Value_Check.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Group.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Inline_Form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Inline_Form.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Label_Placement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Label_Placement.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Radio_Card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Radio_Card.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Radio_Card_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Radio_Card_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/RadioField_Radio_Group_Card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/RadioField_Radio_Group_Card.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Switch_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Switch_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Switch_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Switch_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Switch_Inline_Form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Switch_Inline_Form.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/Switch_Labelled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/Switch_Labelled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_End_Adornment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_End_Adornment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_Error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_Error.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_Full_Width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_Full_Width.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_Multiline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_Multiline.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_Select.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Inputs/TextField_Start_Adornment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Inputs/TextField_Start_Adornment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Alert_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Alert_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Banner_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Banner_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Box_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Box_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/ButtonArea_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/ButtonArea_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Button_Anchor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Button_Anchor.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Button_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Button_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Button_Full_Width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Button_Full_Width.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Button_Sizes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Button_Sizes.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Chat_Empty_Array_Chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Chat_Empty_Array_Chat.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Chat_Empty_Chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Chat_Empty_Chat.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Chat_Empty_Nullable_Chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Chat_Empty_Nullable_Chat.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Chat_Lorem_Ipsum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Chat_Lorem_Ipsum.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Chat_Multiple_Messages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Chat_Multiple_Messages.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Chat_Single_Message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Chat_Single_Message.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Chat_Styling_The_Chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Chat_Styling_The_Chat.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionDottedLineItem_Description.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionDottedLineItem_Description.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionDottedLineItem_Description_Raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionDottedLineItem_Description_Raw.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionItem_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionItem_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionItem_Complex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionItem_Complex.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionItem_Description_Raw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionItem_Description_Raw.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionItem_Fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionItem_Fallback.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionItem_Inset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionItem_Inset.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionItem_Wrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionItem_Wrap.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/DescriptionLineItem_Description.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/DescriptionLineItem_Description.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FileDropZone_Accept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FileDropZone_Accept.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FileDropZone_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FileDropZone_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FileDropZone_Max_Files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FileDropZone_Max_Files.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FileDropZone_Max_Size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FileDropZone_Max_Size.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FileListItem_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FileListItem_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FileListItem_Status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FileListItem_Status.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FlagList_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FlagList_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FlagList_Headerless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FlagList_Headerless.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/FlagList_With_Tooltips.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/FlagList_With_Tooltips.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/LinkedText_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/LinkedText_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/LinkedText_Custom_Link_Component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/LinkedText_Custom_Link_Component.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/MultilineText_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/MultilineText_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Navbar_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Navbar_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Sidebar_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Sidebar_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Sidebar_Checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Sidebar_Checkbox.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Sidebar_Checkbox_Many.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Sidebar_Checkbox_Many.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Sidebar_Complex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Sidebar_Complex.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/Sidebar_List.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/Sidebar_List.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/TextBox_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/TextBox_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/TextBox_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/TextBox_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/TextBox_Colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/TextBox_Colors.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/TextBox_No_Wrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/TextBox_No_Wrap.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/TextBox_Responsive_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/TextBox_Responsive_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/TextBox_Variants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/TextBox_Variants.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Lab/TextBox_Wrap_Overflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Lab/TextBox_Wrap_Overflow.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Available_Widths.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Available_Widths.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Collapse_Below_Desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Collapse_Below_Desktop.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Collapse_Below_Tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Collapse_Below_Tablet.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Custom_Space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Custom_Space.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_No_Space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_No_Space.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Overflow_Text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Overflow_Text.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Responsive_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Responsive_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Responsive_Reverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Responsive_Reverse.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Responsive_Space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Responsive_Space.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Responsive_Widths.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Responsive_Widths.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Reverse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Reverse.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Columns_Reverse_And_Collapse_Below_Tablet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Columns_Reverse_And_Collapse_Below_Tablet.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_Empty_Elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_Empty_Elements.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_Horizontal_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_Horizontal_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_No_Wrap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_No_Wrap.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_Responsive_Horizontal_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_Responsive_Horizontal_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_Responsive_Space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_Responsive_Space.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_Responsive_Vertical_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_Responsive_Vertical_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Inline_Vertical_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Inline_Vertical_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Preloader_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Preloader_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Preloader_Linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Preloader_Linear.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Stack_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Stack_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Stack_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Stack_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Stack_Dynamic_Width.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Stack_Dynamic_Width.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Stack_Empty_Elements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Stack_Empty_Elements.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Stack_Responsive_Alignment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Stack_Responsive_Alignment.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Stack_Responsive_Space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Stack_Responsive_Space.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Tiles_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Tiles_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Tiles_Responsive_Columns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Tiles_Responsive_Columns.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Layout/Tiles_Responsive_Space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Layout/Tiles_Responsive_Space.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/AppDrawer_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/AppDrawer_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/AppDrawer_Drawer_List.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/AppDrawer_Drawer_List.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/AppDrawer_Drawer_With_Back_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/AppDrawer_Drawer_With_Back_Button.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Drawer_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Drawer_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Drawer_Drawer_List.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Drawer_Drawer_List.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Drawer_Title_End_Action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Drawer_Title_End_Action.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Drawer_Title_Start_Action.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Drawer_Title_Start_Action.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Link_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Link_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Link_Colors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Link_Colors.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Link_Multiline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Link_Multiline.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Link_Multiline_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Link_Multiline_Button.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Tabs_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Tabs_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Navigation/Tabs_Scroll_Buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Navigation/Tabs_Scroll_Buttons.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Phones/PhoneField_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Phones/PhoneField_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Phones/PhoneField_Disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Phones/PhoneField_Disabled.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Phones/PhoneField_Validation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Phones/PhoneField_Validation.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Phones/PhoneLink_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Phones/PhoneLink_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Phones/PhoneLink_Fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Phones/PhoneLink_Fallback.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Phones/PhoneText_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Phones/PhoneText_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Phones/PhoneText_Fallback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Phones/PhoneText_Fallback.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Recipes/Forms_Number_Fields.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Recipes/Forms_Number_Fields.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Recipes/Forms_Sign_Up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Recipes/Forms_Sign_Up.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/AdaptiveToolbar_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/AdaptiveToolbar_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/AdaptiveToolbar_Group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/AdaptiveToolbar_Group.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/AdaptiveVerticalToolbar_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/AdaptiveVerticalToolbar_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/AdaptiveVerticalToolbar_Custom_More.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/AdaptiveVerticalToolbar_Custom_More.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/AppBar_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/AppBar_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/AppBar_Dense.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/AppBar_Dense.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/Card_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/Card_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/InfoCard_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/InfoCard_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/InfoCard_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/InfoCard_Large.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Basic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Basic.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Large.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Medium.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Noninteractive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/InfoTooltip_Noninteractive.png -------------------------------------------------------------------------------- /.loki/reference/chrome.laptop/Surfaces/InfoTooltip_With_Label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/superdispatch/web-ui/2d94ececd65a1465132307b909b26f0c27aa39e8/.loki/reference/chrome.laptop/Surfaces/InfoTooltip_With_Label.png -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | pkg/ 2 | docs/ 3 | coverage/ 4 | lerna.json 5 | plop-templates/ 6 | packages/*/generated/ 7 | -------------------------------------------------------------------------------- /.storybook/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../config/createBabelConfig'); 4 | 5 | module.exports = { 6 | stories: ['../packages/**/*.stories.{ts,tsx}'], 7 | addons: ['@storybook/addon-essentials', 'storybook-addon-playroom'], 8 | 9 | webpackFinal(config) { 10 | const babelConfig = createBabelConfig({ docs: true }); 11 | config.module.rules[0].use[0].options.plugins.push(...babelConfig.plugins); 12 | config.resolve.mainFields = ['module', 'browser', 'main']; 13 | 14 | return config; 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Super Dispatch 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('./config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /config/createBabelConfig.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = ({ docs = false } = {}) => ({ 4 | presets: [ 5 | [ 6 | '@superdispatch/babel-preset', 7 | { 8 | jsx: 'runtime', 9 | targets: 'esmodules', 10 | optimize: { pureCalls: true }, 11 | }, 12 | ], 13 | ], 14 | plugins: [ 15 | ['babel-plugin-styled-components', { namespace: 'SD' }], 16 | 17 | docs && [ 18 | 'babel-plugin-direct-import', 19 | { 20 | modules: [ 21 | '@material-ui/lab', 22 | '@material-ui/core', 23 | '@material-ui/icons', 24 | '@material-ui/styles', 25 | ], 26 | }, 27 | ], 28 | 29 | docs && require.resolve('../tools/babel-plugin-inject-story-source'), 30 | 31 | [ 32 | require.resolve('../tools/babel-plugin-inject-display-name'), 33 | { disableNodeEnvCheck: docs }, 34 | ], 35 | 36 | 'babel-plugin-object-to-json-parse', 37 | ['babel-plugin-optimize-clsx', { libraries: ['clsx'] }], 38 | ].filter(Boolean), 39 | }); 40 | -------------------------------------------------------------------------------- /cypress.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /cypress/integration/lab/DescriptionItem.spec.ts: -------------------------------------------------------------------------------- 1 | beforeEach(() => { 2 | cy.visitStorybook(); 3 | }); 4 | 5 | it('selects by label', () => { 6 | cy.selectStory('Lab/DescriptionItem', 'Basic'); 7 | 8 | cy.findByLabelText('payment').should('contain.text', '$1,503'); 9 | cy.findByLabelText('Posted').should('have.text', '4 hr. ago'); 10 | cy.findByLabelText('address').should( 11 | 'have.text', 12 | '167 Zosh Rd, Dallas, PA 18612', 13 | ); 14 | cy.findByLabelText('ID').should( 15 | 'have.text', 16 | '202CB962AC59075B964B07152D234B70', 17 | ); 18 | cy.findByLabelText('Notes').should( 19 | 'have.text', 20 | 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.', 21 | ); 22 | }); 23 | -------------------------------------------------------------------------------- /cypress/integration/lab/Sidebar.spec.ts: -------------------------------------------------------------------------------- 1 | beforeEach(() => { 2 | cy.visitStorybook(); 3 | cy.get('body').then(($body) => { 4 | $body.css({ padding: 0, margin: 0 }); 5 | }); 6 | }); 7 | 8 | it('selects sidebar by title', () => { 9 | cy.selectStory('Lab/Sidebar', 'Basic'); 10 | cy.findByLabelText('Settings').within(() => { 11 | cy.findByText('Settings').should('not.exist'); 12 | cy.findAllByRole('button').should('have.length', 9); 13 | }); 14 | }); 15 | 16 | it('docks to the screen', () => { 17 | cy.viewport('macbook-11'); 18 | cy.get('#root').invoke('css', { height: 3000 }); 19 | 20 | cy.selectStory('Lab/Sidebar', 'Basic'); 21 | cy.findByLabelText('Settings').should('exist'); 22 | 23 | cy.scrollTo('bottom'); 24 | }); 25 | -------------------------------------------------------------------------------- /cypress/plugins/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @type {Cypress.PluginConfig} 5 | */ 6 | module.exports = (on, config) => { 7 | return config; 8 | }; 9 | -------------------------------------------------------------------------------- /cypress/support/index.ts: -------------------------------------------------------------------------------- 1 | import '@testing-library/cypress/add-commands'; 2 | import './commands'; 3 | -------------------------------------------------------------------------------- /cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["**/*.ts"], 3 | "compilerOptions": { 4 | "noEmit": true, 5 | "strict": true, 6 | "target": "ES5", 7 | "lib": ["ES5", "DOM"], 8 | "skipLibCheck": true, 9 | "types": ["cypress", "@testing-library/cypress"] 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "site": "superdispatch-ui", 4 | "public": "docs", 5 | "rewrites": [ 6 | { 7 | "source": "**", 8 | "destination": "/index.html" 9 | } 10 | ], 11 | "headers": [ 12 | { 13 | "source": "/**", 14 | "headers": [ 15 | { 16 | "key": "Vary", 17 | "value": "*" 18 | }, 19 | { 20 | "key": "Cache-Control", 21 | "value": "no-store, max-age=0" 22 | } 23 | ] 24 | }, 25 | { 26 | "source": "**/*.@(js|ico|woff|woff2)", 27 | "headers": [ 28 | { 29 | "key": "Vary", 30 | "value": "User-Agent" 31 | }, 32 | { 33 | "key": "Cache-Control", 34 | "value": "public, max-age=31536000, immutable" 35 | } 36 | ] 37 | } 38 | ] 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /globalSetup.ts: -------------------------------------------------------------------------------- 1 | export default () => { 2 | process.env.TZ = 'America/Chicago'; 3 | }; 4 | -------------------------------------------------------------------------------- /jest-resolver.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // temporary workaround while we wait for https://github.com/facebook/jest/issues/9771 4 | const resolver = require('enhanced-resolve').create.sync({ 5 | conditionNames: ['require', 'node', 'default'], 6 | extensions: ['.js', '.json', '.node', '.ts', '.tsx', '.cjs'], 7 | }); 8 | 9 | module.exports = (request, options) => { 10 | // list global module that must be resolved by defaultResolver here 11 | if (['fs', 'http', 'path'].includes(request)) { 12 | return options.defaultResolver(request, options); 13 | } 14 | 15 | return resolver(options.basedir, request); 16 | }; 17 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.45.0", 3 | "npmClient": "yarn", 4 | "useWorkspaces": true, 5 | "packages": [ 6 | "packages/*" 7 | ], 8 | "command": { 9 | "version": { 10 | "allowBranch": "main", 11 | "message": "%s" 12 | } 13 | }, 14 | "ignoreChanges": [ 15 | "**/pkg/**", 16 | "**/__tests__/**" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /loki.config.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | storiesFilter: 5 | /^Data Display|^Surfaces|^Inputs|^Navigation\/Tabs|^Navigation\/Link|^Navigation\/Button|^Layout|^Feedback\/Dialog|^Navigation\/Drawer|^Navigation\/AppDrawer|^Lab|^Phones|Dates\/DateField|Dates\/DateRangeField|Dates\/TimeField|^Recipes|^Lab\/FlagList/i, 6 | 7 | configurations: { 8 | 'chrome.laptop': { 9 | target: 'chrome.docker', 10 | width: 1024, 11 | height: 768, 12 | deviceScaleFactor: 1, 13 | mobile: true, 14 | }, 15 | }, 16 | 17 | fileNameFormatter({ configurationName, kind, story }) { 18 | const [root, sub] = kind.split('/'); 19 | return `${configurationName}/${root}/${sub}_${story}`.replace(/\s/g, '_'); 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /packages/__docs__/Empty.tsx: -------------------------------------------------------------------------------- 1 | export function Empty(): null { 2 | return null; 3 | } 4 | -------------------------------------------------------------------------------- /packages/__docs__/FrameComponent.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeProvider } from '@superdispatch/ui'; 2 | import { ReactElement, ReactNode, Suspense } from 'react'; 3 | 4 | interface FrameComponentProps { 5 | children?: ReactNode; 6 | } 7 | 8 | export default function FrameComponent({ 9 | children, 10 | }: FrameComponentProps): ReactElement { 11 | return ( 12 | 13 | {children} 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /packages/__docs__/PropsLink.tsx: -------------------------------------------------------------------------------- 1 | import { Link } from '@material-ui/core'; 2 | import { Launch } from '@material-ui/icons'; 3 | import { Inline } from '@superdispatch/ui'; 4 | import { ReactElement } from 'react'; 5 | 6 | export interface PropsLinkProps { 7 | url: string; 8 | } 9 | 10 | export function PropsLink({ url }: PropsLinkProps): ReactElement { 11 | return ( 12 | 18 | 19 | Component API 20 | 21 | 22 | 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /packages/__docs__/UseState.tsx: -------------------------------------------------------------------------------- 1 | import { renderChildren } from '@superdispatch/ui'; 2 | import { Dispatch, ReactElement, SetStateAction, useState } from 'react'; 3 | 4 | export interface UseStateProps { 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 6 | initialState: any; 7 | children: ( 8 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 9 | state: any, 10 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 11 | setState: Dispatch>, 12 | ) => null | ReactElement; 13 | } 14 | 15 | export function UseState({ 16 | children, 17 | initialState, 18 | }: UseStateProps): null | ReactElement { 19 | // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment 20 | const [state, setState] = useState(initialState); 21 | 22 | return renderChildren(children(state, setState)); 23 | } 24 | -------------------------------------------------------------------------------- /packages/__docs__/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Empty'; 2 | export * from './Placeholder'; 3 | export * from './PropsLink'; 4 | export * from './UseState'; 5 | -------------------------------------------------------------------------------- /packages/__docs__/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@superdispatch/ui-docs", 3 | "version": "0.45.0", 4 | "private": true, 5 | "main": "index.ts", 6 | "types": "index.ts" 7 | } 8 | -------------------------------------------------------------------------------- /packages/__testutils__/DateTestUtils.ts: -------------------------------------------------------------------------------- 1 | import MockDate from 'mockdate'; 2 | 3 | export const STUB_DATE = Date.UTC(2019, 4, 24, 12, 13, 14, 15); 4 | 5 | export function mockDate(millis = STUB_DATE): void { 6 | MockDate.set(millis); 7 | } 8 | 9 | export function resetMockDate(): void { 10 | MockDate.reset(); 11 | } 12 | -------------------------------------------------------------------------------- /packages/__testutils__/defer.ts: -------------------------------------------------------------------------------- 1 | import { noop } from 'lodash'; 2 | 3 | export class Deferred { 4 | protected currentPromise: Promise = new Promise(noop); 5 | protected resolvePromise: (value: T) => void = noop; 6 | protected rejectPromise: (error: Error) => void = noop; 7 | 8 | constructor() { 9 | this.reset(); 10 | } 11 | 12 | reset(): this { 13 | this.currentPromise = new Promise((resolve, reject) => { 14 | this.resolvePromise = resolve; 15 | this.rejectPromise = reject; 16 | }); 17 | 18 | return this; 19 | } 20 | 21 | get promise(): Promise { 22 | return this.currentPromise; 23 | } 24 | 25 | resolve(value: T): Promise { 26 | this.resolvePromise(value); 27 | 28 | return this.promise; 29 | } 30 | 31 | reject(error: Error): Promise { 32 | this.rejectPromise(error); 33 | 34 | return this.promise; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /packages/__testutils__/index.ts: -------------------------------------------------------------------------------- 1 | export * from './DateTestUtils'; 2 | export * from './defer'; 3 | export * from './renderComponent'; 4 | export * from './renderCSS'; 5 | export * from './renderTheme'; 6 | -------------------------------------------------------------------------------- /packages/__testutils__/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@superdispatch/ui-testutils", 3 | "version": "0.45.0", 4 | "private": true, 5 | "main": "index.ts", 6 | "types": "index.ts" 7 | } 8 | -------------------------------------------------------------------------------- /packages/__testutils__/renderComponent.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeProvider, ThemeProviderProps } from '@superdispatch/ui'; 2 | import { render, RenderOptions, RenderResult } from '@testing-library/react'; 3 | import { ReactElement, Suspense } from 'react'; 4 | 5 | function Wrapper({ children }: ThemeProviderProps): ReactElement { 6 | return ( 7 | 8 | {children} 9 | 10 | ); 11 | } 12 | 13 | export function renderComponent( 14 | ui: ReactElement, 15 | options?: Omit, 16 | ): RenderResult { 17 | return render(ui, { ...options, wrapper: Wrapper }); 18 | } 19 | -------------------------------------------------------------------------------- /packages/__testutils__/renderTheme.tsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from '@material-ui/core'; 2 | import { 3 | SuperDispatchTheme, 4 | ThemeProvider, 5 | ThemeProviderProps, 6 | } from '@superdispatch/ui'; 7 | import { renderHook } from '@testing-library/react-hooks'; 8 | 9 | export function renderTheme( 10 | modifier?: ThemeProviderProps['modifier'], 11 | ): SuperDispatchTheme { 12 | const { 13 | result: { current: theme }, 14 | } = renderHook(() => useTheme(), { 15 | wrapper: ({ children }) => ( 16 | {children} 17 | ), 18 | }); 19 | 20 | return theme; 21 | } 22 | -------------------------------------------------------------------------------- /packages/__testutils__/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "compilerOptions": { 4 | "composite": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/dates/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/dates/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/dates` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/dates)](https://www.npmjs.com/package/@superdispatch/dates) 4 | [![npm minzipped size](https://img.shields.io/bundlephobia/minzip/@superdispatch/dates.svg)](https://bundlephobia.com/result?p=@superdispatch/dates) 5 | 6 | #### Installation 7 | 8 | ```bash 9 | yarn add @superdispatch/dates @material-ui/core @material-ui/lab 10 | ``` 11 | -------------------------------------------------------------------------------- /packages/dates/playroom.ts: -------------------------------------------------------------------------------- 1 | export { 2 | Calendar, 3 | CalendarQuickSelection, 4 | CalendarQuickSelectionItem, 5 | DateField, 6 | DateRangeField, 7 | FormattedDate, 8 | FormattedRelativeTime, 9 | TimeField, 10 | } from './src'; 11 | -------------------------------------------------------------------------------- /packages/dates/src/calendar/Calendar.playroom.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, useState } from 'react'; 2 | import { NullableDateInput } from '../date-time-utils/DateTimeUtils'; 3 | import { Calendar as SDCalendar, CalendarProps } from './Calendar'; 4 | 5 | export const Calendar = forwardRef( 6 | ({ onDayClick, selectedDays, ...props }, ref) => { 7 | const [value, setValue] = useState(); 8 | 9 | return ( 10 | value === event.stringValue)} 14 | onDayClick={(event) => { 15 | onDayClick?.(event); 16 | 17 | if (!event.disabled) { 18 | if (!event.selected) { 19 | setValue(event.stringValue); 20 | } else { 21 | setValue(undefined); 22 | } 23 | } 24 | }} 25 | /> 26 | ); 27 | }, 28 | ); 29 | -------------------------------------------------------------------------------- /packages/dates/src/calendar/CalendarQuickSelection.tsx: -------------------------------------------------------------------------------- 1 | import { List, ListItem, Typography } from '@material-ui/core'; 2 | import { forwardRef, ReactNode } from 'react'; 3 | 4 | export interface CalendarQuickSelectionItemProps { 5 | children?: ReactNode; 6 | selected?: boolean; 7 | onClick?: () => void; 8 | } 9 | 10 | export const CalendarQuickSelectionItem = forwardRef< 11 | HTMLDivElement, 12 | CalendarQuickSelectionItemProps 13 | >(({ onClick, selected, children }, ref) => ( 14 | 15 | {children} 16 | 17 | )); 18 | 19 | export interface CalendarQuickSelectionProps { 20 | title?: ReactNode; 21 | children?: ReactNode; 22 | } 23 | 24 | export const CalendarQuickSelection = forwardRef< 25 | HTMLUListElement, 26 | CalendarQuickSelectionProps 27 | >(({ title = 'Quick Selection', children }, ref) => ( 28 | 29 | 30 | {title} 31 | 32 | 33 | {children} 34 | 35 | )); 36 | -------------------------------------------------------------------------------- /packages/dates/src/date-config/DateConfig.spec.tsx: -------------------------------------------------------------------------------- 1 | import { renderHook } from '@testing-library/react-hooks'; 2 | import { ReactElement } from 'react'; 3 | import { 4 | DateConfigProvider, 5 | DateConfigProviderProps, 6 | useDateConfig, 7 | } from './DateConfig'; 8 | 9 | test('basic', () => { 10 | const { result } = renderHook(useDateConfig); 11 | 12 | expect(result.current.format).toBe('DateTimeISO'); 13 | }); 14 | 15 | test('format overrides', () => { 16 | function Wrapper(props: DateConfigProviderProps): ReactElement { 17 | return ; 18 | } 19 | 20 | const { result } = renderHook(useDateConfig, { wrapper: Wrapper }); 21 | 22 | expect(result.current.format).toBe('JodaISO'); 23 | }); 24 | -------------------------------------------------------------------------------- /packages/dates/src/date-field/DateField.playroom.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, useState } from 'react'; 2 | import { NullableDateInput } from '../date-time-utils/DateTimeUtils'; 3 | import { DateField as SDDateField, DateFieldProps } from './DateField'; 4 | 5 | export const DateField = forwardRef( 6 | ({ value, onChange, ...props }, ref) => { 7 | const [state, setState] = useState(); 8 | 9 | return ( 10 | { 15 | onChange?.(date); 16 | setState(date.stringValue); 17 | }} 18 | /> 19 | ); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /packages/dates/src/date-range-field/DateRangeField.playroom.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, useState } from 'react'; 2 | import { DateStringRange } from '../date-time-utils/DateTimeUtils'; 3 | import { 4 | DateRangeField as SDDateRangeField, 5 | DateRangeFieldProps, 6 | } from './DateRangeField'; 7 | 8 | export const DateRangeField = forwardRef( 9 | ({ value, onChange, ...props }, ref) => { 10 | const [state, setState] = useState(); 11 | 12 | return ( 13 | { 18 | onChange?.(date); 19 | setState(date.stringValue); 20 | }} 21 | /> 22 | ); 23 | }, 24 | ); 25 | -------------------------------------------------------------------------------- /packages/dates/src/formatted-date/FormattedDate.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { FormattedDate } from './FormattedDate'; 3 | 4 | export default { 5 | title: 'Dates/FormattedDate', 6 | component: FormattedDate, 7 | } as Meta; 8 | 9 | const newDate = () => new Date(); 10 | 11 | export const Default = () => ; 12 | 13 | export const ShortDate = () => ( 14 | 15 | ); 16 | 17 | export const Time = () => ; 18 | 19 | export const DateTime = () => ( 20 | 21 | ); 22 | 23 | export const WithFallback = () => ( 24 | 25 | ); 26 | -------------------------------------------------------------------------------- /packages/dates/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './calendar/Calendar'; 2 | export * from './calendar/CalendarQuickSelection'; 3 | export * from './date-config/DateConfig'; 4 | export * from './date-field/DateField'; 5 | export * from './date-range-field/DateRangeField'; 6 | export * from './date-time-utils/DateTimeUtils'; 7 | export * from './date-utils/DateUtils'; 8 | export * from './formatted-date/FormattedDate'; 9 | export * from './formatted-relative-time/FormattedRelativeTime'; 10 | export * from './time-field/TimeField'; 11 | export * from './use-date-time-range/useDateTimeRange'; 12 | export * from './use-date-time/useDateTime'; 13 | -------------------------------------------------------------------------------- /packages/dates/src/time-field/TimeField.playroom.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, useState } from 'react'; 2 | import { NullableDateInput } from '../date-time-utils/DateTimeUtils'; 3 | import { TimeField as SDTimeField, TimeFieldProps } from './TimeField'; 4 | 5 | export const TimeField = forwardRef( 6 | ({ value, onChange, ...props }, ref) => { 7 | const [state, setState] = useState(); 8 | 9 | return ( 10 | { 15 | onChange?.(date); 16 | setState(date.stringValue); 17 | }} 18 | /> 19 | ); 20 | }, 21 | ); 22 | -------------------------------------------------------------------------------- /packages/dates/src/time-field/TimeField.stories.tsx: -------------------------------------------------------------------------------- 1 | import { InputAdornment } from '@material-ui/core'; 2 | import { Meta } from '@storybook/react'; 3 | import { TimeField } from './TimeField.playroom'; 4 | 5 | export default { 6 | title: 'Dates/TimeField', 7 | component: TimeField, 8 | } as Meta; 9 | 10 | export const basic = () => ; 11 | 12 | export const advanced = () => ( 13 | 14 | ); 15 | 16 | export const errorState = () => ( 17 | 23 | ); 24 | 25 | export const adornment = () => ( 26 | Start Adornment: 30 | ), 31 | }} 32 | /> 33 | ); 34 | 35 | export const disabled = () => ; 36 | -------------------------------------------------------------------------------- /packages/dates/src/use-date-time-range/useDateTimeRange.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | import { DateConfig, useDateConfig } from '../date-config/DateConfig'; 3 | import { 4 | DateTimeRange, 5 | NullableDateRangeInput, 6 | parseDateRange, 7 | toPrimitiveDateRangeInput, 8 | } from '../date-time-utils/DateTimeUtils'; 9 | import { useDateTime } from '../use-date-time/useDateTime'; 10 | 11 | export function useDateTimeRange( 12 | input: NullableDateRangeInput, 13 | options?: Partial, 14 | ): DateTimeRange { 15 | const config = useDateConfig(options); 16 | const [startInput, finishInput] = toPrimitiveDateRangeInput(input); 17 | const startDate = useDateTime(startInput, config); 18 | const finishDate = useDateTime(finishInput, config); 19 | 20 | return useMemo( 21 | () => parseDateRange([startDate, finishDate], config), 22 | [config, startDate, finishDate], 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /packages/dates/src/use-date-time/useDateTime.ts: -------------------------------------------------------------------------------- 1 | import { DateTime } from 'luxon'; 2 | import { useMemo } from 'react'; 3 | import { DateConfig, useDateConfig } from '../date-config/DateConfig'; 4 | import { 5 | NullableDateInput, 6 | parseDate, 7 | toPrimitiveDateInput, 8 | } from '../date-time-utils/DateTimeUtils'; 9 | 10 | export function useDateTime( 11 | input: NullableDateInput, 12 | options?: Partial, 13 | ): DateTime { 14 | const config = useDateConfig(options); 15 | const primitiveInput = toPrimitiveDateInput(input); 16 | 17 | return useMemo(() => { 18 | const date = parseDate(primitiveInput, config); 19 | 20 | if (process.env.NODE_ENV !== 'production') { 21 | if (!date.isValid && typeof primitiveInput === 'string') { 22 | // eslint-disable-next-line no-console 23 | console.error( 24 | `[useDateTime] Failed to parse "${primitiveInput}" string with "${config.format}" format.`, 25 | ); 26 | } 27 | } 28 | 29 | return date; 30 | }, [config, primitiveInput]); 31 | } 32 | -------------------------------------------------------------------------------- /packages/dates/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "references": [{ "path": "../ui" }, { "path": "../__testutils__" }], 13 | "compilerOptions": { 14 | "composite": true, 15 | "rootDir": "src", 16 | "outDir": "pkg/dist-types", 17 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/eslint-plugin/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/eslint-plugin-ui` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/eslint-plugin-ui)](https://www.npmjs.com/package/@superdispatch/eslint-plugin-ui) 4 | 5 | #### Installation 6 | 7 | ```bash 8 | yarn add @superdispatch/eslint-plugin-ui 9 | ``` 10 | -------------------------------------------------------------------------------- /packages/eslint-plugin/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@superdispatch/eslint-plugin-ui", 3 | "version": "0.45.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/superdispatch/ui.git" 7 | }, 8 | "license": "MIT", 9 | "main": "pkg/index.js", 10 | "scripts": { 11 | "version": "rimraf pkg && tsc -b" 12 | }, 13 | "dependencies": { 14 | "@superdispatch/ui": "^0.45.0" 15 | }, 16 | "peerDependencies": { 17 | "@typescript-eslint/experimental-utils": "^4.0.0", 18 | "@typescript-eslint/types": "^4.0.0" 19 | }, 20 | "publishConfig": { 21 | "access": "public" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/eslint-plugin/src/index.ts: -------------------------------------------------------------------------------- 1 | import { rule as noColorLiterals } from './rules/no-color-literals'; 2 | import { rule as noRestrictedModules } from './rules/no-restricted-modules'; 3 | 4 | export const rules = { 5 | 'no-color-literals': noColorLiterals, 6 | 'no-restricted-modules': noRestrictedModules, 7 | } as const; 8 | 9 | export const configs = { 10 | recommended: { 11 | plugins: ['@superdispatch/ui'], 12 | 13 | rules: { 14 | '@superdispatch/ui/no-color-literals': ['error'], 15 | '@superdispatch/ui/no-restricted-modules': ['error'], 16 | }, 17 | }, 18 | } as const; 19 | -------------------------------------------------------------------------------- /packages/eslint-plugin/src/utils/createRule.ts: -------------------------------------------------------------------------------- 1 | import { ESLintUtils } from '@typescript-eslint/experimental-utils'; 2 | 3 | export const createRule = ESLintUtils.RuleCreator( 4 | (ruleName) => 5 | `https://github.com/superdispatch/web-ui/blob/main/packages/eslint-plugin/src/rules/${ruleName}.ts`, 6 | ); 7 | -------------------------------------------------------------------------------- /packages/eslint-plugin/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": ["src"], 3 | "extends": "../../tsconfig.build", 4 | "exclude": ["**/*.spec.*", "**/__tests__/**", "**/__testutils__/**"], 5 | "compilerOptions": { 6 | "target": "ES2019", 7 | "module": "CommonJS", 8 | "composite": true, 9 | "rootDir": "src", 10 | "outDir": "pkg", 11 | "tsBuildInfoFile": "pkg/.tsbuildinfo" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/forms/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/forms/src/__testutils__/renderProvider.tsx: -------------------------------------------------------------------------------- 1 | import { render } from '@testing-library/react'; 2 | import { FormikValues } from 'formik'; 3 | import { FormsContext, FormsProvider } from '../enhanced/FormsProvider'; 4 | import { 5 | FormikEnhancedConfig, 6 | useFormikEnhanced, 7 | } from '../enhanced/useFormikEnhanced'; 8 | 9 | export function renderProvider( 10 | defaultConfig: FormsContext, 11 | formConfig: FormikEnhancedConfig, 12 | ) { 13 | function Foo() { 14 | const { handleSubmit, errors } = useFormikEnhanced( 15 | formConfig, 16 | ); 17 | 18 | return ( 19 |
20 | {errors.name} 21 | 29 |
30 | ); 31 | } 32 | 33 | return render( 34 | 35 | 36 | , 37 | ); 38 | } 39 | -------------------------------------------------------------------------------- /packages/forms/src/enhanced/FormikEnhanced.tsx: -------------------------------------------------------------------------------- 1 | import { FormikProvider, FormikValues } from 'formik'; 2 | import { ReactElement, ReactNode } from 'react'; 3 | import { 4 | FormikContextTypeEnhanced, 5 | FormikEnhancedConfig, 6 | useFormikEnhanced, 7 | } from './useFormikEnhanced'; 8 | 9 | export interface FormikEnhancedProps 10 | extends FormikEnhancedConfig { 11 | children?: 12 | | ReactNode 13 | | ((formik: FormikContextTypeEnhanced) => ReactNode); 14 | } 15 | 16 | export function FormikEnhanced({ 17 | children, 18 | ...config 19 | }: FormikEnhancedProps): null | ReactElement { 20 | const formik = useFormikEnhanced(config); 21 | 22 | return ( 23 | 24 | {typeof children === 'function' ? children(formik) : children} 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /packages/forms/src/enhanced/FormsProvider.tsx: -------------------------------------------------------------------------------- 1 | import { FormikErrors } from 'formik'; 2 | import { 3 | createContext, 4 | PropsWithChildren, 5 | ReactElement, 6 | useContext, 7 | useMemo, 8 | } from 'react'; 9 | 10 | export interface FormsContext { 11 | getFormErrors?: (error: unknown) => FormikErrors; 12 | } 13 | 14 | const Context = createContext({}); 15 | 16 | export function useFormsContext(): FormsContext { 17 | return useContext(Context); 18 | } 19 | 20 | export function FormsProvider({ 21 | children, 22 | getFormErrors, 23 | }: PropsWithChildren): ReactElement { 24 | const ctx = useMemo( 25 | () => ({ 26 | getFormErrors, 27 | }), 28 | [getFormErrors], 29 | ); 30 | return {children}; 31 | } 32 | -------------------------------------------------------------------------------- /packages/forms/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './checkbox/FormikCheckboxField'; 2 | export * from './date/FormikDateField'; 3 | export * from './enhanced/FormikEnhanced'; 4 | export * from './enhanced/FormsProvider'; 5 | export * from './enhanced/useFormikEnhanced'; 6 | export * from './phone/FormikPhoneField'; 7 | export * from './radio/FormikRadioFieldCard'; 8 | export * from './radio/FormikRadioGroupField'; 9 | export * from './text/constants'; 10 | export * from './text/FormikCurrencyField'; 11 | export * from './text/FormikMaxLengthTextField'; 12 | export * from './text/FormikNumberField'; 13 | export * from './text/FormikPasswordField'; 14 | export * from './text/FormikPatternField'; 15 | export * from './text/FormikTextField'; 16 | -------------------------------------------------------------------------------- /packages/forms/src/radio/FormikRadioFieldCard.tsx: -------------------------------------------------------------------------------- 1 | import { ButtonBaseProps } from '@material-ui/core'; 2 | import { RadioFieldCard } from '@superdispatch/ui'; 3 | import { useField } from 'formik'; 4 | import { forwardRef, ForwardRefExoticComponent } from 'react'; 5 | 6 | export interface FormikRadioCardFieldProps 7 | extends Omit { 8 | name: string; 9 | value: string; 10 | label: string; 11 | caption?: string; 12 | icon?: React.ReactNode; 13 | } 14 | 15 | export const FormikRadioCardField: ForwardRefExoticComponent = 16 | forwardRef(({ name, value, label, caption, icon }, ref) => { 17 | const [field, _, { setValue }] = useField({ 18 | name, 19 | }); 20 | 21 | return ( 22 | { 31 | setValue(value); 32 | }} 33 | /> 34 | ); 35 | }); 36 | -------------------------------------------------------------------------------- /packages/forms/src/text/constants.ts: -------------------------------------------------------------------------------- 1 | export const EMPTY_ERROR_MESSAGE = 'EMPTY_ERROR_MESSAGE'; 2 | -------------------------------------------------------------------------------- /packages/forms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "references": [ 13 | { "path": "../dates" }, 14 | { "path": "../phones" }, 15 | { "path": "../hooks" }, 16 | { "path": "../ui" } 17 | ], 18 | "compilerOptions": { 19 | "outDir": "pkg/dist-types", 20 | "composite": true, 21 | "rootDir": "src", 22 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/hooks/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/hooks/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/hooks` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/hooks)](https://www.npmjs.com/package/@superdispatch/hooks) 4 | [![npm minzipped size](https://img.shields.io/bundlephobia/minzip/@superdispatch/hooks.svg)](https://bundlephobia.com/result?p=@superdispatch/hooks) 5 | 6 | #### Installation 7 | 8 | ```bash 9 | yarn add @superdispatch/hooks 10 | ``` 11 | -------------------------------------------------------------------------------- /packages/hooks/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@superdispatch/hooks", 3 | "version": "0.45.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/superdispatch/ui.git" 7 | }, 8 | "license": "MIT", 9 | "main": "src/index.ts", 10 | "module": "src/index.ts", 11 | "browser": "pkg/dist-web/index.js", 12 | "types": "src/index.ts", 13 | "scripts": { 14 | "version": "pika build" 15 | }, 16 | "dependencies": { 17 | "dequal": "^2.0.2" 18 | }, 19 | "publishConfig": { 20 | "access": "public", 21 | "directory": "pkg" 22 | }, 23 | "@pika/pack": { 24 | "pipeline": [ 25 | [ 26 | "@pika/plugin-standard-pkg", 27 | { 28 | "exclude": [ 29 | "**/*.spec.*", 30 | "**/__tests__/**", 31 | "**/__testutils__/**" 32 | ] 33 | } 34 | ], 35 | [ 36 | "@pika/plugin-build-web" 37 | ], 38 | [ 39 | "@pika/plugin-build-node" 40 | ], 41 | [ 42 | "@pika/plugin-build-types" 43 | ], 44 | [ 45 | "@pika/plugin-bundle-types" 46 | ] 47 | ] 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /packages/hooks/src/constant/useConstant.ts: -------------------------------------------------------------------------------- 1 | import { MutableRefObject, useRef } from 'react'; 2 | 3 | export function useConstant(factory: () => T): T { 4 | const ref = useRef>(null); 5 | 6 | if (ref.current == null) { 7 | ref.current = { current: factory() }; 8 | } 9 | 10 | return ref.current.current; 11 | } 12 | -------------------------------------------------------------------------------- /packages/hooks/src/deep-equal-memo/useDeepEqualMemo.ts: -------------------------------------------------------------------------------- 1 | import { dequal } from 'dequal'; 2 | import { DependencyList, useEffect, useRef } from 'react'; 3 | 4 | interface State { 5 | value: T; 6 | } 7 | 8 | export function useDeepEqualMemo( 9 | factory: (prevValue: T | undefined) => T, 10 | deps: DependencyList, 11 | ): T { 12 | const depsRef = useRef(deps); 13 | const stateRef = useRef>(); 14 | 15 | let nextState: undefined | State = undefined; 16 | 17 | if (stateRef.current == null) { 18 | stateRef.current = { value: factory(undefined) }; 19 | } else if (!dequal(depsRef.current, deps)) { 20 | const nextValue = factory(stateRef.current.value); 21 | 22 | if (!dequal(nextValue, stateRef.current.value)) { 23 | nextState = { value: nextValue }; 24 | } 25 | } 26 | 27 | useEffect(() => { 28 | depsRef.current = deps; 29 | 30 | if (nextState) { 31 | stateRef.current = nextState; 32 | } 33 | }); 34 | 35 | return nextState != null ? nextState.value : stateRef.current.value; 36 | } 37 | -------------------------------------------------------------------------------- /packages/hooks/src/deep-equal-value/useDeepEqualValue.spec.ts: -------------------------------------------------------------------------------- 1 | import { renderHook } from '@testing-library/react-hooks'; 2 | import { useDeepEqualValue } from './useDeepEqualValue'; 3 | 4 | test('basic', () => { 5 | const value1 = new Date(0); 6 | const value2 = new Date(0); 7 | const value3 = new Date(10); 8 | 9 | const { result, rerender } = renderHook( 10 | ({ value }) => useDeepEqualValue(value), 11 | { initialProps: { value: value1 } }, 12 | ); 13 | 14 | expect(result.current).toBe(value1); 15 | 16 | rerender({ value: value2 }); 17 | 18 | expect(result.current).toBe(value1); 19 | expect(result.current).not.toBe(value2); 20 | 21 | rerender({ value: value3 }); 22 | 23 | expect(result.current).toBe(value3); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/hooks/src/deep-equal-value/useDeepEqualValue.ts: -------------------------------------------------------------------------------- 1 | import { dequal } from 'dequal'; 2 | import { useRef } from 'react'; 3 | import { useIsomorphicLayoutEffect } from '../isomorphic-layout-effect/useIsomorphicLayoutEffect'; 4 | 5 | export function useDeepEqualValue(value: T): T { 6 | const ref = useRef(value); 7 | const isEqual = dequal(value, ref.current); 8 | 9 | useIsomorphicLayoutEffect(() => { 10 | if (!isEqual) { 11 | ref.current = value; 12 | } 13 | }); 14 | 15 | return isEqual ? ref.current : value; 16 | } 17 | -------------------------------------------------------------------------------- /packages/hooks/src/index.spec.ts: -------------------------------------------------------------------------------- 1 | import * as api from '.'; 2 | 3 | test('public api', () => { 4 | expect(api).toMatchInlineSnapshot(` 5 | Object { 6 | "useConstant": [Function], 7 | "useDeepEqualMemo": [Function], 8 | "useDeepEqualValue": [Function], 9 | "useEventHandler": [Function], 10 | "useIsMounted": [Function], 11 | "useValueObserver": [Function], 12 | } 13 | `); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/hooks/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './constant/useConstant'; 2 | export * from './deep-equal-memo/useDeepEqualMemo'; 3 | export * from './deep-equal-value/useDeepEqualValue'; 4 | export * from './event-handler/useEventHandler'; 5 | export * from './is-mounted/useIsMounted'; 6 | export * from './value-observer/useValueObserver'; 7 | -------------------------------------------------------------------------------- /packages/hooks/src/is-mounted/useIsMounted.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useRef } from 'react'; 2 | import { useIsomorphicLayoutEffect } from '../isomorphic-layout-effect/useIsomorphicLayoutEffect'; 3 | 4 | export function useIsMounted(): () => boolean { 5 | const ref = useRef(false); 6 | 7 | useIsomorphicLayoutEffect(() => { 8 | ref.current = true; 9 | 10 | return () => { 11 | ref.current = false; 12 | }; 13 | }, []); 14 | 15 | return useCallback(() => ref.current, []); 16 | } 17 | -------------------------------------------------------------------------------- /packages/hooks/src/isomorphic-layout-effect/useIsomorphicLayoutEffect.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useLayoutEffect } from 'react'; 2 | 3 | export const useIsomorphicLayoutEffect = 4 | typeof document != 'undefined' ? useEffect : useLayoutEffect; 5 | -------------------------------------------------------------------------------- /packages/hooks/src/value-observer/useValueObserver.spec.ts: -------------------------------------------------------------------------------- 1 | import { renderHook } from '@testing-library/react-hooks'; 2 | import { useValueObserver } from './useValueObserver'; 3 | 4 | test('basic', () => { 5 | const observer = jest.fn(); 6 | 7 | const { rerender } = renderHook( 8 | ({ value }) => { 9 | useValueObserver(value, observer); 10 | }, 11 | { initialProps: { value: 'foo' } }, 12 | ); 13 | 14 | expect(observer).toHaveBeenCalledTimes(0); 15 | 16 | rerender({ value: 'bar' }); 17 | 18 | expect(observer).toHaveBeenCalledTimes(1); 19 | expect(observer).toHaveBeenLastCalledWith('foo'); 20 | 21 | rerender({ value: 'bar' }); 22 | 23 | expect(observer).toHaveBeenCalledTimes(1); 24 | 25 | rerender({ value: 'baz' }); 26 | 27 | expect(observer).toHaveBeenCalledTimes(2); 28 | expect(observer).toHaveBeenLastCalledWith('bar'); 29 | }); 30 | -------------------------------------------------------------------------------- /packages/hooks/src/value-observer/useValueObserver.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react'; 2 | 3 | export function useValueObserver( 4 | value: T, 5 | observer: (prev: T) => void, 6 | ): void { 7 | const ref = useRef(value); 8 | 9 | useEffect(() => { 10 | if (!Object.is(value, ref.current)) { 11 | observer(ref.current); 12 | ref.current = value; 13 | } 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /packages/hooks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "references": [{ "path": "../__testutils__" }], 13 | "compilerOptions": { 14 | "composite": true, 15 | "rootDir": "src", 16 | "outDir": "pkg/dist-types", 17 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/jestutils/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/jestutils/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/ui` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/jestutils)](https://www.npmjs.com/package/@superdispatch/testutils) 4 | 5 | #### Installation 6 | 7 | ```bash 8 | yarn add @superdispatch/testutils @testing-library/react 9 | ``` 10 | 11 | #### Setup 12 | 13 | ```javascript 14 | // In setupTests 15 | import '@superdispatch/jestutils'; 16 | ``` 17 | -------------------------------------------------------------------------------- /packages/jestutils/src/__tests__/index.ts: -------------------------------------------------------------------------------- 1 | import * as api from '..'; 2 | 3 | it('exposes public api', () => { 4 | expect(api).toMatchInlineSnapshot(); 5 | }); 6 | -------------------------------------------------------------------------------- /packages/jestutils/src/index.ts: -------------------------------------------------------------------------------- 1 | import './serializers/blob-serializer'; 2 | import './serializers/form-data-serializer'; 3 | import './serializers/location-serializer'; 4 | 5 | export * from './matchers/date-matchers'; 6 | export * from './mockEndpoint'; 7 | export * from './mockEndpoints'; 8 | export * from './spyLogs'; 9 | -------------------------------------------------------------------------------- /packages/jestutils/src/matchers/date-matchers.ts: -------------------------------------------------------------------------------- 1 | import { matcherHint, printExpected, printReceived } from 'jest-matcher-utils'; 2 | 3 | declare global { 4 | namespace jest { 5 | interface Matchers { 6 | toBeSameDate: (expected: unknown) => R; 7 | } 8 | } 9 | } 10 | 11 | expect.extend({ 12 | toBeSameDate(received: unknown, expected: unknown) { 13 | const pass = 14 | (received == null && expected == null) || 15 | (received instanceof Date && 16 | expected instanceof Date && 17 | (Object.is(received, expected) || 18 | Object.is(received.getTime(), expected.getTime()))); 19 | 20 | return { 21 | pass, 22 | message: () => 23 | !pass 24 | ? `${matcherHint('.toBeSameDate')}\n` + 25 | `Expected dates to be same:\n` + 26 | `Expected: ${printExpected(expected)}\n` + 27 | `Received: ${printReceived(received)}` 28 | : `${matcherHint('.not.toBeSameDate')}\n` + 29 | `Expected dates to not be same:\n` + 30 | `Expected: ${printExpected(expected)}\n` + 31 | `Received: ${printReceived(received)}`, 32 | }; 33 | }, 34 | }); 35 | -------------------------------------------------------------------------------- /packages/jestutils/src/mockEndpoints.ts: -------------------------------------------------------------------------------- 1 | import { 2 | mockEndpoint, 3 | MockEndpointOptions, 4 | MockEndpointRequest, 5 | MockEndpointResponse, 6 | } from './mockEndpoint'; 7 | 8 | export type MockEndpoints = { 9 | [TKey in TEndpointName]: MockEndpointOptions; 10 | }; 11 | 12 | export type MockEndpointResolvers = { 13 | [TKey in TEndpointName]: jest.Mock< 14 | MockEndpointResponse, 15 | [MockEndpointRequest] 16 | >; 17 | }; 18 | 19 | export function mockEndpoints( 20 | endpoints: MockEndpoints, 21 | defaults?: Pick, 22 | ): MockEndpointResolvers { 23 | const mocks = {} as MockEndpointResolvers; 24 | 25 | for (const name of Object.keys(endpoints) as TEndpointName[]) { 26 | mocks[name] = mockEndpoint(name, { ...defaults, ...endpoints[name] }); 27 | } 28 | 29 | return mocks; 30 | } 31 | -------------------------------------------------------------------------------- /packages/jestutils/src/serializers/__tests__/blob-serializer.spec.ts: -------------------------------------------------------------------------------- 1 | import '../../setupTestUtils'; 2 | 3 | it('serializes File', () => { 4 | expect(new File(['id,name'], 'report.csv', { type: 'text/csv' })) 5 | .toMatchInlineSnapshot(` 6 | File { 7 | "name": "report.csv", 8 | "size": 7, 9 | "type": "text/csv", 10 | } 11 | `); 12 | }); 13 | 14 | it('serializes Blob', () => { 15 | expect(new Blob(['foo'], { type: 'image/png' })).toMatchInlineSnapshot(` 16 | Blob { 17 | "size": 3, 18 | "type": "image/png", 19 | } 20 | `); 21 | }); 22 | -------------------------------------------------------------------------------- /packages/jestutils/src/serializers/__tests__/form-data-serializer.spec.ts: -------------------------------------------------------------------------------- 1 | import '../../setupTestUtils'; 2 | 3 | it('serializes empty FormData', () => { 4 | expect(new FormData()).toMatchInlineSnapshot(`FormData {}`); 5 | }); 6 | 7 | it('serializes FormData with some data', () => { 8 | const formData = new FormData(); 9 | 10 | formData.append('name', 'John'); 11 | formData.append('file', new File([], 'profile.jpg', { type: 'image/jpg' })); 12 | 13 | expect(formData).toMatchInlineSnapshot(` 14 | FormData { 15 | "file": File { 16 | "name": "profile.jpg", 17 | "size": 0, 18 | "type": "image/jpg", 19 | }, 20 | "name": "John", 21 | } 22 | `); 23 | }); 24 | 25 | it('serialize composed FormData', () => { 26 | const formData = new FormData(); 27 | formData.append('name', 'John'); 28 | 29 | expect({ foo: 'bar', form: formData }).toMatchInlineSnapshot(` 30 | Object { 31 | "foo": "bar", 32 | "form": FormData { 33 | "name": "John", 34 | }, 35 | } 36 | `); 37 | }); 38 | -------------------------------------------------------------------------------- /packages/jestutils/src/serializers/blob-serializer.ts: -------------------------------------------------------------------------------- 1 | expect.addSnapshotSerializer({ 2 | test(value: unknown) { 3 | return value instanceof Blob; 4 | }, 5 | 6 | print(blob, serialize) { 7 | const { type, size } = blob as Blob; 8 | 9 | if (blob instanceof File) { 10 | return serialize({ type, size, name: blob.name }).replace( 11 | /^Object/, 12 | 'File', 13 | ); 14 | } 15 | 16 | return serialize({ type, size }).replace(/^Object/, 'Blob'); 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /packages/jestutils/src/serializers/form-data-serializer.ts: -------------------------------------------------------------------------------- 1 | import { fromPairs } from 'lodash'; 2 | 3 | expect.addSnapshotSerializer({ 4 | test(value: unknown) { 5 | return value instanceof FormData; 6 | }, 7 | 8 | print(formData, serialize) { 9 | return serialize(fromPairs(Array.from(formData as FormData))).replace( 10 | /^Object/, 11 | 'FormData', 12 | ); 13 | }, 14 | }); 15 | -------------------------------------------------------------------------------- /packages/jestutils/src/serializers/location-serializer.ts: -------------------------------------------------------------------------------- 1 | import { parse } from 'qs'; 2 | 3 | expect.addSnapshotSerializer({ 4 | test(value: unknown) { 5 | return ( 6 | typeof value === 'object' && 7 | value != null && 8 | 'hash' in value && 9 | 'search' in value && 10 | 'pathname' in value 11 | ); 12 | }, 13 | 14 | print(location, serialize) { 15 | const { hash, search, pathname } = location as Location; 16 | 17 | const searchParams = parse(search, { 18 | ignoreQueryPrefix: true, 19 | decoder: (str, defaultDecoder, charset) => { 20 | const decoded = defaultDecoder(str, defaultDecoder, charset); 21 | 22 | try { 23 | return JSON.parse(decoded) as unknown; 24 | } catch { 25 | return decoded; 26 | } 27 | }, 28 | }); 29 | 30 | return serialize({ 31 | pathname, 32 | ...(!!hash && { hash }), 33 | ...(Object.keys(searchParams).length > 0 && { searchParams }), 34 | }); 35 | }, 36 | }); 37 | -------------------------------------------------------------------------------- /packages/jestutils/src/spyLogs.ts: -------------------------------------------------------------------------------- 1 | export interface SpyLogsOptions { 2 | warn: false | 'mute' | 'forbid'; 3 | error: false | 'mute' | 'forbid'; 4 | } 5 | 6 | export function spyLogs(options: SpyLogsOptions) { 7 | const methods = ['warn', 'error'] as const; 8 | const spies = new Map(); 9 | 10 | beforeEach(() => { 11 | for (const method of methods) { 12 | const option = options[method]; 13 | 14 | if (option) { 15 | const spy = jest.spyOn(console, method); 16 | 17 | if (option === 'mute') { 18 | spy.mockImplementation(); 19 | } 20 | 21 | spies.set(method, spy); 22 | } 23 | } 24 | }); 25 | 26 | afterEach(() => { 27 | for (const [method, spy] of spies) { 28 | if (options[method] === 'forbid') { 29 | expect(spy).not.toHaveBeenCalled(); 30 | } 31 | } 32 | }); 33 | } 34 | -------------------------------------------------------------------------------- /packages/jestutils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "compilerOptions": { 13 | "composite": true, 14 | "rootDir": "src", 15 | "outDir": "pkg/dist-types", 16 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/lab/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/lab/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/ui-lab` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/ui-lab)](https://www.npmjs.com/package/@superdispatch/ui-lab) 4 | [![npm minzipped size](https://img.shields.io/bundlephobia/minzip/@superdispatch/ui-lab.svg)](https://bundlephobia.com/result?p=@superdispatch/ui-lab) 5 | 6 | #### Installation 7 | 8 | ```bash 9 | yarn add @superdispatch/ui-lab 10 | ``` 11 | -------------------------------------------------------------------------------- /packages/lab/playroom.ts: -------------------------------------------------------------------------------- 1 | export { 2 | Alert, 3 | Banner, 4 | Box, 5 | Button, 6 | ButtonArea, 7 | DescriptionItem, 8 | FileDropZone, 9 | FileListItem, 10 | FlagList, 11 | LinkedText, 12 | MultilineText, 13 | Navbar, 14 | NavbarAvatar, 15 | NavbarMenu, 16 | Sidebar, 17 | SidebarContainer, 18 | SidebarDivider, 19 | SidebarMenuItem, 20 | SidebarMenuItemAction, 21 | SidebarMenuItemAvatar, 22 | SidebarSubheader, 23 | TextBox, 24 | } from './src'; 25 | -------------------------------------------------------------------------------- /packages/lab/src/box/Box.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { Box } from './Box'; 3 | 4 | export default { title: 'Lab/Box', component: Box } as Meta; 5 | 6 | export const basic = () => ( 7 | 18 | Hey 19 | 20 | ); 21 | -------------------------------------------------------------------------------- /packages/lab/src/chat/README.MD: -------------------------------------------------------------------------------- 1 | # Chat component 2 | 3 | ## Description 4 | 5 | Chat component is a container component that renders a list of messages and a form to send new messages. 6 | Each message displays the text of the message, the author, role, and date/time of the message. 7 | It displays the author's message on the right and the receiver's message on the left 8 | -------------------------------------------------------------------------------- /packages/lab/src/chat/__tests__/Chat.spec.tsx: -------------------------------------------------------------------------------- 1 | import { renderComponent } from '@superdispatch/ui-testutils'; 2 | import { screen } from '@testing-library/react'; 3 | import { Chat } from '../Chat'; 4 | import { ChatMessage } from '../ChatMessage'; 5 | 6 | describe('Chat', () => { 7 | it('Displays placeholder message when no messages are provided', () => { 8 | renderComponent(); 9 | 10 | expect(screen.getByText(/No new messages/i)).toBeInTheDocument(); 11 | }); 12 | 13 | it('Renders provided messages', () => { 14 | renderComponent( 15 | 16 | 23 | , 24 | ); 25 | 26 | expect(screen.getByText('Steve Trabajo')).toBeInTheDocument(); 27 | expect(screen.getByText('Hello, Vin! ...')).toBeInTheDocument(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /packages/lab/src/description-line-item/DescriptionLineItem.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { TextBox } from '../text-box/TextBox'; 3 | import { DescriptionLineItem } from './DescriptionLineItem'; 4 | 5 | export default { 6 | title: 'Lab/DescriptionLineItem', 7 | component: DescriptionLineItem, 8 | } as Meta; 9 | 10 | export const description = () => ( 11 | <> 12 | Payment}> 13 | 14 | $1,200 15 | 16 | 17 | Method}> 18 | 19 | Comcheck 20 | 21 | 22 | 23 | ); 24 | -------------------------------------------------------------------------------- /packages/lab/src/description-line-item/DescriptionLineItem.tsx: -------------------------------------------------------------------------------- 1 | import { ColorDynamic, Column, Columns } from '@superdispatch/ui'; 2 | import { forwardRef, ReactNode } from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | export const DottedLine = styled.div` 6 | border-bottom: 1px dotted ${ColorDynamic.Silver400}; 7 | margin: 0px 8px; 8 | height: 7px; 9 | `; 10 | 11 | interface DescriptionLineItemProps { 12 | title: ReactNode; 13 | children: ReactNode; 14 | } 15 | 16 | export const DescriptionLineItem = forwardRef< 17 | HTMLDivElement, 18 | DescriptionLineItemProps 19 | >(({ title, children }, ref) => ( 20 | 21 | {title} 22 | 23 | 24 | 25 | {children} 26 | 27 | )); 28 | 29 | DescriptionLineItem.displayName = 'DescriptionLineItem'; 30 | -------------------------------------------------------------------------------- /packages/lab/src/multiline-text/MultilineText.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { Box } from '../box/Box'; 3 | import { MultilineText } from './MultilineText'; 4 | 5 | export default { 6 | title: 'Lab/MultilineText', 7 | component: MultilineText, 8 | decorators: [ 9 | (Story) => ( 10 | 11 | 12 | 13 | ), 14 | ], 15 | } as Meta; 16 | 17 | export const basic = () => ( 18 | 19 | {`This is a multiline text with a lot of white space. 20 | 21 | Lorem ipsum dolor sit amet, 22 | consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. 23 | 24 | Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 25 | 26 | 27 | 28 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.`} 29 | 30 | ); 31 | -------------------------------------------------------------------------------- /packages/lab/src/multiline-text/MultilineText.ts: -------------------------------------------------------------------------------- 1 | import { Property } from 'csstype'; 2 | import styled from 'styled-components'; 3 | 4 | export interface MultilineTextProps { 5 | overflowWrap?: Extract< 6 | Property.OverflowWrap, 7 | 'anywhere' | 'break-word' | 'normal' 8 | >; 9 | } 10 | 11 | export const MultilineText = styled.span` 12 | white-space: pre-wrap; 13 | overflow-wrap: ${({ overflowWrap = 'normal' }) => overflowWrap}; 14 | `; 15 | 16 | MultilineText.displayName = 'MultilineText'; 17 | -------------------------------------------------------------------------------- /packages/lab/src/navbar/NavbarContext.tsx: -------------------------------------------------------------------------------- 1 | import { noop } from 'lodash'; 2 | import { createContext, useContext } from 'react'; 3 | 4 | export interface NavbarContextType { 5 | isDrawerOpen: boolean; 6 | isMenuExpanded: boolean; 7 | isNavbarExpanded: boolean; 8 | 9 | setDrawerOpen: (value: boolean) => void; 10 | setMenuExpanded: (value: boolean) => void; 11 | } 12 | 13 | export const NavbarContext = createContext({ 14 | isDrawerOpen: false, 15 | isMenuExpanded: false, 16 | isNavbarExpanded: false, 17 | setMenuExpanded: noop, 18 | setDrawerOpen: noop, 19 | }); 20 | 21 | export function useNavbarContext(): NavbarContextType { 22 | return useContext(NavbarContext); 23 | } 24 | -------------------------------------------------------------------------------- /packages/lab/src/sidebar/SidebarBackButton.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, IconButtonProps } from '@material-ui/core'; 2 | import { ArrowBack } from '@material-ui/icons'; 3 | import { useCollapseBreakpoint } from '@superdispatch/ui'; 4 | import { ReactElement } from 'react'; 5 | import { useSidebarContext } from './SidebarContainer'; 6 | 7 | export function SidebarBackButton({ 8 | onClick, 9 | children = , 10 | ...props 11 | }: IconButtonProps): ReactElement | null { 12 | const isCollapsed = useCollapseBreakpoint('sm'); 13 | const { openSidebar } = useSidebarContext(); 14 | 15 | if (!isCollapsed) { 16 | return null; 17 | } 18 | 19 | return ( 20 | { 24 | onClick?.(event); 25 | if (!event.isDefaultPrevented()) { 26 | openSidebar(); 27 | } 28 | }} 29 | > 30 | {children} 31 | 32 | ); 33 | } 34 | -------------------------------------------------------------------------------- /packages/lab/src/sidebar/SidebarDivider.tsx: -------------------------------------------------------------------------------- 1 | import { Divider } from '@material-ui/core'; 2 | import { forwardRef } from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | const SidebarDividerRoot = styled.div` 6 | padding: 20px 24px; 7 | `; 8 | 9 | export const SidebarDivider = forwardRef((_, ref) => { 10 | return ( 11 | 12 | 13 | 14 | ); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/lab/src/sidebar/SidebarMenuItemAction.tsx: -------------------------------------------------------------------------------- 1 | import { IconButton, Tooltip, TooltipProps } from '@material-ui/core'; 2 | import { forwardRef, ReactElement } from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | const SidebarMenuItemActionRoot = styled(IconButton)` 6 | & .MuiSvgIcon-root { 7 | font-size: 16px; 8 | } 9 | `; 10 | 11 | export interface SidebarMenuItemActionProps 12 | extends Pick { 13 | children: ReactElement; 14 | } 15 | 16 | export const SidebarMenuItemAction = forwardRef< 17 | HTMLButtonElement, 18 | SidebarMenuItemActionProps 19 | >(({ title, placement, children }, ref) => { 20 | return ( 21 | 22 | 23 | {children} 24 | 25 | 26 | ); 27 | }); 28 | -------------------------------------------------------------------------------- /packages/lab/src/sidebar/SidebarMenuItemContext.tsx: -------------------------------------------------------------------------------- 1 | import { 2 | createContext, 3 | ReactElement, 4 | ReactNode, 5 | useContext, 6 | useMemo, 7 | } from 'react'; 8 | 9 | export interface SidebarMenuItemContext { 10 | hovered?: boolean; 11 | disabled?: boolean; 12 | } 13 | 14 | const context = createContext({}); 15 | 16 | export function useSidebarMenuItemContext(): SidebarMenuItemContext { 17 | return useContext(context); 18 | } 19 | 20 | export interface SidebarMenuItemContextProviderProps 21 | extends SidebarMenuItemContext { 22 | children?: ReactNode; 23 | } 24 | 25 | export function SidebarMenuItemContextProvider({ 26 | children, 27 | hovered = false, 28 | disabled = false, 29 | }: SidebarMenuItemContextProviderProps): ReactElement { 30 | const ctx = useMemo(() => ({ hovered, disabled }), [hovered, disabled]); 31 | 32 | return {children}; 33 | } 34 | -------------------------------------------------------------------------------- /packages/lab/src/sidebar/SidebarSubheader.tsx: -------------------------------------------------------------------------------- 1 | import { Column, Columns } from '@superdispatch/ui'; 2 | import { forwardRef, ReactNode } from 'react'; 3 | import styled from 'styled-components'; 4 | import { TextBox } from '../text-box/TextBox'; 5 | 6 | const SidebarSubheaderRoot = styled.div` 7 | display: flex; 8 | align-items: center; 9 | 10 | height: 40px; 11 | max-height: 40px; 12 | padding-left: 24px; 13 | padding-right: 24px; 14 | `; 15 | 16 | export interface SidebarSubheaderProps { 17 | id?: string; 18 | action?: ReactNode; 19 | children?: ReactNode; 20 | } 21 | 22 | export const SidebarSubheader = forwardRef< 23 | HTMLDivElement, 24 | SidebarSubheaderProps 25 | >(({ id, action, children }, ref) => { 26 | return ( 27 | 28 | 29 | 30 | 31 | {children} 32 | 33 | 34 | {!!action && {action}} 35 | 36 | 37 | ); 38 | }); 39 | -------------------------------------------------------------------------------- /packages/lab/src/styled.d.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '@superdispatch/ui'; 2 | import 'styled-components'; 3 | 4 | declare module 'styled-components' { 5 | // eslint-disable-next-line @typescript-eslint/no-empty-interface 6 | export interface DefaultTheme extends SuperDispatchTheme {} 7 | 8 | // eslint-disable-next-line @typescript-eslint/ban-types 9 | export interface StyledConfig { 10 | displayName?: string; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/lab/src/utils/RuleNormalizer.ts: -------------------------------------------------------------------------------- 1 | export type RuleNormalizer = (input: unknown) => string | undefined; 2 | export type RuleNormalizerRecord = Readonly< 3 | Record 4 | >; 5 | 6 | export function createRuleNormalizer( 7 | rules: Record, 8 | ): RuleNormalizer { 9 | return (input) => { 10 | if (typeof input == 'string') { 11 | const value = rules[input as TKey]; 12 | 13 | if (typeof value == 'number') { 14 | return `${value}px`; 15 | } 16 | 17 | if (typeof value == 'string') { 18 | return value; 19 | } 20 | } 21 | 22 | return undefined; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/lab/src/utils/mergeStyles.ts: -------------------------------------------------------------------------------- 1 | import { CSSObject } from 'styled-components'; 2 | 3 | export function mergeStyles( 4 | styles: CSSObject, 5 | ...sources: Array 6 | ): CSSObject { 7 | for (const source of sources) { 8 | if (source) { 9 | for (const key in source) { 10 | if (Object.prototype.hasOwnProperty.call(source, key)) { 11 | const stylesValue = styles[key]; 12 | const sourceValue = source[key]; 13 | 14 | if ( 15 | typeof stylesValue == 'object' && 16 | typeof sourceValue == 'object' 17 | ) { 18 | mergeStyles(stylesValue, sourceValue); 19 | } else { 20 | styles[key] = source[key]; 21 | } 22 | } 23 | } 24 | } 25 | } 26 | 27 | return styles; 28 | } 29 | -------------------------------------------------------------------------------- /packages/lab/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "references": [{ "path": "../hooks" }, { "path": "../__testutils__" }], 13 | "compilerOptions": { 14 | "composite": true, 15 | "rootDir": "src", 16 | "outDir": "pkg/dist-types", 17 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/phones/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/phones/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/phones` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/phones)](https://www.npmjs.com/package/@superdispatch/phones) 4 | [![npm minzipped size](https://img.shields.io/bundlephobia/minzip/@superdispatch/phones.svg)](https://bundlephobia.com/result?p=@superdispatch/phones) 5 | 6 | #### Installation 7 | 8 | ```bash 9 | yarn add @superdispatch/phones awesome-phonenumber @material-ui/core @material-ui/icons 10 | ``` 11 | -------------------------------------------------------------------------------- /packages/phones/playroom.ts: -------------------------------------------------------------------------------- 1 | export { PhoneField } from './src/phone-field/PhoneField.playroom'; 2 | export { PhoneLink } from './src/phone-link/PhoneLink'; 3 | export { PhoneText } from './src/phone-text/PhoneText'; 4 | -------------------------------------------------------------------------------- /packages/phones/src/__tests__/index.spec.ts: -------------------------------------------------------------------------------- 1 | import * as api from '..'; 2 | 3 | test('api', () => { 4 | expect(api).toMatchInlineSnapshot(` 5 | Object { 6 | "DEFAULT_COUNTRY": "US", 7 | "PhoneField": React.forwardRef(PhoneField), 8 | "PhoneLink": React.forwardRef(PhoneLink), 9 | "PhoneService": [Function], 10 | "PhoneText": [Function], 11 | "SuspendedPhoneField": React.forwardRef(SuspendedPhoneField), 12 | "SuspendedPhoneLink": React.forwardRef(SuspendedPhoneLink), 13 | "SuspendedPhoneText": [Function], 14 | "formatCountry": [Function], 15 | "getCountryCode": [Function], 16 | "isCountryISO": [Function], 17 | "listCountries": [Function], 18 | "toCountryISO": [Function], 19 | "useFormattedPhoneNumber": [Function], 20 | "usePhoneService": [Function], 21 | } 22 | `); 23 | }); 24 | -------------------------------------------------------------------------------- /packages/phones/src/formatted-phone-number/FormattedPhoneNumber.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | import { 3 | PhoneFormatOptions, 4 | usePhoneService, 5 | } from '../phone-service/PhoneService'; 6 | 7 | export function useFormattedPhoneNumber( 8 | input: unknown, 9 | { format, country, fallback = '' }: PhoneFormatOptions = {}, 10 | ): string { 11 | const phoneService = usePhoneService(); 12 | 13 | return useMemo(() => { 14 | if (phoneService.checkPossibility(input) !== 'is-possible') { 15 | return fallback; 16 | } 17 | 18 | return phoneService.format(input, { format, country, fallback }); 19 | }, [phoneService, input, format, country, fallback]); 20 | } 21 | -------------------------------------------------------------------------------- /packages/phones/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './country-code-metadata/CountryCodeMetadata'; 2 | export * from './formatted-phone-number/FormattedPhoneNumber'; 3 | export * from './phone-field/PhoneField'; 4 | export * from './phone-link/PhoneLink'; 5 | export * from './phone-service/PhoneService'; 6 | export * from './phone-text/PhoneText'; 7 | -------------------------------------------------------------------------------- /packages/phones/src/phone-field/PhoneField.playroom.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, useMemo, useState } from 'react'; 2 | import { usePhoneService } from '../phone-service/PhoneService'; 3 | import { PhoneField as SdPhoneField, PhoneFieldProps } from './PhoneField'; 4 | 5 | export const PhoneField = forwardRef( 6 | ({ value, onChange, error, helperText, ...props }, ref) => { 7 | const [state, setState] = useState(''); 8 | const phoneService = usePhoneService(); 9 | const errorMessage = useMemo( 10 | () => phoneService.validate(value), 11 | [value, phoneService], 12 | ); 13 | 14 | return ( 15 | { 22 | setState(nextValue); 23 | onChange?.(nextValue); 24 | }} 25 | /> 26 | ); 27 | }, 28 | ); 29 | -------------------------------------------------------------------------------- /packages/phones/src/phone-field/PhoneField.stories.tsx: -------------------------------------------------------------------------------- 1 | import { PhoneField } from './PhoneField.playroom'; 2 | 3 | export default { title: 'Phones/PhoneField', component: PhoneField }; 4 | 5 | export const basic = () => ; 6 | export const validation = () => ; 7 | export const disabled = () => ( 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /packages/phones/src/phone-field/PhoneFieldMenuItem.spec.tsx: -------------------------------------------------------------------------------- 1 | import { renderCSS } from '@superdispatch/ui-testutils'; 2 | import { PhoneFieldMenuItem } from './PhoneFieldMenuItem'; 3 | 4 | test('css', () => { 5 | expect( 6 | renderCSS(, ['SD-PhoneFieldMenuItem']), 7 | ).toMatchInlineSnapshot(` 8 | .SD-PhoneFieldMenuItem-flag { 9 | margin-right: 8px; 10 | } 11 | `); 12 | }); 13 | -------------------------------------------------------------------------------- /packages/phones/src/phone-link/PhoneLink.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { PhoneLink } from './PhoneLink'; 3 | 4 | export default { title: 'Phones/PhoneLink', component: PhoneLink } as Meta; 5 | 6 | export const basic = () => ; 7 | export const fallback = () => ( 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /packages/phones/src/phone-text/PhoneText.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { PhoneText } from './PhoneText'; 3 | 4 | export default { title: 'Phones/PhoneText', component: PhoneText } as Meta; 5 | 6 | export const basic = () => ; 7 | export const fallback = () => ( 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /packages/phones/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "references": [{ "path": "../ui" }, { "path": "../__testutils__" }], 13 | "compilerOptions": { 14 | "composite": true, 15 | "rootDir": "src", 16 | "outDir": "pkg/dist-types", 17 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/testutils/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/testutils/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/ui` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/testutils)](https://www.npmjs.com/package/@superdispatch/testutils) 4 | 5 | #### Installation 6 | 7 | ```bash 8 | yarn add @superdispatch/testutils @testing-library/react 9 | ``` 10 | -------------------------------------------------------------------------------- /packages/testutils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@superdispatch/testutils", 3 | "version": "0.45.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/superdispatch/ui.git" 7 | }, 8 | "license": "MIT", 9 | "main": "src/index.ts", 10 | "types": "src/index.ts", 11 | "scripts": { 12 | "version": "pika build" 13 | }, 14 | "dependencies": { 15 | "faker": "^5.5.3" 16 | }, 17 | "peerDependencies": { 18 | "@babel/runtime": "^7.0.0" 19 | }, 20 | "publishConfig": { 21 | "access": "public", 22 | "directory": "pkg" 23 | }, 24 | "@pika/pack": { 25 | "pipeline": [ 26 | [ 27 | "@pika/plugin-standard-pkg", 28 | { 29 | "exclude": [ 30 | "**/*.spec.*", 31 | "**/__tests__/**/*" 32 | ] 33 | } 34 | ], 35 | [ 36 | "@pika/plugin-build-node" 37 | ], 38 | [ 39 | "@pika/plugin-build-types" 40 | ], 41 | [ 42 | "@pika/plugin-bundle-types" 43 | ] 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /packages/testutils/src/__tests__/index.ts: -------------------------------------------------------------------------------- 1 | import * as api from '..'; 2 | 3 | it('exposes public api', () => { 4 | expect(api).toMatchInlineSnapshot(` 5 | Object { 6 | "MockSchema": [Function], 7 | } 8 | `); 9 | }); 10 | -------------------------------------------------------------------------------- /packages/testutils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './MockSchema'; 2 | -------------------------------------------------------------------------------- /packages/testutils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "compilerOptions": { 13 | "composite": true, 14 | "rootDir": "src", 15 | "outDir": "pkg/dist-types", 16 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/ui/.babelrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const createBabelConfig = require('../../config/createBabelConfig'); 4 | 5 | module.exports = createBabelConfig(); 6 | -------------------------------------------------------------------------------- /packages/ui/README.md: -------------------------------------------------------------------------------- 1 | ### `@superdispatch/ui` 2 | 3 | [![npm](https://img.shields.io/npm/v/@superdispatch/ui)](https://www.npmjs.com/package/@superdispatch/ui) 4 | [![npm minzipped size](https://img.shields.io/bundlephobia/minzip/@superdispatch/ui.svg)](https://bundlephobia.com/result?p=@superdispatch/ui) 5 | 6 | #### Installation 7 | 8 | ```bash 9 | yarn add @superdispatch/ui @material-ui/core @material-ui/icons @material-ui/styles @mdi/js 10 | ``` 11 | 12 | #### Usage 13 | 14 | ```tsx 15 | import { Button, ThemeProvider } from '@superdispatch/ui'; 16 | import { Typography } from '@material-ui/core'; 17 | 18 | export function App() { 19 | return ( 20 | 21 | 22 | Hello 👋 23 | 24 | 25 | 26 | 27 | 28 | ); 29 | } 30 | ``` 31 | -------------------------------------------------------------------------------- /packages/ui/playroom.ts: -------------------------------------------------------------------------------- 1 | export { 2 | AdaptiveToolbar, 3 | AdaptiveVerticalToolbar, 4 | AvatarButton, 5 | CardButton, 6 | CheckboxField, 7 | CheckboxGroupField, 8 | Color, 9 | ColorDynamic, 10 | Column, 11 | Columns, 12 | DescriptionList, 13 | DescriptionListItem, 14 | DrawerActions, 15 | DrawerContent, 16 | DrawerList, 17 | DrawerTitle, 18 | InfoCard, 19 | Inline, 20 | NumberField, 21 | OverflowText, 22 | PatternField, 23 | RadioField, 24 | RadioGroupField, 25 | Snackbar, 26 | SnackbarContent, 27 | Stack, 28 | Tag, 29 | Tiles, 30 | VisibilityObserver, 31 | } from './src'; 32 | export { Dialog } from './src/dialog/Dialog.playroom'; 33 | export { Drawer } from './src/drawer/Drawer.playroom'; 34 | -------------------------------------------------------------------------------- /packages/ui/src/Image/Image.tsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from '@material-ui/core'; 2 | import { ImgHTMLAttributes } from 'react'; 3 | 4 | interface ImageProps extends ImgHTMLAttributes { 5 | srcDark?: string; 6 | } 7 | 8 | export function Image({ srcDark, src, ...props }: ImageProps): JSX.Element { 9 | const theme = useTheme(); 10 | const value = theme.palette.type === 'dark' && srcDark ? srcDark : src; 11 | return ; 12 | } 13 | -------------------------------------------------------------------------------- /packages/ui/src/LightDark/LightDark.tsx: -------------------------------------------------------------------------------- 1 | import { useTheme } from '@material-ui/core'; 2 | import { renderChildren } from '@superdispatch/ui'; 3 | import { ReactElement, ReactNode } from 'react'; 4 | 5 | interface LightDarkProps { 6 | light: ReactNode; 7 | dark: ReactNode; 8 | } 9 | 10 | export function LightDark({ 11 | light, 12 | dark, 13 | }: LightDarkProps): ReactElement | null { 14 | const theme = useTheme(); 15 | const isDarkMode = theme.palette.type === 'dark'; 16 | const mode: ReactNode = isDarkMode ? dark : light; 17 | return renderChildren(mode); 18 | } 19 | -------------------------------------------------------------------------------- /packages/ui/src/adaptive-toolbar/__tests__/AdaptiveToolbar.spec.tsx: -------------------------------------------------------------------------------- 1 | import { renderCSS } from '@superdispatch/ui-testutils'; 2 | import { AdaptiveToolbar } from '../AdaptiveToolbar'; 3 | 4 | it('checks component css', () => { 5 | expect(renderCSS(, ['SD-AdaptiveToolbar'])) 6 | .toMatchInlineSnapshot(` 7 | .SD-AdaptiveToolbar-actions { 8 | overflow: hidden; 9 | } 10 | `); 11 | }); 12 | -------------------------------------------------------------------------------- /packages/ui/src/app-bar/AppBarOverrides.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 2 | 3 | export function overrideAppBar(theme: SuperDispatchTheme): void { 4 | theme.props.MuiAppBar = { 5 | elevation: 0, 6 | color: 'inherit', 7 | position: 'static', 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /packages/ui/src/app-drawer/constants.ts: -------------------------------------------------------------------------------- 1 | export const DRAWER_SIZE_VALUES = ['md', 'lg', 'xl', 'xxl'] as const; 2 | -------------------------------------------------------------------------------- /packages/ui/src/avatar/Avatar.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Avatar } from '@material-ui/core'; 2 | import { PropsLink } from '@superdispatch/ui-docs'; 3 | 4 | export default { 5 | title: 'Data Display/Avatar', 6 | parameters: { 7 | componentSubtitle: ( 8 | 9 | ), 10 | }, 11 | }; 12 | 13 | export const basic = () => ; 14 | export const text = () => A1; 15 | export const image = () => ( 16 | 17 | ); 18 | -------------------------------------------------------------------------------- /packages/ui/src/avatar/AvatarOverrides.ts: -------------------------------------------------------------------------------- 1 | import { ColorDynamic } from '../theme/Color'; 2 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 3 | 4 | export function overrideAvatar(theme: SuperDispatchTheme): void { 5 | theme.overrides.MuiAvatar = { 6 | root: { 7 | ...theme.typography.h5, 8 | textTransform: 'uppercase', 9 | 10 | width: theme.spacing(5), 11 | height: theme.spacing(5), 12 | 13 | [theme.breakpoints.up('sm')]: { 14 | width: theme.spacing(4), 15 | height: theme.spacing(4), 16 | }, 17 | }, 18 | 19 | colorDefault: { 20 | color: ColorDynamic.Dark300, 21 | backgroundColor: ColorDynamic.Silver400, 22 | }, 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/ui/src/card/CardOverrides.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 2 | 3 | export function overrideCard(theme: SuperDispatchTheme): void { 4 | theme.props.MuiCard = { variant: 'outlined' }; 5 | 6 | theme.overrides.MuiCardContent = { 7 | root: { '&:last-child': { paddingBottom: undefined } }, 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /packages/ui/src/chip/Chip.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Chip } from '@material-ui/core'; 2 | import { PropsLink } from '@superdispatch/ui-docs'; 3 | import { Inline } from '..'; 4 | 5 | export default { 6 | title: 'Data Display/Chip', 7 | parameters: { 8 | componentSubtitle: ( 9 | 10 | ), 11 | }, 12 | }; 13 | 14 | export const examples = () => ( 15 | 16 | 17 | 18 | 19 | { 22 | alert('Delete!'); 23 | }} 24 | /> 25 | 26 | ); 27 | -------------------------------------------------------------------------------- /packages/ui/src/dialog/Dialog.playroom.tsx: -------------------------------------------------------------------------------- 1 | import { Dialog as MuiDialog, DialogProps } from '@material-ui/core'; 2 | import { forwardRef } from 'react'; 3 | 4 | export const Dialog = forwardRef( 5 | ( 6 | { 7 | open = true, 8 | disableAutoFocus = true, 9 | disableEnforceFocus = true, 10 | disableRestoreFocus = true, 11 | ...props 12 | }, 13 | ref, 14 | ) => ( 15 | 23 | ), 24 | ); 25 | -------------------------------------------------------------------------------- /packages/ui/src/dialog/DialogOverrides.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 2 | 3 | export function overrideDialog(theme: SuperDispatchTheme): void { 4 | theme.props.MuiDialogTitle = { disableTypography: true }; 5 | 6 | theme.overrides.MuiDialog = { 7 | paper: { 8 | margin: theme.spacing(3), 9 | }, 10 | 11 | paperWidthXs: { 12 | maxWidth: Math.max(theme.breakpoints.values.xs, 360), 13 | 14 | '&$paperScrollBody': { 15 | [theme.breakpoints.down( 16 | Math.max(theme.breakpoints.values.xs, 360) + 32 * 2, 17 | )]: { 18 | maxWidth: 'calc(100% - 64px)', 19 | }, 20 | }, 21 | }, 22 | }; 23 | 24 | theme.overrides.MuiDialogTitle = { 25 | root: { ...theme.typography.h3 }, 26 | }; 27 | 28 | theme.overrides.MuiDialogContent = { 29 | root: { padding: theme.spacing(0, 3) }, 30 | }; 31 | 32 | theme.overrides.MuiDialogActions = { 33 | root: { padding: theme.spacing(3) }, 34 | 35 | spacing: { 36 | '& > :not(:first-child)': { marginLeft: theme.spacing(2) }, 37 | }, 38 | }; 39 | } 40 | -------------------------------------------------------------------------------- /packages/ui/src/drawer/Drawer.playroom.tsx: -------------------------------------------------------------------------------- 1 | import { Drawer as MuiDrawer, DrawerProps } from '@material-ui/core'; 2 | import { forwardRef } from 'react'; 3 | 4 | export const Drawer = forwardRef( 5 | ( 6 | { 7 | disableAutoFocus = true, 8 | disableEnforceFocus = true, 9 | disableRestoreFocus = true, 10 | ...props 11 | }, 12 | ref, 13 | ) => ( 14 | 21 | ), 22 | ); 23 | -------------------------------------------------------------------------------- /packages/ui/src/drawer/DrawerContent.tsx: -------------------------------------------------------------------------------- 1 | import { makeStyles } from '@material-ui/styles'; 2 | import { clsx } from 'clsx'; 3 | import { forwardRef, HTMLAttributes } from 'react'; 4 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 5 | 6 | const useStyles = makeStyles( 7 | (theme: SuperDispatchTheme) => ({ 8 | root: { 9 | maxWidth: '100%', 10 | padding: theme.spacing(2, 3), 11 | 12 | [theme.breakpoints.up('md')]: { 13 | padding: theme.spacing(2, 4), 14 | }, 15 | }, 16 | }), 17 | { name: 'SD-DrawerContent' }, 18 | ); 19 | 20 | export type DrawerContentProps = HTMLAttributes; 21 | 22 | /** @deprecated Use `` instead. */ 23 | export const DrawerContent = forwardRef( 24 | ({ className, ...props }, ref) => { 25 | const styles = useStyles(); 26 | 27 | return ( 28 |
29 | ); 30 | }, 31 | ); 32 | -------------------------------------------------------------------------------- /packages/ui/src/drawer/DrawerOverrides.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 2 | 3 | /** @deprecated Use `` instead. */ 4 | export function overrideDrawer(theme: SuperDispatchTheme): void { 5 | theme.props.MuiDrawer = { 6 | anchor: 'right', 7 | }; 8 | 9 | theme.overrides.MuiDrawer = { 10 | paper: { 11 | maxWidth: '100%', 12 | minWidth: '100%', 13 | 14 | [theme.breakpoints.up('sm')]: { 15 | minWidth: theme.spacing(54), 16 | maxWidth: theme.breakpoints.values.sm, 17 | }, 18 | }, 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /packages/ui/src/dropdown-button/DropdownButton.stories.tsx: -------------------------------------------------------------------------------- 1 | import { MenuItem } from '@material-ui/core'; 2 | import { Meta } from '@storybook/react'; 3 | import { DropdownButton } from './DropdownButton'; 4 | 5 | export default { 6 | title: 'Navigation/DropdownButton', 7 | component: DropdownButton, 8 | } as Meta; 9 | 10 | export const basic = () => ( 11 | 12 | Post to SLB & CD 13 | Post to CD 14 | 15 | ); 16 | -------------------------------------------------------------------------------- /packages/ui/src/info-card/InfoCard.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Typography } from '@material-ui/core'; 2 | import { Meta } from '@storybook/react'; 3 | import { Button } from '@superdispatch/ui-lab'; 4 | import { Stack } from '../stack/Stack'; 5 | import { InfoCard } from './InfoCard'; 6 | 7 | export default { title: 'Surfaces/InfoCard', component: InfoCard } as Meta; 8 | 9 | export const basic = () => ( 10 | 11 | 12 | Title 13 | Content 14 | 15 | 16 | 17 | 18 | ); 19 | 20 | export const large = () => ( 21 | 22 | 23 | Title 24 | Content 25 | 26 | 27 | 28 | 29 | ); 30 | -------------------------------------------------------------------------------- /packages/ui/src/info-card/__tests__/InfoCard.spec.tsx: -------------------------------------------------------------------------------- 1 | import { renderCSS } from '@superdispatch/ui-testutils'; 2 | import { InfoCard } from '../..'; 3 | 4 | it('checks component css', () => { 5 | expect(renderCSS(, ['SD-InfoCard'])).toMatchInlineSnapshot(` 6 | .SD-InfoCard-root.SD-InfoCard-fullWidth { 7 | border-radius: 0; 8 | border-left-width: 0; 9 | border-right-width: 0; 10 | } 11 | 12 | .SD-InfoCard-content { 13 | padding: 16px; 14 | } 15 | 16 | @media (min-width: 600px) { 17 | .SD-InfoCard-sizeLarge > .SD-InfoCard-content { 18 | padding: 24px; 19 | } 20 | } 21 | `); 22 | }); 23 | -------------------------------------------------------------------------------- /packages/ui/src/list/ListOverrides.ts: -------------------------------------------------------------------------------- 1 | import { alpha } from '@material-ui/core'; 2 | import { Color, ColorDynamic } from '../theme/Color'; 3 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 4 | 5 | export function overrideList(theme: SuperDispatchTheme): void { 6 | const color = 7 | theme.palette.type === 'dark' 8 | ? alpha(Color.White, 0.08) 9 | : ColorDynamic.Silver200; 10 | 11 | theme.overrides.MuiListItem = { 12 | root: { 13 | '&$selected, &$selected:hover': { 14 | backgroundColor: ColorDynamic.Blue50, 15 | }, 16 | 17 | '& .MuiTouchRipple-root': { 18 | color: ColorDynamic.Blue100, 19 | }, 20 | }, 21 | button: { 22 | '&:hover': { 23 | backgroundColor: color, 24 | }, 25 | }, 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /packages/ui/src/menu/Menu.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Menu, MenuItem } from '@material-ui/core'; 2 | import { Meta } from '@storybook/react'; 3 | import { UseState } from '@superdispatch/ui-docs'; 4 | import { Button } from '@superdispatch/ui-lab'; 5 | 6 | export default { title: 'Navigation/Menu' } as Meta; 7 | 8 | export const basic = () => ( 9 | 10 | {(state, setState) => ( 11 | <> 12 | 20 | 21 | { 25 | setState(false); 26 | }} 27 | > 28 | Option 1 29 | Option 2 30 | Option 3 31 | 32 | 33 | )} 34 | 35 | ); 36 | -------------------------------------------------------------------------------- /packages/ui/src/menu/MenuOverrides.ts: -------------------------------------------------------------------------------- 1 | import { alpha } from '@material-ui/core'; 2 | import { Color, ColorDynamic } from '../theme/Color'; 3 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 4 | 5 | export function overrideMenu(theme: SuperDispatchTheme): void { 6 | const color = 7 | theme.palette.type === 'dark' 8 | ? alpha(Color.White, 0.08) 9 | : ColorDynamic.Silver200; 10 | 11 | theme.props.MuiMenu = { 12 | getContentAnchorEl: null, 13 | anchorOrigin: { vertical: 'bottom', horizontal: 'left' }, 14 | transformOrigin: { vertical: 'top', horizontal: 'left' }, 15 | }; 16 | 17 | theme.overrides.MuiMenu = { 18 | paper: { 19 | border: `1px solid ${ColorDynamic.Silver400}`, 20 | }, 21 | }; 22 | 23 | theme.overrides.MuiMenuItem = { 24 | root: { 25 | ...theme.typography.body2, 26 | paddingTop: theme.spacing(1), 27 | paddingBottom: theme.spacing(1), 28 | '&:hover': { 29 | backgroundColor: color, 30 | }, 31 | }, 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /packages/ui/src/overflow-text/OverflowText.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { Box } from '@superdispatch/ui-lab'; 3 | import { OverflowText } from './OverflowText'; 4 | 5 | export default { 6 | title: 'Data Display/OverflowText', 7 | component: OverflowText, 8 | decorators: [ 9 | (Story) => ( 10 | 11 | 12 | 13 | ), 14 | ], 15 | } as Meta; 16 | 17 | export const basic = () => ( 18 | 19 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 20 | 21 | ); 22 | 23 | export const customTooltip = () => ( 24 | 30 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 31 | 32 | ); 33 | -------------------------------------------------------------------------------- /packages/ui/src/overflow-text/__tests__/OverflowText.spec.tsx: -------------------------------------------------------------------------------- 1 | import { renderCSS } from '@superdispatch/ui-testutils'; 2 | import { OverflowText } from '../OverflowText'; 3 | 4 | it('checks component css', () => { 5 | expect(renderCSS(, ['SD-OverflowText'])) 6 | .toMatchInlineSnapshot(` 7 | .SD-OverflowText-root { 8 | transition: border 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; 9 | border-bottom: 1px dashed transparent; 10 | margin-bottom: -1px; 11 | } 12 | 13 | .SD-OverflowText-root.SD-OverflowText-truncated { 14 | cursor: pointer; 15 | border-bottom-color: ColorDynamic.Silver500; 16 | } 17 | 18 | .SD-OverflowText-sentinel { 19 | width: 1px; 20 | height: 100%; 21 | display: inline-block; 22 | } 23 | `); 24 | }); 25 | -------------------------------------------------------------------------------- /packages/ui/src/pagination/Pagination.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from '@material-ui/lab'; 2 | import { Meta } from '@storybook/react'; 3 | import { Stack } from '@superdispatch/ui'; 4 | import { PropsLink } from '@superdispatch/ui-docs'; 5 | import { Box } from '@superdispatch/ui-lab'; 6 | 7 | export default { 8 | title: 'Inputs/Pagination', 9 | component: Pagination, 10 | decorators: [ 11 | (Story) => ( 12 | 13 | 14 | 15 | ), 16 | ], 17 | parameters: { 18 | componentSubtitle: ( 19 | 20 | ), 21 | }, 22 | } as Meta; 23 | 24 | export const basic = () => ( 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | ); 33 | 34 | export const disabled = () => ( 35 | 36 | ); 37 | -------------------------------------------------------------------------------- /packages/ui/src/paper/PaperOverrides.ts: -------------------------------------------------------------------------------- 1 | import { ColorDynamic } from '../theme/Color'; 2 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 3 | 4 | export function overridePaper(theme: SuperDispatchTheme): void { 5 | theme.props.MuiPaper = { elevation: 0 }; 6 | 7 | theme.overrides.MuiPaper = { 8 | elevation0: { border: `1px solid ${ColorDynamic.Silver400}` }, 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/ui/src/preloader/PreLoaderOverrides.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 2 | 3 | export function overridePreloader(theme: SuperDispatchTheme): void { 4 | theme.overrides.MuiSkeleton = { 5 | text: { 6 | borderRadius: '3px', 7 | }, 8 | }; 9 | } 10 | -------------------------------------------------------------------------------- /packages/ui/src/props/AlignProps.ts: -------------------------------------------------------------------------------- 1 | import { Property } from 'csstype'; 2 | 3 | export type VerticalAlign = 'top' | 'center' | 'bottom'; 4 | export type HorizontalAlign = 'left' | 'center' | 'right'; 5 | 6 | export function parseAlignProp( 7 | align: VerticalAlign | HorizontalAlign, 8 | ): Property.AlignItems { 9 | switch (align) { 10 | case 'top': 11 | case 'left': 12 | default: 13 | return 'initial'; 14 | 15 | case 'center': 16 | return 'center'; 17 | 18 | case 'right': 19 | case 'bottom': 20 | return 'flex-end'; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/ui/src/props/CollapseProp.ts: -------------------------------------------------------------------------------- 1 | import { ResponsivePropTuple } from './ResponsiveProp'; 2 | 3 | export type CollapseProp = 'tablet' | 'desktop'; 4 | 5 | export function parseCollapsedBelow( 6 | collapsedBelow: undefined | CollapseProp, 7 | ): ResponsivePropTuple { 8 | return [ 9 | collapsedBelow === 'tablet' || collapsedBelow === 'desktop', 10 | collapsedBelow === 'desktop', 11 | false, 12 | ]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/ui/src/props/SpaceProp.ts: -------------------------------------------------------------------------------- 1 | export type SpaceProp = 2 | | 'none' 3 | | 'xxsmall' 4 | | 'xsmall' 5 | | 'small' 6 | | 'medium' 7 | | 'large' 8 | | 'xlarge' 9 | | 'xxlarge'; 10 | 11 | export type NegativeSpaceProp = 12 | | '-xxsmall' 13 | | '-xsmall' 14 | | '-small' 15 | | '-medium' 16 | | '-large' 17 | | '-xlarge' 18 | | '-xxlarge'; 19 | 20 | export function parseSpaceProp(prop: SpaceProp): number { 21 | switch (prop) { 22 | case 'none': 23 | default: 24 | return 0; 25 | case 'xxsmall': 26 | return 4; 27 | case 'xsmall': 28 | return 8; 29 | case 'small': 30 | return 16; 31 | case 'medium': 32 | return 24; 33 | case 'large': 34 | return 32; 35 | case 'xlarge': 36 | return 40; 37 | case 'xxlarge': 38 | return 48; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /packages/ui/src/radio/__tests__/RadioFieldCard.spec.tsx: -------------------------------------------------------------------------------- 1 | import { RadioFieldCard } from '../RadioFieldCard'; 2 | import { RadioGroupField } from '../RadioGroupField'; 3 | 4 | test('radio card component', () => { 5 | const onChange = jest.fn(); 6 | const onBlur = jest.fn(); 7 | expect( 8 | 14 | 15 | 16 | , 17 | ).toBeDefined(); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/ui/src/responsive/CollapseBreakpoint.ts: -------------------------------------------------------------------------------- 1 | import type { Breakpoint } from '@material-ui/core/styles/createBreakpoints'; 2 | import { useResponsiveContext } from './ResponsiveContext'; 3 | 4 | export type CollapseBreakpoint = 'sm' | 'md' | 'lg' | 'xl'; 5 | 6 | const BREAKPOINTS: Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl']; 7 | 8 | export function useCollapseBreakpoint( 9 | collapseBreakpoint: undefined | CollapseBreakpoint, 10 | ): boolean { 11 | const { breakpoint = 'xs' } = useResponsiveContext(); 12 | 13 | if (collapseBreakpoint == null) { 14 | return false; 15 | } 16 | 17 | const breakpointIDX = BREAKPOINTS.indexOf(breakpoint); 18 | const collapseBreakpointIDX = BREAKPOINTS.indexOf(collapseBreakpoint); 19 | 20 | return breakpointIDX < collapseBreakpointIDX; 21 | } 22 | -------------------------------------------------------------------------------- /packages/ui/src/responsive/MinBreakpoint.ts: -------------------------------------------------------------------------------- 1 | import type { Breakpoint } from '@material-ui/core/styles/createBreakpoints'; 2 | import { useResponsiveContext } from './ResponsiveContext'; 3 | 4 | export type MinBreakpoint = 'sm' | 'md' | 'lg' | 'xl'; 5 | 6 | const BREAKPOINTS: Breakpoint[] = ['xs', 'sm', 'md', 'lg', 'xl']; 7 | 8 | export function useMinBreakpoint( 9 | minBreakpoint: undefined | MinBreakpoint, 10 | ): boolean { 11 | const { breakpoint = 'xs' } = useResponsiveContext(); 12 | 13 | if (minBreakpoint == null) { 14 | return false; 15 | } 16 | 17 | const breakpointIDX = BREAKPOINTS.indexOf(breakpoint); 18 | const minBreakpointIDX = BREAKPOINTS.indexOf(minBreakpoint); 19 | 20 | return minBreakpointIDX < breakpointIDX; 21 | } 22 | -------------------------------------------------------------------------------- /packages/ui/src/snackbar/SnackbarOverrides.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 2 | 3 | export function overrideSnackbar(theme: SuperDispatchTheme): void { 4 | theme.overrides.MuiSnackbar = { 5 | root: { 6 | left: 0, 7 | right: 0, 8 | bottom: 0, 9 | padding: theme.spacing(0), 10 | background: 'transparent', 11 | }, 12 | anchorOriginBottomCenter: { 13 | left: 0, 14 | right: 0, 15 | bottom: 0, 16 | padding: theme.spacing(0), 17 | background: 'transparent', 18 | }, 19 | }; 20 | 21 | theme.overrides.MuiSnackbarContent = { 22 | root: { 23 | minHeight: theme.spacing(7.5), 24 | 25 | '&.SD-SnackbarContent-root': { 26 | width: '100%', 27 | position: 'relative', 28 | left: 0, 29 | right: 0, 30 | bottom: 0, 31 | borderRadius: theme.spacing(0), 32 | 33 | [theme.breakpoints.up('sm')]: { 34 | borderRadius: theme.spacing(0.5), 35 | }, 36 | }, 37 | }, 38 | 39 | message: { flex: 1, display: 'flex' }, 40 | }; 41 | } 42 | -------------------------------------------------------------------------------- /packages/ui/src/svg-icon/SvgIcon.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Home as HomeIcon } from '@material-ui/icons'; 2 | import { PropsLink } from '@superdispatch/ui-docs'; 3 | import { Inline } from '../inline/Inline'; 4 | 5 | export default { 6 | title: 'Data Display/SvgIcon', 7 | parameters: { 8 | componentSubtitle: ( 9 | 10 | ), 11 | }, 12 | }; 13 | 14 | export const basic = () => ( 15 | 16 | 17 | 18 | 19 | 20 | 21 | ); 22 | 23 | export const customSize = () => ( 24 | 25 | 26 | 27 | 28 | 29 | ); 30 | -------------------------------------------------------------------------------- /packages/ui/src/svg-icon/SvgIconOverrides.ts: -------------------------------------------------------------------------------- 1 | import { ColorDynamic } from '../theme/Color'; 2 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 3 | 4 | export function overrideSvgIcon(theme: SuperDispatchTheme): void { 5 | const sm = theme.breakpoints.up('sm'); 6 | 7 | theme.overrides.MuiSvgIcon = { 8 | root: { 9 | display: 'inherit', 10 | 11 | fontSize: 'var(--mui-svg-icon-size, 32px)', 12 | [sm]: { 13 | fontSize: 'var(--mui-svg-icon-size, 24px)', 14 | }, 15 | }, 16 | 17 | fontSizeSmall: { 18 | fontSize: 'var(--mui-svg-icon-size, 24px)', 19 | [sm]: { 20 | fontSize: 'var(--mui-svg-icon-size, 16px)', 21 | }, 22 | }, 23 | 24 | fontSizeLarge: { 25 | fontSize: 'var(--mui-svg-icon-size, 32px)', 26 | }, 27 | 28 | colorAction: { 29 | color: ColorDynamic.Dark100, 30 | }, 31 | 32 | colorPrimary: { 33 | color: ColorDynamic.Blue500, 34 | }, 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /packages/ui/src/tabs/Tabs.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Tab, Tabs } from '@material-ui/core'; 2 | import { Meta } from '@storybook/react'; 3 | import { UseState } from '@superdispatch/ui-docs'; 4 | 5 | export default { title: 'Navigation/Tabs' } as Meta; 6 | 7 | export const basic = () => ( 8 | 9 | {(state, setState) => ( 10 | { 13 | setState(next); 14 | }} 15 | > 16 | 17 | 18 | 19 | 20 | )} 21 | 22 | ); 23 | 24 | export const scrollButtons = () => ( 25 | 26 | {(state, setState) => ( 27 | { 31 | setState(next); 32 | }} 33 | > 34 | 35 | 36 | 37 | 38 | )} 39 | 40 | ); 41 | -------------------------------------------------------------------------------- /packages/ui/src/theme/SuperDispatchTheme.ts: -------------------------------------------------------------------------------- 1 | import { Theme } from '@material-ui/core'; 2 | import { SkeletonClassKey } from '@material-ui/lab'; 3 | 4 | declare module '@material-ui/core/styles/overrides' { 5 | export interface ComponentNameToClassKey { 6 | MuiSkeleton: SkeletonClassKey; 7 | } 8 | } 9 | 10 | export type SuperDispatchTheme = Readonly>; 11 | -------------------------------------------------------------------------------- /packages/ui/src/theme/__tests__/CssBaseline.spec.tsx: -------------------------------------------------------------------------------- 1 | import { renderCSS } from '@superdispatch/ui-testutils'; 2 | 3 | it('checks component css', () => { 4 | expect(renderCSS(
, ['MuiCssBaseline'])).toMatchInlineSnapshot(` 5 | html { 6 | box-sizing: border-box; 7 | -webkit-font-smoothing: antialiased; 8 | -moz-osx-font-smoothing: grayscale; 9 | } 10 | 11 | *, 12 | *::before, 13 | *::after { 14 | box-sizing: inherit; 15 | } 16 | 17 | strong, 18 | b { 19 | font-weight: 600; 20 | } 21 | 22 | body { 23 | color: Color.Dark500; 24 | margin: 0; 25 | font-size: 14px; 26 | font-family: 'Inter', sans-serif; 27 | font-weight: 400; 28 | line-height: 20px; 29 | background-color: #fafafa; 30 | } 31 | 32 | @media (min-width: 0px) and (max-width: 599.95px) { 33 | body { 34 | font-size: 16px; 35 | line-height: 24px; 36 | } 37 | } 38 | 39 | @media print { 40 | body { 41 | background-color: Color.White; 42 | } 43 | } 44 | 45 | body::backdrop { 46 | background-color: #fafafa; 47 | } 48 | `); 49 | }); 50 | -------------------------------------------------------------------------------- /packages/ui/src/toolbar/ToolbarOverrides.ts: -------------------------------------------------------------------------------- 1 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 2 | 3 | export function overrideToolbar(theme: SuperDispatchTheme): void { 4 | theme.overrides.MuiToolbar = { 5 | regular: { minHeight: theme.spacing(8) }, 6 | 7 | gutters: { 8 | [theme.breakpoints.up('sm')]: { 9 | paddingLeft: theme.spacing(2), 10 | paddingRight: theme.spacing(2), 11 | }, 12 | }, 13 | }; 14 | } 15 | -------------------------------------------------------------------------------- /packages/ui/src/tooltip/Tooltip.stories.tsx: -------------------------------------------------------------------------------- 1 | import { Tooltip } from '@material-ui/core'; 2 | import { PropsLink } from '@superdispatch/ui-docs'; 3 | import { Button } from '@superdispatch/ui-lab'; 4 | import { Inline } from '../inline/Inline'; 5 | 6 | export default { 7 | title: 'Data Display/Tooltip', 8 | parameters: { 9 | componentSubtitle: ( 10 | 11 | ), 12 | }, 13 | }; 14 | 15 | export const basic = () => ( 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | ); 34 | -------------------------------------------------------------------------------- /packages/ui/src/tooltip/TooltipOverrides.ts: -------------------------------------------------------------------------------- 1 | import { ColorDynamic } from '../theme/Color'; 2 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 3 | 4 | export function overrideTooltip(theme: SuperDispatchTheme): void { 5 | theme.overrides.MuiTooltip = { 6 | tooltip: { 7 | ...theme.typography.body2, 8 | padding: theme.spacing(1, 1.5), 9 | backgroundColor: ColorDynamic.Dark500, 10 | '--sd-dark-300': ColorDynamic.Silver500, //tooltip secondary color(Dark300) is invisible in dark mode 11 | }, 12 | 13 | popperArrow: { 14 | '&[x-placement*="top"] $arrow': { 15 | '&::before': { borderBottomRightRadius: 2 }, 16 | }, 17 | '&[x-placement*="left"] $arrow': { 18 | '&::before': { borderTopRightRadius: 2 }, 19 | }, 20 | '&[x-placement*="right"] $arrow': { 21 | '&::before': { borderBottomLeftRadius: 2 }, 22 | }, 23 | '&[x-placement*="bottom"] $arrow': { 24 | '&::before': { borderTopLeftRadius: 2 }, 25 | }, 26 | }, 27 | 28 | arrow: { 29 | color: ColorDynamic.Silver500, 30 | fontSize: theme.spacing(1), 31 | }, 32 | }; 33 | } 34 | -------------------------------------------------------------------------------- /packages/ui/src/utils/ExitTransitionPlaceholder.tsx: -------------------------------------------------------------------------------- 1 | import { ReactElement, ReactNode, useEffect, useState } from 'react'; 2 | import { renderChildren } from './renderChildren'; 3 | 4 | interface ExitTransitionPlaceholderProps { 5 | in: boolean; 6 | children: ReactNode; 7 | } 8 | 9 | export function ExitTransitionPlaceholder({ 10 | in: inProp, 11 | children: childrenProp, 12 | }: ExitTransitionPlaceholderProps): null | ReactElement { 13 | const [children, setChildren] = useState(childrenProp); 14 | 15 | useEffect(() => { 16 | if (inProp) { 17 | setChildren(childrenProp); 18 | } 19 | }, [inProp, childrenProp]); 20 | 21 | return renderChildren(children); 22 | } 23 | -------------------------------------------------------------------------------- /packages/ui/src/utils/ResizeObserver.tsx: -------------------------------------------------------------------------------- 1 | import { ResizeObserver } from '@juggle/resize-observer'; 2 | import { useEventHandler } from '@superdispatch/hooks'; 3 | import { useLayoutEffect } from 'react'; 4 | 5 | export function useResizeObserver( 6 | node: null | undefined | T, 7 | observer: (node: T) => void, 8 | ): void { 9 | const handler = useEventHandler(observer); 10 | 11 | useLayoutEffect(() => { 12 | if (!node) { 13 | return; 14 | } 15 | 16 | const resizeObserver = new ResizeObserver(() => { 17 | handler(node); 18 | }); 19 | 20 | resizeObserver.observe(node); 21 | 22 | handler(node); 23 | 24 | return () => { 25 | resizeObserver.disconnect(); 26 | }; 27 | }, [node, handler]); 28 | } 29 | -------------------------------------------------------------------------------- /packages/ui/src/utils/__tests__/ExitTransitionPlaceholder.spec.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import { ExitTransitionPlaceholder } from '../ExitTransitionPlaceholder'; 3 | 4 | it('render null child', () => { 5 | const child = null; 6 | const { container } = render( 7 | {child}, 8 | ); 9 | expect(container).toBeEmptyDOMElement(); 10 | }); 11 | 12 | it('render null with boolean child', () => { 13 | const child = true; 14 | const { container } = render( 15 | {child}, 16 | ); 17 | expect(container).toBeEmptyDOMElement(); 18 | }); 19 | 20 | it('render child', () => { 21 | const { rerender } = render( 22 | 23 |

Test

24 |
, 25 | ); 26 | expect(screen.getByText('Test')).toBeInTheDocument(); 27 | 28 | rerender( 29 | 30 |

31 | , 32 | ); 33 | expect(screen.getByText('Test')).toBeInTheDocument(); 34 | }); 35 | -------------------------------------------------------------------------------- /packages/ui/src/utils/isEmptyReactNode.ts: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react'; 2 | 3 | export function isEmptyReactNode( 4 | node: ReactNode, 5 | ): node is null | undefined | boolean | string { 6 | return ( 7 | node == null || 8 | typeof node == 'boolean' || 9 | (typeof node == 'string' && node.length === 0) 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /packages/ui/src/utils/mergeRefs.ts: -------------------------------------------------------------------------------- 1 | import { MutableRefObject, Ref } from 'react'; 2 | 3 | export function mergeRefs( 4 | ...refs: Array> 5 | ): (node: T) => void { 6 | return (node) => { 7 | refs.forEach((ref) => { 8 | assignRef(ref, node); 9 | }); 10 | }; 11 | } 12 | 13 | export function assignRef(ref: Ref | undefined, value: T): void { 14 | if (ref) { 15 | if (typeof ref === 'function') { 16 | ref(value); 17 | } else { 18 | (ref as MutableRefObject).current = value; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/ui/src/utils/renderChildren.ts: -------------------------------------------------------------------------------- 1 | import { ReactElement, ReactNode } from 'react'; 2 | 3 | export function renderChildren(node: ReactNode): null | ReactElement { 4 | if (node == null || typeof node == 'boolean') { 5 | return null; 6 | } 7 | 8 | // Workaround for https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051 9 | return node as ReactElement; 10 | } 11 | -------------------------------------------------------------------------------- /packages/ui/src/utils/useUID.ts: -------------------------------------------------------------------------------- 1 | import { useMemo } from 'react'; 2 | 3 | let current = 0; 4 | 5 | export function useUID(defaultID?: string): string { 6 | const uid = useMemo(() => `uid_${(current += 1)}`, []); 7 | 8 | return defaultID || uid; 9 | } 10 | -------------------------------------------------------------------------------- /packages/ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.build", 3 | "exclude": [ 4 | "pkg", 5 | "playroom.ts", 6 | "**/*.spec.*", 7 | "**/*.stories.*", 8 | "**/*.playroom.*", 9 | "**/__tests__/**", 10 | "**/__testutils__/**" 11 | ], 12 | "references": [{ "path": "../hooks" }, { "path": "../__testutils__" }], 13 | "compilerOptions": { 14 | "composite": true, 15 | "rootDir": "src", 16 | "outDir": "pkg/dist-types", 17 | "tsBuildInfoFile": "pkg/dist-types/.tsbuildinfo" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /patches/@pika+pack+0.5.0.patch: -------------------------------------------------------------------------------- 1 | diff --git a/node_modules/@pika/pack/dist-node/index.js b/node_modules/@pika/pack/dist-node/index.js 2 | index 585902c..4a19167 100644 3 | --- a/node_modules/@pika/pack/dist-node/index.js 4 | +++ b/node_modules/@pika/pack/dist-node/index.js 5 | @@ -2210,7 +2210,7 @@ async function generatePublishManifest(manifest, config, _dists) { 6 | version, 7 | license, 8 | bin, 9 | - files: ['dist-*/', 'bin/'], 10 | + files: ['dist-*/**', 'bin/'], 11 | pika: true, 12 | sideEffects: sideEffects || false, 13 | keywords, 14 | -------------------------------------------------------------------------------- /scripts/plop-templates/README.hbs: -------------------------------------------------------------------------------- 1 | # {{pascalCase name}} component 2 | 3 | #### Was made during task: 4 | 5 | **link to task** 6 | 7 | ####Description: 8 | 9 | **place your text here** -------------------------------------------------------------------------------- /scripts/plop-templates/lab-component/component.hbs: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react'; 2 | import styled from 'styled-components'; 3 | 4 | // Import your necessary UI elements and other libraries here 5 | 6 | // Define your CSS mixins, animations, and other styled-components here 7 | 8 | const Styled{{pascalCase name}} = styled(`div`)` 9 | /* Some CSS styles here */ 10 | `; 11 | 12 | export interface {{pascalCase name}}Props { 13 | /* Some component props here */ 14 | } 15 | 16 | export const {{pascalCase name}} = forwardRef( 17 | (props, ref) => { 18 | // Use useEffect, useState and other hooks as per your need 19 | 20 | // Implement your component's functionality here 21 | 22 | return ( 23 | 24 | {/* Render your component's children or other UI elements here */} 25 | 26 | ); 27 | }, 28 | ); 29 | 30 | {{pascalCase name}}.displayName = '{{pascalCase name}}'; -------------------------------------------------------------------------------- /scripts/plop-templates/lab-component/story.hbs: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Meta } from '@storybook/react'; 3 | import { {{pascalCase name}} } from './{{pascalCase name}}'; 4 | 5 | export default { title: 'Lab/{{pascalCase name}}', component: {{pascalCase name}} } as Meta; 6 | 7 | export const basic = () => ( 8 | <{{pascalCase name}}> 9 | {/* Some component props and children here */} 10 | 11 | ); 12 | -------------------------------------------------------------------------------- /scripts/plop-templates/lab-component/test.hbs: -------------------------------------------------------------------------------- 1 | import { renderComponent } from '@superdispatch/ui-testutils'; 2 | import { {{pascalCase name}} } from '../{{pascalCase name}}'; 3 | import { screen } from '@testing-library/react'; 4 | 5 | test('{{pascalCase name}} renders', () => { 6 | renderComponent(<{{pascalCase name}}>{{pascalCase name}}); 7 | expect(screen.getByTestId('{{camelCase name}}')).toMatchSnapshot(); 8 | }); 9 | -------------------------------------------------------------------------------- /scripts/plop-templates/overrides/component.hbs: -------------------------------------------------------------------------------- 1 | import { Color } from '../theme/Color'; 2 | import { SuperDispatchTheme } from '../theme/SuperDispatchTheme'; 3 | 4 | export function override{{pascalCase name}}(theme: SuperDispatchTheme): void { 5 | theme.props.Mui{{pascalCase name}} = { 6 | // props configuration here 7 | }; 8 | 9 | theme.overrides.Mui{{pascalCase name}} = { 10 | root: { 11 | // root configuration here 12 | }, 13 | 14 | // add other necessary classes configurations here 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /scripts/plop-templates/overrides/playroom.hbs: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { {{name}} as Mui{{name}}, {{name}}Props } from '@material-ui/core'; 3 | import { forwardRef } from 'react'; 4 | 5 | export const {{name}} = forwardRef( 6 | ({ ...props }, ref) => ( 7 | 11 | ), 12 | ); 13 | -------------------------------------------------------------------------------- /scripts/plop-templates/overrides/story.hbs: -------------------------------------------------------------------------------- 1 | import { Meta } from '@storybook/react'; 2 | import { PropsLink } from '@superdispatch/ui-docs'; 3 | import { {{pascalCase name}} } from '@material-ui/core'; 4 | 5 | export default { 6 | title: '{{title}}/{{pascalCase name}}', 7 | parameters: { 8 | componentSubtitle: ( 9 | 10 | ), 11 | }, 12 | } as Meta; 13 | 14 | export const basic = () => ( 15 | <{{pascalCase name}}> 16 | { 17 | // TODO: Add your component details here 18 | } 19 | 20 | ); 21 | -------------------------------------------------------------------------------- /scripts/plop-templates/overrides/test.hbs: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { renderCSS } from '@superdispatch/ui-testutils'; 3 | import { {{name}} } from '@material-ui/core'; 4 | 5 | it('checks component css', () => { 6 | expect(renderCSS(<{{name}} />, ['SD-{{name}}'])).toMatchInlineSnapshot(` 7 | //TODO: Write component's CSS Snapshot 8 | `); 9 | }); 10 | 11 | //TODO: Add more tests 12 | -------------------------------------------------------------------------------- /scripts/remove-old-tags.ts: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import * as execa from 'execa'; 4 | import * as semver from 'semver'; 5 | import * as lerna from '../lerna.json'; 6 | 7 | const version = semver.parse(lerna.version); 8 | 9 | if (!version) { 10 | throw new Error('Failed to parse lerna version'); 11 | } 12 | 13 | const { stdout: rawTags } = execa.sync('git', ['tag']); 14 | const versionRange = `>=${version.major}.${Math.max(0, version.minor - 1)}`; 15 | 16 | const tags = rawTags 17 | .trim() 18 | .split('\n') 19 | .filter((tag) => !semver.valid(tag) || !semver.satisfies(tag, versionRange)); 20 | 21 | if (tags.length > 0) { 22 | console.log('Removing %d tags…', tags.length); 23 | execa.sync('git', ['tag', '-d', ...tags]); 24 | execa.sync('git', ['push', '--delete', 'origin', ...tags]); 25 | } else { 26 | console.log('There are no outdated tags 🎉'); 27 | } 28 | -------------------------------------------------------------------------------- /setupTests.ts: -------------------------------------------------------------------------------- 1 | import { spyLogs } from '@superdispatch/jestutils'; 2 | import { resetMockDate } from '@superdispatch/ui-testutils'; 3 | import '@testing-library/jest-dom'; 4 | import { ForwardRef } from 'react-is'; 5 | 6 | spyLogs({ warn: 'forbid', error: 'forbid' }); 7 | 8 | afterEach(resetMockDate); 9 | 10 | // Mock `getComputedStyle` to workaround `accessible-name-and-description` 11 | // selector of the `dom-accessibility-api`. 12 | Object.defineProperty(window, 'getComputedStyle', { 13 | writable: false, 14 | enumerable: false, 15 | configurable: false, 16 | value: () => ({ getPropertyValue: () => '' }), 17 | }); 18 | 19 | // @eslint/eslintrc uses document.baseURI in cjs builds. 20 | // Remove when migrating tests to ESModules. 21 | Object.defineProperty(document, 'baseURI', { 22 | value: 'file:', 23 | writable: true, 24 | }); 25 | 26 | expect.addSnapshotSerializer({ 27 | test: (value) => value?.$$typeof === ForwardRef, 28 | serialize: (value) => `React.forwardRef(${value.displayName || 'unknown'})`, 29 | }); 30 | -------------------------------------------------------------------------------- /tools/codemods/normalize-story-name.js: -------------------------------------------------------------------------------- 1 | // yarn codemod --plugin ./tools/codemods/normalize-story-name.js packages/ 2 | 3 | 'use strict'; 4 | 5 | const { camelCase } = require('lodash'); 6 | 7 | module.exports = ({ types }) => ({ 8 | visitor: { 9 | ExportNamedDeclaration(path, { filename }) { 10 | const { node } = path; 11 | 12 | if (!filename || !filename.endsWith('.stories.tsx')) { 13 | return; 14 | } 15 | 16 | if (!types.isVariableDeclaration(node.declaration)) { 17 | return; 18 | } 19 | 20 | const { declaration } = node; 21 | 22 | for (const declarator of declaration.declarations) { 23 | if (!types.isVariableDeclarator(declarator)) { 24 | continue; 25 | } 26 | 27 | const { id, init } = declarator; 28 | 29 | if (!types.isArrowFunctionExpression(init)) { 30 | continue; 31 | } 32 | 33 | const camelCaseID = camelCase(id.name); 34 | 35 | if (id.name !== camelCaseID) { 36 | declarator.id = types.identifier(camelCaseID); 37 | } 38 | } 39 | }, 40 | }, 41 | }); 42 | -------------------------------------------------------------------------------- /tools/codemods/use-dark-color.js: -------------------------------------------------------------------------------- 1 | // yarn codemod --plugin ./tools/codemods/use-dark-color.js packages/ 2 | 3 | 'use strict'; 4 | 5 | module.exports = ({ types }) => ({ 6 | visitor: { 7 | JSXAttribute({ node }) { 8 | if ( 9 | types.isStringLiteral(node.value) && 10 | node.value.value.startsWith('Grey') 11 | ) { 12 | node.value = types.stringLiteral( 13 | node.value.value.replace('Grey', 'Dark'), 14 | ); 15 | } 16 | }, 17 | MemberExpression(path) { 18 | const { node } = path; 19 | 20 | if ( 21 | node.object.name === 'Color' && 22 | types.isIdentifier(node.property) && 23 | node.property.name.startsWith('Grey') 24 | ) { 25 | node.property = types.identifier( 26 | node.property.name.replace('Grey', 'Dark'), 27 | ); 28 | } 29 | }, 30 | }, 31 | }); 32 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@superdispatch/tsconfig", 3 | "compilerOptions": { 4 | "noEmit": false 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/pkg/**/*"], 3 | "include": ["scripts", "packages", "setupTests.ts", "globalSetup.ts"], 4 | "extends": "@superdispatch/tsconfig", 5 | "compilerOptions": { 6 | "module": "CommonJS", 7 | "esModuleInterop": false, 8 | "allowSyntheticDefaultImports": false, 9 | "tsBuildInfoFile": "./node_modules/.cache/tsconfig.tsbuildinfo" 10 | } 11 | } 12 | --------------------------------------------------------------------------------