├── .github └── workflows │ └── deploy-to-maven-central.yml ├── .gitignore ├── .idea ├── codeStyles │ ├── Project.xml │ └── codeStyleConfig.xml ├── compiler.xml ├── encodings.xml ├── jarRepositories.xml ├── kotlinScripting.xml ├── kotlinc.xml ├── libraries-with-intellij-classes.xml ├── misc.xml ├── runConfigurations.xml └── vcs.xml ├── LICENSE ├── README.md ├── build.gradle.kts ├── buildSrc ├── build.gradle.kts └── src │ └── main │ └── java │ ├── Kotlin.kt │ ├── Libraries.kt │ ├── Packages.kt │ ├── Projects.kt │ ├── Properties.kt │ └── maven-publishing.gradle.kts ├── core ├── .gitignore ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── materialui │ ├── aliases.kt │ ├── components │ ├── MaterialElementBuilder.kt │ ├── MaterialElementStyles.kt │ ├── MaterialStyle.kt │ ├── StandardProps.kt │ ├── appbar │ │ ├── AppBarElementBuilder.kt │ │ ├── appBar.kt │ │ └── enums │ │ │ ├── AppBarColor.kt │ │ │ ├── AppBarPosition.kt │ │ │ └── AppBarStyle.kt │ ├── avatar │ │ ├── AvatarElementBuilder.kt │ │ ├── avatar.kt │ │ └── enum │ │ │ └── AvatarStyle.kt │ ├── backdrop │ │ ├── BackdropElementBuilder.kt │ │ ├── backdrop.kt │ │ └── enum │ │ │ └── BackdropStyle.kt │ ├── badge │ │ ├── BadgeElementBuilder.kt │ │ ├── badge.kt │ │ └── enums │ │ │ ├── BadgeColor.kt │ │ │ ├── BadgeStyle.kt │ │ │ └── BadgeVariant.kt │ ├── bottomnavigation │ │ ├── BottomNavigationElementBuilder.kt │ │ └── bottomNavigation.kt │ ├── bottomnavigationaction │ │ ├── BottomNavigationActionElementBuilder.kt │ │ └── bottomNavigationAction.kt │ ├── breadcrumbs │ │ ├── BreadcrumbsElementBuilder.kt │ │ ├── breadcrumbs.kt │ │ └── enums │ │ │ └── BreadcrumbsStyle.kt │ ├── button │ │ ├── ButtonElementBuilder.kt │ │ ├── button.kt │ │ └── enums │ │ │ ├── ButtonColor.kt │ │ │ ├── ButtonSize.kt │ │ │ ├── ButtonStyle.kt │ │ │ └── ButtonVariant.kt │ ├── buttonbase │ │ ├── ButtonBaseElementBuilder.kt │ │ ├── TouchRippleElementBuilder.kt │ │ ├── buttonBase.kt │ │ ├── enums │ │ │ ├── ButtonBaseStyle.kt │ │ │ ├── ButtonStyle.kt │ │ │ └── TouchRippleStyle.kt │ │ └── touchRipple.kt │ ├── buttongroup │ │ ├── ButtonGroupElementBuilder.kt │ │ ├── buttongroup.kt │ │ └── enums │ │ │ ├── ButtonGroupOrientation.kt │ │ │ └── ButtonGroupStyle.kt │ ├── card │ │ ├── CardElementBuilder.kt │ │ └── card.kt │ ├── cardactionarea │ │ ├── CardActionAreaElementBuilder.kt │ │ └── cardActionArea.kt │ ├── cardactions │ │ ├── CardActionsElementBuilder.kt │ │ ├── cardActions.kt │ │ └── enums │ │ │ └── CardActionsStyle.kt │ ├── cardcontent │ │ ├── CardContentElementBuilder.kt │ │ └── cardContent.kt │ ├── cardheader │ │ ├── CardHeaderElementBuilder.kt │ │ ├── cardHeader.kt │ │ └── enums │ │ │ └── CardHeaderStyle.kt │ ├── cardmedia │ │ ├── CardMediaElementBuilder.kt │ │ ├── cardmedia.kt │ │ └── enums │ │ │ └── CardMediaStyle.kt │ ├── checkbox │ │ ├── CheckboxElementBuilder.kt │ │ ├── checkbox.kt │ │ └── enums │ │ │ ├── CheckboxColor.kt │ │ │ └── CheckboxStyle.kt │ ├── chip │ │ ├── ChipElementBuilder.kt │ │ ├── chip.kt │ │ └── enums │ │ │ ├── ChipColor.kt │ │ │ ├── ChipStyle.kt │ │ │ └── ChipVariant.kt │ ├── circularprogress │ │ ├── CircularProgressElementBuilder.kt │ │ ├── circularprogress.kt │ │ └── enums │ │ │ ├── CircularProgressColor.kt │ │ │ ├── CircularProgressStyle.kt │ │ │ └── CircularProgressVariant.kt │ ├── clickawaylistener │ │ ├── ClickAwayListenerBuilder.kt │ │ ├── clickAwayListener.kt │ │ └── enums │ │ │ ├── ClickAwayMouseEvent.kt │ │ │ └── ClickAwayTouchEvent.kt │ ├── collapse │ │ ├── CollapseElementBuilder.kt │ │ ├── collapse.kt │ │ └── enums │ │ │ └── CollapseStyle.kt │ ├── container │ │ ├── ContainerElementBuilder.kt │ │ ├── container.kt │ │ └── enums │ │ │ ├── ContainerMaxWidth.kt │ │ │ └── ContainerStyle.kt │ ├── cssbaseline │ │ └── cssBaseline.kt │ ├── dialog │ │ ├── DialogElementBuilder.kt │ │ ├── dialog.kt │ │ └── enums │ │ │ ├── DialogMaxWidth.kt │ │ │ ├── DialogScroll.kt │ │ │ └── DialogStyle.kt │ ├── dialogactions │ │ ├── DialogActionsElementBuilder.kt │ │ ├── dialogActions.kt │ │ └── enums │ │ │ └── DialogActionsStyle.kt │ ├── dialogcontent │ │ ├── DialogContentElementBuilder.kt │ │ └── dialogContent.kt │ ├── dialogcontenttext │ │ ├── DialogContentTextElementBuilder.kt │ │ └── dialogContentText.kt │ ├── dialogtitle │ │ ├── DialogTitleElementBuilder.kt │ │ └── dialogTitle.kt │ ├── divider │ │ ├── DividerElementBuilder.kt │ │ ├── divider.kt │ │ └── enums │ │ │ ├── DividerOrientation.kt │ │ │ ├── DividerStyle.kt │ │ │ └── DividerVariant.kt │ ├── drawer │ │ ├── DrawerElementBuilder.kt │ │ ├── drawer.kt │ │ └── enums │ │ │ ├── DrawerAnchor.kt │ │ │ ├── DrawerStyle.kt │ │ │ └── DrawerVariant.kt │ ├── expansionpanel │ │ ├── ExpansionPanelElementBuilder.kt │ │ ├── enums │ │ │ └── ExpansionPanelStyle.kt │ │ └── expansionPanel.kt │ ├── expansionpanelactions │ │ ├── ExpansionPanelActionsElementBuilder.kt │ │ ├── enums │ │ │ └── ExpansionPanelActionsStyle.kt │ │ └── expansionPanelActions.kt │ ├── expansionpaneldetails │ │ ├── ExpansionPanelDetailsElementBuilder.kt │ │ └── expansionPanelDetails.kt │ ├── expansionpanelsummary │ │ ├── ExpansionPanelSummaryElementBuilder.kt │ │ ├── enums │ │ │ └── ExpansionPanelSummaryStyle.kt │ │ └── expansionPanelSummary.kt │ ├── fab │ │ ├── FabElementBuilder.kt │ │ ├── enums │ │ │ ├── FabStyle.kt │ │ │ └── FabVariant.kt │ │ └── fab.kt │ ├── fade │ │ ├── FadeElementBuilder.kt │ │ └── fade.kt │ ├── filledinput │ │ ├── FilledInputElementBuilder.kt │ │ ├── enums │ │ │ └── FilledInputStyle.kt │ │ └── filledInput.kt │ ├── formcontrol │ │ ├── FormControlElementBuilder.kt │ │ ├── enums │ │ │ ├── FormControlMargin.kt │ │ │ ├── FormControlStyle.kt │ │ │ └── FormControlVariant.kt │ │ └── formControl.kt │ ├── formcontrollabel │ │ ├── FormControlLabelElementBuilder.kt │ │ ├── enums │ │ │ ├── FormControlLabelPlacement.kt │ │ │ └── FormControlLabelStyle.kt │ │ └── formControlLabel.kt │ ├── formgroup │ │ ├── FormGroupElementBuilder.kt │ │ ├── enums │ │ │ └── FormGroupStyle.kt │ │ └── formGroup.kt │ ├── formhelpertext │ │ ├── FormHelperTextElementBuilder.kt │ │ ├── enums │ │ │ ├── FormHelperTextMargin.kt │ │ │ ├── FormHelperTextStyle.kt │ │ │ └── FormHelperTextVariant.kt │ │ └── formHelperText.kt │ ├── formlabel │ │ ├── FormLabelElementBuilder.kt │ │ ├── enums │ │ │ └── FormLabelStyle.kt │ │ └── formLabel.kt │ ├── grid │ │ ├── GridElementBuilder.kt │ │ ├── enums │ │ │ ├── GridAlign.kt │ │ │ ├── GridAlignContent.kt │ │ │ ├── GridAlignItems.kt │ │ │ ├── GridDirection.kt │ │ │ ├── GridJustify.kt │ │ │ ├── GridStyle.kt │ │ │ └── GridWrap.kt │ │ └── grid.kt │ ├── gridlist │ │ ├── GridListElementBuilder.kt │ │ └── gridList.kt │ ├── gridlisttile │ │ ├── GridListTileElementBuilder.kt │ │ ├── enums │ │ │ └── GridListTitleStyle.kt │ │ └── gridListTile.kt │ ├── gridlisttilebar │ │ ├── GridListTileBarElementBuilder.kt │ │ ├── enums │ │ │ ├── GridListTileBarActionPosition.kt │ │ │ ├── GridListTileBarStyle.kt │ │ │ └── GridListTileBarTitlePosition.kt │ │ └── gridListTileBar.kt │ ├── grow │ │ ├── GrowElementBuilder.kt │ │ └── grow.kt │ ├── hidden │ │ ├── HiddenElementBuilder.kt │ │ ├── enums │ │ │ ├── HiddenImplementation.kt │ │ │ └── HiddenWidth.kt │ │ └── hidden.kt │ ├── icon │ │ ├── IconElementBuilder.kt │ │ ├── enums │ │ │ ├── IconColor.kt │ │ │ ├── IconFontSize.kt │ │ │ └── IconStyle.kt │ │ └── icon.kt │ ├── iconbutton │ │ ├── IconButtonElementBuilder.kt │ │ ├── enums │ │ │ ├── IconButtonEdge.kt │ │ │ └── IconButtonStyle.kt │ │ └── iconButton.kt │ ├── input │ │ ├── InputElementBuilder.kt │ │ ├── enums │ │ │ └── InputStyle.kt │ │ └── input.kt │ ├── inputadornment │ │ ├── InputAdornmentElementBuilder.kt │ │ ├── enums │ │ │ ├── InputAdornmentPosition.kt │ │ │ ├── InputAdornmentStyle.kt │ │ │ └── InputAdornmentVariant.kt │ │ └── inputAdornment.kt │ ├── inputbase │ │ ├── InputBaseElementBuilder.kt │ │ ├── enums │ │ │ ├── InputBaseStyle.kt │ │ │ └── InputMargin.kt │ │ └── inputBase.kt │ ├── inputlabel │ │ ├── InputLabelElementBuilder.kt │ │ ├── enums │ │ │ ├── InputLabelMargin.kt │ │ │ ├── InputLabelStyle.kt │ │ │ └── InputLabelVariant.kt │ │ └── inputLabel.kt │ ├── internal │ │ ├── SwitchBaseElementBuilder.kt │ │ └── SwitchBaseProps.kt │ ├── linearprogress │ │ ├── LinearProgressElementBuilder.kt │ │ ├── enums │ │ │ ├── LinearProgressColor.kt │ │ │ ├── LinearProgressStyle.kt │ │ │ └── LinearProgressVariant.kt │ │ └── linearProgress.kt │ ├── link │ │ ├── LinkElementBuilder.kt │ │ ├── enums │ │ │ ├── LinkStyle.kt │ │ │ └── LinkUnderline.kt │ │ └── link.kt │ ├── list │ │ ├── ListElementBuilder.kt │ │ ├── enums │ │ │ └── ListStyle.kt │ │ └── list.kt │ ├── listitem │ │ ├── ButtonListItemElementBuilder.kt │ │ ├── ListItemElementBuilder.kt │ │ ├── enums │ │ │ ├── ListItemAlignItem.kt │ │ │ └── ListItemStyle.kt │ │ └── listItem.kt │ ├── listitemavatar │ │ ├── ListItemAvatarElementBuilder.kt │ │ ├── enums │ │ │ └── ListItemAvaterStyle.kt │ │ └── listItemAvatar.kt │ ├── listitemicon │ │ ├── ListItemIconElementBuilder.kt │ │ └── listItemIcon.kt │ ├── listitemsecondaryaction │ │ ├── ListItemSecondaryActionElementBuilder.kt │ │ └── listItemSecondaryAction.kt │ ├── listitemtext │ │ ├── ListItemTextElementBuilder.kt │ │ ├── enums │ │ │ └── ListItemTextStyle.kt │ │ └── listItemText.kt │ ├── listsubheader │ │ ├── ListSubheaderElementBuilder.kt │ │ ├── enums │ │ │ ├── ListSubheaderColor.kt │ │ │ └── ListSubheaderStyle.kt │ │ └── listSubheader.kt │ ├── menu │ │ ├── MenuElementBuilder.kt │ │ ├── enums │ │ │ └── MenuStyle.kt │ │ └── menu.kt │ ├── menuitem │ │ ├── MenuItemElementBuilder.kt │ │ ├── enums │ │ │ └── MenuItemStyle.kt │ │ └── menuItem.kt │ ├── menulist │ │ ├── MenuListElementBuilder.kt │ │ └── menuList.kt │ ├── mobilestepper │ │ ├── MobileStepperElementBuilder.kt │ │ ├── enums │ │ │ ├── MobileStepperPosition.kt │ │ │ └── MobileStepperVariant.kt │ │ └── mobileStepper.kt │ ├── modal │ │ ├── ModalElementBuilder.kt │ │ ├── enums │ │ │ └── ModalStyle.kt │ │ └── modal.kt │ ├── nativeselect │ │ ├── NativeSelectElementBuilder.kt │ │ ├── enums │ │ │ ├── NativeSelectStyle.kt │ │ │ └── NativeSelectVariant.kt │ │ └── nativeSelect.kt │ ├── nossr │ │ ├── NoSsrElementBuilder.kt │ │ └── noSsr.kt │ ├── outlinedinput │ │ ├── OutlinedInputElementBuilder.kt │ │ ├── enums │ │ │ └── OutlinedInputStyle.kt │ │ └── outlinedInput.kt │ ├── paper │ │ ├── PaperElementBuilder.kt │ │ ├── enums │ │ │ └── PaperStyle.kt │ │ └── paper.kt │ ├── popover │ │ ├── PopoverElementBuilder.kt │ │ ├── enums │ │ │ ├── PopoverOriginHorizontal.kt │ │ │ ├── PopoverOriginVertical.kt │ │ │ ├── PopoverReference.kt │ │ │ └── PopoverStyle.kt │ │ └── popover.kt │ ├── popper │ │ ├── PopperElementBuilder.kt │ │ ├── enums │ │ │ └── PopperPlacement.kt │ │ └── popper.kt │ ├── portal │ │ ├── PortalElementBuilder.kt │ │ └── portal.kt │ ├── radio │ │ ├── RadioElementBuilder.kt │ │ ├── enums │ │ │ ├── RadioColor.kt │ │ │ └── RadioStyle.kt │ │ └── radio.kt │ ├── radiogroup │ │ ├── RadioGroupElementBuilder.kt │ │ └── radioGroup.kt │ ├── rootref │ │ ├── RootRefElementBuilder.kt │ │ └── rootRef.kt │ ├── select │ │ ├── SelectElementBuilder.kt │ │ ├── enums │ │ │ ├── SelectStyle.kt │ │ │ └── SelectVariant.kt │ │ └── select.kt │ ├── slide │ │ ├── SlideElementBuilder.kt │ │ ├── enums │ │ │ └── SlideDirection.kt │ │ └── slide.kt │ ├── slider │ │ ├── SliderElementBuilder.kt │ │ ├── enums │ │ │ ├── SliderColor.kt │ │ │ ├── SliderOrientation.kt │ │ │ ├── SliderStyle.kt │ │ │ ├── SliderTrack.kt │ │ │ └── SliderValueLabelDisplay.kt │ │ └── slider.kt │ ├── snackbar │ │ ├── SnackbarElementBuilder.kt │ │ ├── enums │ │ │ ├── SnackbarOriginHorizontal.kt │ │ │ ├── SnackbarOriginVertical.kt │ │ │ └── SnackbarStyle.kt │ │ └── snackbar.kt │ ├── snackbarcontent │ │ ├── SnackbarContentElementBuilder.kt │ │ ├── enums │ │ │ └── SnackbarContentStyle.kt │ │ └── snackbarContent.kt │ ├── step │ │ ├── StepElementBuilder.kt │ │ ├── enums │ │ │ ├── StepOrientation.kt │ │ │ └── StepStyle.kt │ │ └── step.kt │ ├── stepbutton │ │ ├── StepButtonElementBuilder.kt │ │ ├── enums │ │ │ └── StepButtonStyle.kt │ │ └── stepButton.kt │ ├── stepconnector │ │ ├── StepConnectorElementBuilder.kt │ │ ├── enums │ │ │ └── StepConnectorStyle.kt │ │ └── stepConnector.kt │ ├── stepcontent │ │ ├── StepContentElementBuilder.kt │ │ ├── enums │ │ │ └── StepContentStyle.kt │ │ └── stepContent.kt │ ├── stepicon │ │ ├── StepIconElementBuilder.kt │ │ ├── enums │ │ │ └── StepIconStyle.kt │ │ └── stepIcon.kt │ ├── steplabel │ │ ├── StepLabelElementBuilder.kt │ │ ├── enums │ │ │ └── StepLabelStyle.kt │ │ └── stepLabel.kt │ ├── stepper │ │ ├── StepperElementBuilder.kt │ │ ├── enums │ │ │ └── StepperStyle.kt │ │ └── stepper.kt │ ├── svgicon │ │ ├── SvgIconElementBuilder.kt │ │ ├── enums │ │ │ ├── SvgIconColor.kt │ │ │ ├── SvgIconFontSize.kt │ │ │ └── SvgIconStyle.kt │ │ └── svgIcon.kt │ ├── swipeabledrawer │ │ ├── SwipeableDrawerElementBuilder.kt │ │ └── swipeableDrawer.kt │ ├── switches │ │ ├── SwitchElementBuilder.kt │ │ ├── enums │ │ │ ├── SwitchColor.kt │ │ │ └── SwitchStyle.kt │ │ └── switch.kt │ ├── tab │ │ ├── TabElementBuilder.kt │ │ ├── enums │ │ │ ├── TabStyle.kt │ │ │ └── TabTextColor.kt │ │ └── tab.kt │ ├── table │ │ ├── TableElementBuilder.kt │ │ ├── enums │ │ │ └── TablePadding.kt │ │ └── table.kt │ ├── tablebody │ │ ├── TableBodyElementBuilder.kt │ │ └── tableBody.kt │ ├── tablecell │ │ ├── TableCellElementBuilder.kt │ │ ├── enums │ │ │ ├── TableCellAlign.kt │ │ │ ├── TableCellPadding.kt │ │ │ ├── TableCellSize.kt │ │ │ ├── TableCellSortDirection.kt │ │ │ ├── TableCellStyle.kt │ │ │ └── TableCellVariant.kt │ │ └── tableCell.kt │ ├── tablefooter │ │ ├── TableFooterElementBuilder.kt │ │ └── tableFooter.kt │ ├── tablehead │ │ ├── TableHeadElementBuilder.kt │ │ └── tableHead.kt │ ├── tablepagination │ │ ├── TablePaginationElementBuilder.kt │ │ ├── enums │ │ │ └── TablePaginationStyle.kt │ │ └── tablePagination.kt │ ├── tablerow │ │ ├── TableRowElementBuilder.kt │ │ ├── enums │ │ │ └── TableRowStyle.kt │ │ └── tableRow.kt │ ├── tablesortlabel │ │ ├── TableSortLabelElementBuilder.kt │ │ ├── enums │ │ │ └── TableSortLabelDirection.kt │ │ └── tableSortLabel.kt │ ├── tabs │ │ ├── TabIndicatorElementBuilder.kt │ │ ├── TabsElementBuilder.kt │ │ ├── enums │ │ │ ├── TabsIndicatorColor.kt │ │ │ ├── TabsScrollButtons.kt │ │ │ ├── TabsStyle.kt │ │ │ ├── TabsTextColor.kt │ │ │ └── TabsVariant.kt │ │ ├── tabIndicator.kt │ │ └── tabs.kt │ ├── textfield │ │ ├── TextFieldElementBuilder.kt │ │ ├── enums │ │ │ └── TextFieldSize.kt │ │ └── textField.kt │ ├── toolbar │ │ ├── ToolbarElementBuilder.kt │ │ ├── enums │ │ │ ├── ToolbarStyle.kt │ │ │ └── ToolbarVariant.kt │ │ └── toolbar.kt │ ├── tooltip │ │ ├── TooltipElementBuilder.kt │ │ ├── enums │ │ │ ├── TooltipPlacement.kt │ │ │ └── TooltipStyle.kt │ │ └── tooltip.kt │ ├── typography │ │ ├── TypographyElementBuilder.kt │ │ ├── enums │ │ │ ├── TypographyAlign.kt │ │ │ ├── TypographyColor.kt │ │ │ ├── TypographyDisplay.kt │ │ │ ├── TypographyStyle.kt │ │ │ └── TypographyVariant.kt │ │ └── typography.kt │ └── zoom │ │ ├── ZoomElementBuilder.kt │ │ └── zoom.kt │ ├── imports.kt │ ├── reacteventlistener │ └── REventListenerBuilder.kt │ ├── reacttransiton │ ├── RTransitionBuilder.kt │ ├── RTransitionGroupBuilder.kt │ ├── RTransitionGroupProps.kt │ └── RTransitionProps.kt │ ├── styles │ ├── CssPropertiesDelegate.kt │ ├── JssPreset.kt │ ├── StylesBuilder.kt │ ├── breakpoint │ │ ├── Breakpoint.kt │ │ ├── BreakpointValues.kt │ │ ├── Breakpoints.kt │ │ ├── BreakpointsDelegate.kt │ │ └── options │ │ │ ├── BreakpointValuesOptions.kt │ │ │ └── BreakpointsOptions.kt │ ├── createBreakpoints.kt │ ├── createGenerateClassName.kt │ ├── createMuiTheme.kt │ ├── createPalette.kt │ ├── createTypography.kt │ ├── makeStyles.kt │ ├── mixins │ │ ├── Mixins.kt │ │ ├── MixinsDelegate.kt │ │ └── options │ │ │ └── MixinsOptions.kt │ ├── muitheme │ │ ├── MuiTheme.kt │ │ └── options │ │ │ └── MuiThemeOptions.kt │ ├── palette │ │ ├── CommonColors.kt │ │ ├── GreyColors.kt │ │ ├── GreyType.kt │ │ ├── Palette.kt │ │ ├── PaletteColor.kt │ │ ├── PaletteType.kt │ │ ├── TypeAction.kt │ │ ├── TypeBackground.kt │ │ ├── TypeText.kt │ │ └── options │ │ │ ├── CommonColorsOptions.kt │ │ │ ├── GreyColorsOptions.kt │ │ │ ├── PaletteColorOptions.kt │ │ │ ├── PaletteOptions.kt │ │ │ ├── TypeActionOptions.kt │ │ │ ├── TypeBackgroundOptions.kt │ │ │ └── TypeTextOptions.kt │ ├── shadow │ │ └── ShadowDelegate.kt │ ├── shape │ │ ├── Shape.kt │ │ └── options │ │ │ └── ShapeOptions.kt │ ├── stylesprovider │ │ ├── StyleProviderBuilder.kt │ │ └── StylesProvider.kt │ ├── themeprovider │ │ ├── ThemeProviderBuilder.kt │ │ └── themeProvider.kt │ ├── transitions │ │ ├── Duration.kt │ │ ├── Easing.kt │ │ ├── Transitions.kt │ │ ├── TransitionsDelegate.kt │ │ └── options │ │ │ ├── DurationOptions.kt │ │ │ ├── EasingOptions.kt │ │ │ └── TransitionsOptions.kt │ ├── typography │ │ ├── FontStyle.kt │ │ ├── Typography.kt │ │ ├── TypographyStyle.kt │ │ └── options │ │ │ ├── FontStyleOptions.kt │ │ │ ├── TypographyOptions.kt │ │ │ └── TypographyStyleOptions.kt │ ├── withStyles.kt │ └── zindex │ │ ├── ZIndex.kt │ │ └── options │ │ └── ZIndexOptions.kt │ └── useMediaQuery.kt ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lab ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── materialui │ └── lab │ └── components │ ├── alert │ ├── AlertElementBuilder.kt │ ├── alert.kt │ └── enums │ │ ├── AlertColor.kt │ │ ├── AlertSeverity.kt │ │ ├── AlertStyle.kt │ │ └── AlertVariant.kt │ ├── alerttitle │ └── alertTitle.kt │ ├── autocomplete │ ├── AutocompleteElementBuilder.kt │ ├── autoComplete.kt │ └── enums │ │ ├── AutocompleteForcePopupIcon.kt │ │ └── AutocompleteStyle.kt │ ├── skeleton │ ├── SkeletonElementBuilder.kt │ ├── enums │ │ ├── SkeletonAnimation.kt │ │ ├── SkeletonStyle.kt │ │ └── SkeletonVariant.kt │ └── skeleton.kt │ ├── timeline │ ├── TimelineElementBuilder.kt │ ├── enums │ │ ├── TimelineAlign.kt │ │ └── TimelineStyle.kt │ └── timeLine.kt │ ├── timelineconnector │ ├── TimelineConnectorElementBuilder.kt │ ├── enums │ │ └── TimelineConnectorStyle.kt │ └── timelineConnector.kt │ ├── timelinecontent │ ├── TimelineContentElementBuilder.kt │ ├── enums │ │ └── TimelineContentStyle.kt │ └── timelineConnector.kt │ ├── timelinedot │ ├── TimelineDot.kt │ ├── TimelineDotElementBuilder.kt │ └── enums │ │ ├── TimelineDotColor.kt │ │ ├── TimelineDotStyle.kt │ │ └── TimelineDotVariant.kt │ ├── timelineitem │ ├── TimelineItem.kt │ ├── TimelineItemElementBuilder.kt │ └── enums │ │ └── TimelineItemStyle.kt │ ├── timelineoppositecontent │ ├── TimelineOppositeContent.kt │ ├── TimelineOppositeContentElementBuilder.kt │ └── enums │ │ └── TimelineOppositeContentStyle.kt │ ├── timelineseparator │ ├── TimelineSeparator.kt │ ├── TimelineSeparatorElementBuilder.kt │ └── enums │ │ └── TimelineSeparatorStyle.kt │ ├── togglebutton │ ├── ToggleButtonElementBuilder.kt │ ├── enums │ │ └── ToggleButtonStyle.kt │ └── toggleButton.kt │ ├── togglebuttongroup │ ├── ToggleButtonGroupElementBuilder.kt │ ├── enums │ │ ├── ToggleButtonGroupOrientation.kt │ │ ├── ToggleButtonGroupSize.kt │ │ └── ToggleButtonGroupStyle.kt │ └── toggleButtonGroup.kt │ ├── treeItem │ ├── TreeItemElementBuilder.kt │ ├── enums │ │ └── TreeItemStyle.kt │ └── treeItem.kt │ ├── treeView │ ├── TreeViewElementBuilder.kt │ ├── enums │ │ └── TreeViewStyle.kt │ └── treeView.kt │ └── useautocomplete │ ├── enums │ └── AutocompleteBlurOnSelect.kt │ ├── import.kt │ └── useAutocomplete.kt ├── pickers ├── build.gradle.kts ├── date-io │ ├── build.gradle.kts │ ├── date-fns │ │ ├── build.gradle.kts │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── datefns │ │ │ ├── DateFnsUtils.kt │ │ │ ├── DateFnsUtilsOption.kt │ │ │ ├── formats │ │ │ └── DateFnsDateIOFormats.kt │ │ │ └── locale │ │ │ ├── Locale.kt │ │ │ └── index.kt │ ├── dayjs │ │ └── build.gradle.kts │ ├── luxon │ │ └── build.gradle.kts │ ├── moment │ │ └── build.gradle.kts │ └── src │ │ └── main │ │ └── kotlin │ │ └── dateio │ │ └── core │ │ ├── DateAdapterProvider.kt │ │ ├── DateIOFormats.kt │ │ └── IUtils.kt └── src │ └── main │ └── kotlin │ └── materialui │ └── pickers │ └── components │ ├── BasePickerElementBuilder.kt │ ├── BasePickerProps.kt │ ├── DateInputProps.kt │ ├── DateValidationProps.kt │ ├── ExportedProps.kt │ ├── TimeValidationProps.kt │ ├── ToolbarComponentProps.kt │ ├── calendar │ ├── ArrowSwitcherElement.kt │ ├── CalendarElement.kt │ ├── CalendarElementBuilder.kt │ └── calendar.kt │ ├── clockview │ ├── ClockViewElementBuilder.kt │ └── clockView.kt │ ├── datepicker │ ├── DatePickerElement.kt │ ├── DatePickerElementBuilders.kt │ ├── datePicker.kt │ └── enums │ │ └── DatePickerView.kt │ ├── daterangepicker │ ├── DateRangePickerElementBuilders.kt │ ├── DateRangePickerElements.kt │ ├── dateRangeDelimiter.kt │ └── dateRangePicker.kt │ ├── datetimepicker │ ├── DateTimePickerElement.kt │ ├── DateTimePickerElementBuilders.kt │ ├── dateTimePicker.kt │ └── enums │ │ └── DateTimePickerView.kt │ ├── day │ ├── DayElementBuilder.kt │ └── day.kt │ ├── enums │ └── PickerOrientation.kt │ ├── internal │ ├── desktop │ │ ├── DesktopElement.kt │ │ ├── DesktopWrapperElementBuilder.kt │ │ └── DesktopWrapperProps.kt │ ├── desktoppopper │ │ ├── DesktopPopperElement.kt │ │ ├── DesktopPopperElementBuilder.kt │ │ └── DesktopPopperWrapperProps.kt │ ├── modal │ │ ├── ModalElement.kt │ │ ├── ModalWrapperElementBuilder.kt │ │ └── ModalWrapperProps.kt │ ├── responsive │ │ ├── ResponsiveWrapperElementBuilder.kt │ │ └── ResponsiveWrapperProps.kt │ └── static │ │ ├── DisplayStaticWrapperAs.kt │ │ ├── StaticElement.kt │ │ ├── StaticWrapperElementBuilder.kt │ │ └── StaticWrapperProps.kt │ ├── provider │ ├── LocalizationProvider.kt │ └── LocalizationProviderBuilder.kt │ └── timepicker │ ├── TimePickerElement.kt │ ├── TimePickerElementBuilders.kt │ ├── TimeValidationElement.kt │ ├── enum │ └── TimePickerView.kt │ └── timePicker.kt ├── sample ├── .gitignore ├── build.gradle.kts ├── src │ └── main │ │ ├── kotlin │ │ └── demo │ │ │ ├── App.kt │ │ │ ├── components │ │ │ ├── AppbarsDemo.kt │ │ │ ├── ButtonsDemo.kt │ │ │ ├── InputAdornmentsDemo.kt │ │ │ ├── appsearch │ │ │ │ ├── AppSearch.kt │ │ │ │ ├── AppSearchComponent.kt │ │ │ │ └── AppSearchProps.kt │ │ │ └── header │ │ │ │ ├── Header.kt │ │ │ │ └── HeaderProps.kt │ │ │ └── main.kt │ │ └── resources │ │ └── index.html └── webpack.config.d │ └── devServer.js └── settings.gradle.kts /.idea/codeStyles/Project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/kotlinScripting.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /buildSrc/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import java.util.* 2 | 3 | plugins { 4 | `kotlin-dsl` 5 | } 6 | 7 | repositories { 8 | gradlePluginPortal() 9 | } 10 | 11 | val props = Properties().apply { 12 | file("../gradle.properties").inputStream().use(this::load) 13 | } 14 | 15 | fun version(target: String) = props.getProperty("${target}.version") 16 | 17 | dependencies { 18 | implementation(kotlin("gradle-plugin", version("kotlin"))) 19 | } 20 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/Kotlin.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("HardcodedStringLiteral") 2 | 3 | import org.gradle.api.Project 4 | 5 | val Project.kotlinVersion get() = version("kotlin") 6 | val Project.kotlinStdlibJs get() = "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion" 7 | val Project.kotlinTestJs get() = "org.jetbrains.kotlin:kotlin-test-js:$kotlinVersion" -------------------------------------------------------------------------------- /buildSrc/src/main/java/Packages.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("HardcodedStringLiteral") 2 | 3 | import org.gradle.api.Project 4 | 5 | val Project.groupId get() = packages("group") 6 | val Project.libraryVersion get() = packages("version") 7 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/Projects.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("HardcodedStringLiteral") 2 | 3 | import org.gradle.api.Project 4 | 5 | fun Project.version(target: String) = prop("$target.version") 6 | fun Project.packages(property: String) = prop("packages.$property") 7 | -------------------------------------------------------------------------------- /buildSrc/src/main/java/Properties.kt: -------------------------------------------------------------------------------- 1 | import org.gradle.api.Project 2 | import org.gradle.api.Task 3 | 4 | internal fun Project.prop(propertyName: String) = property(propertyName) as String 5 | internal fun Task.prop(propertyName: String) = project.prop(propertyName) 6 | -------------------------------------------------------------------------------- /core/.gitignore: -------------------------------------------------------------------------------- 1 | build/ -------------------------------------------------------------------------------- /core/build.gradle.kts: -------------------------------------------------------------------------------- 1 | group = groupId 2 | version = libraryVersion 3 | 4 | plugins { 5 | kotlin("js") 6 | id("maven-publishing") 7 | } 8 | 9 | dependencies { 10 | val wrappers = Libraries.JsWrappers(kotlinVersion) 11 | api(wrappers.html) 12 | api(wrappers.react) 13 | api(wrappers.reactDom) 14 | api(wrappers.css) 15 | api(wrappers.extensions) 16 | 17 | api(npm("@material-ui/core", Libraries.Npm.MaterialUi.core)) 18 | 19 | testImplementation(kotlinTestJs) 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/aliases.kt: -------------------------------------------------------------------------------- 1 | package materialui 2 | 3 | import react.ComponentClass 4 | import react.PropsWithChildren 5 | 6 | internal typealias MakeStyles = (PropsWithChildren) -> dynamic 7 | internal typealias WithStyles = (Any) -> ComponentClass 8 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/MaterialElementStyles.kt: -------------------------------------------------------------------------------- 1 | package materialui.components 2 | 3 | import kotlinx.css.CssBuilder 4 | 5 | typealias MaterialElementStyles = Map 6 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/MaterialStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components 2 | 3 | @Suppress("EnumEntryName") 4 | internal enum class MaterialStyle { 5 | root 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/appbar/appBar.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.appbar 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import kotlinx.html.TagConsumer 6 | import materialui.AppBar 7 | import materialui.components.appbar.enums.AppBarStyle 8 | import materialui.components.paper.PaperProps 9 | import react.RBuilder 10 | 11 | external interface AppBarProps : PaperProps { 12 | var color: String? 13 | var position: String? 14 | } 15 | 16 | fun RBuilder.appBar(vararg classMap: Pair, block: AppBarElementBuilder
.() -> Unit) { 17 | child(AppBarElementBuilder(AppBar, classMap.toList()) { DIV(mapOf(), it) }.apply(block).create()) 18 | } 19 | fun RBuilder.appBar(vararg classMap: Pair, factory: (TagConsumer) -> T, block: AppBarElementBuilder.() -> Unit) { 20 | child(AppBarElementBuilder(AppBar, classMap.toList(), factory).apply(block).create()) 21 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/appbar/enums/AppBarColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.appbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class AppBarColor { 5 | inherit, primary, secondary, default 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/appbar/enums/AppBarPosition.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.appbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class AppBarPosition { 5 | fixed, absolute, sticky, static, relative 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/appbar/enums/AppBarStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.appbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class AppBarStyle { 5 | root, 6 | positionFixed, 7 | positionAbsolute, 8 | positionSticky, 9 | positionStatic, 10 | positionRelative, 11 | colorDefault, 12 | colorPrimary, 13 | colorSecondary 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/avatar/enum/AvatarStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.avatar.enum 2 | 3 | @Suppress("EnumEntryName") 4 | enum class AvatarStyle { 5 | root, 6 | colorDefault, 7 | img 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/backdrop/backdrop.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.backdrop 2 | 3 | import materialui.Backdrop 4 | import materialui.components.backdrop.enum.BackdropStyle 5 | import materialui.components.fade.FadeProps 6 | import react.RBuilder 7 | 8 | external interface BackdropProps : FadeProps { 9 | var classes: Any? 10 | var invisible: Boolean? 11 | var open: Boolean? 12 | var transitionDuration: dynamic 13 | } 14 | 15 | fun RBuilder.backdrop(vararg classMap: Pair, block: BackdropElementBuilder.() -> Unit) { 16 | child(backdropElement(classMap.toList(), block)) 17 | } 18 | internal fun backdropElement( 19 | classMap: List> = listOf(), 20 | block: BackdropElementBuilder.() -> Unit, 21 | ) = BackdropElementBuilder(Backdrop, classMap.toList()).apply(block).create() 22 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/backdrop/enum/BackdropStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.backdrop.enum 2 | 3 | @Suppress("EnumEntryName") 4 | enum class BackdropStyle { 5 | root, 6 | invisible 7 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/badge/enums/BadgeColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.badge.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class BadgeColor { 5 | default, primary, secondary, error 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/badge/enums/BadgeStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.badge.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class BadgeStyle { 5 | root, 6 | badge, 7 | colorPrimary, 8 | colorSecondary, 9 | colorError, 10 | invisible, 11 | dot 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/badge/enums/BadgeVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.badge.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class BadgeVariant { 5 | standard, dot 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/bottomnavigation/BottomNavigationElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.bottomnavigation 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.getValue 7 | import materialui.components.setValue 8 | import react.ComponentType 9 | 10 | class BottomNavigationElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>>, 13 | factory: (TagConsumer) -> T 14 | ) : MaterialElementBuilder(type, classMap, factory) { 15 | var Tag.showLabels: Boolean? by materialProps 16 | var Tag.value: Any? by materialProps 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/breadcrumbs/enums/BreadcrumbsStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.breadcrumbs.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class BreadcrumbsStyle { 5 | root, 6 | ol, 7 | li, 8 | separator 9 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/button/enums/ButtonColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.button.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonColor { 5 | default, inherit, primary, secondary 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/button/enums/ButtonSize.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.button.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonSize { 5 | small, medium, large 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/button/enums/ButtonStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.button.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonStyle { 5 | root, 6 | label, 7 | text, 8 | textPrimary, 9 | textSecondary, 10 | outlined, 11 | outlinedPrimary, 12 | outlinedSecondary, 13 | contained, 14 | containedPrimary, 15 | containedSecondary, 16 | disableElevation, 17 | focusVisible, 18 | disabled, 19 | colorInherit, 20 | textSizeSmall, 21 | textSizeLarge, 22 | outlinedSizeSmall, 23 | outlinedSizeLarge, 24 | containedSizeSmall, 25 | containedSizeLarge, 26 | sizeSmall, 27 | sizeLarge, 28 | fullWidth, 29 | startIcon, 30 | endIcon, 31 | iconSizeSmall, 32 | iconSizeMedium, 33 | iconSizeLarge 34 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/button/enums/ButtonVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.button.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonVariant { 5 | text, outlined, contained 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/buttonbase/TouchRippleElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.buttonbase 2 | 3 | import kotlinx.html.SPAN 4 | import kotlinx.html.Tag 5 | import materialui.components.buttonbase.enums.TouchRippleStyle 6 | import materialui.reacttransiton.RTransitionGroupBuilder 7 | import materialui.reacttransiton.getValue 8 | import materialui.reacttransiton.setValue 9 | import react.ComponentType 10 | 11 | class TouchRippleElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List> 14 | ) : RTransitionGroupBuilder(type, classMap, { SPAN(mapOf(), it) }) { 15 | fun Tag.classes(vararg classMap: Pair) { 16 | classes(classMap.map { it.first to it.second }) 17 | } 18 | 19 | var Tag.center: Boolean? by groupProps 20 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/buttonbase/enums/ButtonBaseStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.buttonbase.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonBaseStyle { 5 | root, 6 | disabled, 7 | focusVisible 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/buttonbase/enums/ButtonStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.buttonbase.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonStyle { 5 | root, button, submit, reset 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/buttonbase/enums/TouchRippleStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.buttonbase.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TouchRippleStyle { 5 | root, 6 | ripple, rippleVisible, ripplePulsate, 7 | child, childLeaving, childPulsate 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/buttonbase/touchRipple.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.buttonbase 2 | 3 | import materialui.TouchRipple 4 | import materialui.components.StandardProps 5 | import materialui.components.buttonbase.enums.TouchRippleStyle 6 | import materialui.reacttransiton.RTransitionGroupProps 7 | import react.RBuilder 8 | 9 | external interface TouchRippleProps : RTransitionGroupProps, StandardProps { 10 | var center: Boolean? 11 | } 12 | 13 | fun RBuilder.touchRipple(vararg classMap: Pair, block: TouchRippleElementBuilder.() -> Unit) { 14 | child(TouchRippleElementBuilder(TouchRipple, classMap.toList()).apply(block).create()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/buttongroup/enums/ButtonGroupOrientation.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.buttongroup.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonGroupOrientation { 5 | vertical, horizontal 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/buttongroup/enums/ButtonGroupStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.buttongroup.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ButtonGroupStyle { 5 | root, 6 | contained, 7 | disabled, 8 | fullWidth, 9 | vertical, 10 | grouped, 11 | groupedHorizontal, 12 | groupedVertical, 13 | groupedText, 14 | groupedTextHorizontal, 15 | groupedTextVertical, 16 | groupedTextPrimary, 17 | groupedTextSecondary, 18 | groupedOutlined, 19 | groupedOutlinedHorizontal, 20 | groupedOutlinedVertical, 21 | groupedOutlinedPrimary, 22 | groupedOutlinedSecondary, 23 | groupedContained, 24 | groupedContainedHorizontal, 25 | groupedContainedVertical, 26 | groupedContainedPrimary, 27 | groupedContainedSecondary 28 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/card/CardElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.card 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.getValue 6 | import materialui.components.paper.PaperElementBuilder 7 | import materialui.components.setValue 8 | import react.ComponentType 9 | 10 | class CardElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>>, 13 | factory: (TagConsumer) -> T 14 | ) : PaperElementBuilder(type, classMap, factory) { 15 | var Tag.raised: Boolean? by materialProps 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/card/card.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.card 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import kotlinx.html.TagConsumer 6 | import materialui.Card 7 | import materialui.components.paper.PaperProps 8 | import materialui.components.paper.enums.PaperStyle 9 | import react.RBuilder 10 | 11 | external interface CardProps : PaperProps { 12 | var raised: Boolean? 13 | } 14 | 15 | fun RBuilder.card(vararg classMap: Pair, block: CardElementBuilder
.() -> Unit) { 16 | child(CardElementBuilder(Card, classMap.toList()) { DIV(mapOf(), it) }.apply(block).create()) 17 | } 18 | fun RBuilder.card(vararg classMap: Pair, factory: (TagConsumer) -> T, block: CardElementBuilder.() -> Unit) { 19 | child(CardElementBuilder(Card, classMap.toList(), factory).apply(block).create()) 20 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardactionarea/CardActionAreaElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardactionarea 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.buttonbase.ButtonBaseElementBuilder 6 | import react.ComponentType 7 | 8 | class CardActionAreaElementBuilder internal constructor( 9 | type: ComponentType, 10 | classMap: List, String>>, 11 | factory: (TagConsumer) -> T 12 | ) : ButtonBaseElementBuilder(type, classMap, factory) -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardactions/CardActionsElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardactions 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.cardactions.enums.CardActionsStyle 7 | import materialui.components.getValue 8 | import materialui.components.setValue 9 | import react.ComponentType 10 | 11 | class CardActionsElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List, String>> 14 | ) : MaterialElementBuilder(type, classMap.toList(), { DIV(mapOf(), it) }) { 15 | fun Tag.classes(vararg classMap: Pair) { 16 | classes(classMap.map { it.first to it.second }) 17 | } 18 | 19 | var Tag.disableSpacing: Boolean? by materialProps 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardactions/cardActions.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardactions 2 | 3 | import materialui.CardActions 4 | import materialui.components.StandardProps 5 | import materialui.components.cardactions.enums.CardActionsStyle 6 | import react.* 7 | 8 | external interface CardActionsProps : StandardProps { 9 | var disableSpacing: Boolean? 10 | } 11 | 12 | fun RBuilder.cardActions(vararg classMap: Pair, block: CardActionsElementBuilder.() -> Unit) { 13 | child(CardActionsElementBuilder(CardActions, classMap.toList()).apply(block).create()) 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardactions/enums/CardActionsStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardactions.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CardActionsStyle { 5 | root, spacing 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardcontent/CardContentElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardcontent 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import react.ComponentType 7 | 8 | class CardContentElementBuilder internal constructor( 9 | type: ComponentType, 10 | classMap: List, String>>, 11 | factory: (TagConsumer) -> T 12 | ) : MaterialElementBuilder(type, classMap, factory) -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardheader/enums/CardHeaderStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardheader.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CardHeaderStyle { 5 | root, avatar, action, content, title, subheader 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardmedia/CardMediaElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardmedia 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.cardmedia.enums.CardMediaStyle 7 | import materialui.components.getValue 8 | import materialui.components.setValue 9 | import react.ComponentType 10 | 11 | class CardMediaElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List, String>>, 14 | factory: (TagConsumer) -> T 15 | ) : MaterialElementBuilder(type, classMap, factory) { 16 | fun Tag.classes(vararg classMap: Pair) { 17 | classes(classMap.toList()) 18 | } 19 | 20 | var Tag.image: String? by materialProps 21 | var Tag.src: String? by materialProps 22 | var Tag.style: Any? by materialProps 23 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cardmedia/enums/CardMediaStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cardmedia.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CardMediaStyle { 5 | root, media 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/checkbox/checkbox.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.checkbox 2 | 3 | import materialui.Checkbox 4 | import materialui.components.checkbox.enums.CheckboxStyle 5 | import materialui.components.internal.SwitchBaseProps 6 | import react.* 7 | 8 | external interface CheckboxProps : SwitchBaseProps { 9 | var color: String? 10 | var indeterminate: Boolean? 11 | var indeterminateIcon: ReactElement? 12 | } 13 | 14 | fun RBuilder.checkbox(vararg classMap: Pair, block: CheckboxElementBuilder.() -> Unit) { 15 | child(CheckboxElementBuilder(Checkbox, classMap.toList()).apply(block).create()) 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/checkbox/enums/CheckboxColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.checkbox.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CheckboxColor { 5 | primary, secondary, default 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/checkbox/enums/CheckboxStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.checkbox.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CheckboxStyle { 5 | root, 6 | checked, 7 | disabled, 8 | indeterminate, 9 | colorPrimary, 10 | colorSecondary 11 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/chip/enums/ChipColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.chip.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ChipColor { 5 | default, primary, secondary 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/chip/enums/ChipStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.chip.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ChipStyle { 5 | root, 6 | colorPrimary, 7 | colorSecondary, 8 | clickable, 9 | clickableColorPrimary, 10 | clickableColorSecondary, 11 | deletable, 12 | deletableColorPrimary, 13 | deletableColorSecondary, 14 | outlined, 15 | outlinedPrimary, 16 | outlinedSecondary, 17 | avatar, 18 | avatarColorPrimary, 19 | avatarColorSecondary, 20 | avatarChildren, 21 | icon, 22 | iconColorPrimary, 23 | iconColorSecondary, 24 | label, 25 | deleteIcon, 26 | deleteIconColorPrimary, 27 | deleteIconColorSecondary, 28 | deleteIconOutlinedColorPrimary, 29 | deleteIconOutlinedColorSecondary 30 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/chip/enums/ChipVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.chip.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ChipVariant { 5 | default, outlined 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/circularprogress/circularprogress.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.circularprogress 2 | 3 | import materialui.CircularProgress 4 | import materialui.components.StandardProps 5 | import materialui.components.circularprogress.enums.CircularProgressStyle 6 | import react.RBuilder 7 | 8 | external interface CircularProgressProps : StandardProps { 9 | var color: String? 10 | var disableShrink: Boolean? 11 | var size: dynamic 12 | var style: Any? 13 | var thickness: Number? 14 | var value: Number? 15 | var variant: String? 16 | } 17 | 18 | fun RBuilder.circularProgress(vararg classMap: Pair, block: CircularProgressElementBuilder.() -> Unit) { 19 | child(CircularProgressElementBuilder(CircularProgress, classMap.toList()).apply(block).create()) 20 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/circularprogress/enums/CircularProgressColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.circularprogress.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CircularProgressColor { 5 | primary, secondary, inherit 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/circularprogress/enums/CircularProgressStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.circularprogress.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CircularProgressStyle { 5 | root, 6 | static, 7 | indeterminate, 8 | colorPrimary, 9 | colorSecondary, 10 | svg, 11 | circle, 12 | circleStatic, 13 | circleIndeterminate, 14 | circleDisableShrink, 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/circularprogress/enums/CircularProgressVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.circularprogress.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CircularProgressVariant { 5 | determinate, indeterminate, static 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/clickawaylistener/clickAwayListener.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.clickawaylistener 2 | 3 | import materialui.ClickAwayListener 4 | import org.w3c.dom.events.Event 5 | import react.RBuilder 6 | import react.PropsWithChildren 7 | 8 | external interface ClickAwayListenerProps : PropsWithChildren { 9 | var mouseEvent: dynamic 10 | var onClickAway: ((Event) -> Unit)? 11 | var touchEvent: dynamic 12 | } 13 | 14 | fun RBuilder.clickAwayListener(block: ClickAwayListenerBuilder.() -> Unit) { 15 | child(clickAwayListenerElement(block)) 16 | } 17 | internal fun clickAwayListenerElement( 18 | block: ClickAwayListenerBuilder.() -> Unit 19 | ) = ClickAwayListenerBuilder(ClickAwayListener).apply(block).create() 20 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/clickawaylistener/enums/ClickAwayMouseEvent.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.clickawaylistener.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ClickAwayMouseEvent { 5 | onClick, onMouseDown, onMouseUp 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/clickawaylistener/enums/ClickAwayTouchEvent.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.clickawaylistener.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ClickAwayTouchEvent { 5 | onTouchStart, onTouchEnd 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/collapse/enums/CollapseStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.collapse.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class CollapseStyle { 5 | container, entered, wrapper, wrapperInner 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/container/enums/ContainerMaxWidth.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.container.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ContainerMaxWidth { 5 | xs, sm, md, lg, xl, `false`; 6 | 7 | companion object { 8 | internal fun fromDynamic(jsObject: dynamic): Any = when (jsObject) { 9 | false -> `false` 10 | else -> valueOf(jsObject as String) 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/container/enums/ContainerStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.container.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ContainerStyle { 5 | root, 6 | disableGutters, 7 | fixed, 8 | maxWidthXs, 9 | maxWidthSm, 10 | maxWidthMd, 11 | maxWidthLg, 12 | maxWidthXl 13 | } 14 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/cssbaseline/cssBaseline.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.cssbaseline 2 | 3 | import kotlinext.js.jsObject 4 | import materialui.CssBaseline 5 | import react.RBuilder 6 | import react.PropsWithChildren 7 | import react.createElement 8 | 9 | external interface CssBaselineProps : PropsWithChildren 10 | 11 | fun RBuilder.cssBaseline(block: RBuilder.() -> Unit) { 12 | child(createElement(CssBaseline, jsObject { }, *RBuilder().apply(block).childList.toTypedArray())) 13 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialog/dialog.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialog 2 | 3 | import materialui.Dialog 4 | import materialui.components.dialog.enums.DialogStyle 5 | import materialui.components.modal.ModalProps 6 | import react.RBuilder 7 | import react.PropsWithChildren 8 | 9 | external interface DialogProps : ModalProps { 10 | var fullScreen: Boolean? 11 | var fullWidth: Boolean? 12 | var maxWidth: String? 13 | var PaperComponent: dynamic 14 | var PaperProps: PropsWithChildren? 15 | var scroll: String? 16 | var TransitionComponent: dynamic 17 | var transitionDuration: dynamic 18 | var TransitionProps: PropsWithChildren? 19 | } 20 | 21 | fun RBuilder.dialog(vararg classMap: Pair, block: DialogElementBuilder.() -> Unit) { 22 | child(DialogElementBuilder(Dialog, classMap.toList()).apply(block).create()) 23 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialog/enums/DialogMaxWidth.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialog.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DialogMaxWidth { 5 | xs, sm, md, lg, xl, `false`; 6 | 7 | companion object { 8 | internal fun fromDynamic(jsObject: dynamic): Any = when (jsObject) { 9 | false -> DialogMaxWidth.`false` 10 | else -> DialogMaxWidth.valueOf(jsObject as String) 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialog/enums/DialogScroll.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialog.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DialogScroll { 5 | body, paper 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialog/enums/DialogStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialog.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DialogStyle { 5 | root, 6 | scrollPaper, 7 | scrollBody, 8 | container, 9 | paper, 10 | paperScrollPaper, 11 | paperScrollBody, 12 | paperWidthXs, 13 | paperWidthSm, 14 | paperWidthMd, 15 | paperWidthLg, 16 | paperWidthXl, 17 | paperFullWidth, 18 | paperFullScreen 19 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogactions/DialogActionsElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogactions 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.dialogactions.enums.DialogActionsStyle 7 | import materialui.components.getValue 8 | import materialui.components.setValue 9 | import react.ComponentType 10 | 11 | class DialogActionsElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List, String>> 14 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) { 15 | fun Tag.classes(vararg classMap: Pair) { 16 | classes(classMap.toList()) 17 | } 18 | 19 | var Tag.disableSpacing: Boolean? by materialProps 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogactions/dialogActions.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogactions 2 | 3 | import materialui.DialogActions 4 | import materialui.components.StandardProps 5 | import materialui.components.dialogactions.enums.DialogActionsStyle 6 | import react.RBuilder 7 | 8 | external interface DialogActionsProps : StandardProps { 9 | var disableSpacing: Boolean? 10 | } 11 | 12 | fun RBuilder.dialogActions(vararg classMap: Pair, block: DialogActionsElementBuilder.() -> Unit) { 13 | child(DialogActionsElementBuilder(DialogActions, classMap.toList()).apply(block).create()) 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogactions/enums/DialogActionsStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogactions.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DialogActionsStyle { 5 | root, spacing 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogcontent/DialogContentElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogcontent 2 | 3 | import kotlinx.html.DIV 4 | import materialui.components.MaterialElementBuilder 5 | import react.ComponentType 6 | 7 | class DialogContentElementBuilder internal constructor( 8 | type: ComponentType, 9 | classMap: List, String>> 10 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogcontent/dialogContent.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogcontent 2 | 3 | import materialui.DialogContent 4 | import materialui.components.MaterialStyle 5 | import materialui.components.StandardProps 6 | import react.RBuilder 7 | 8 | external interface DialogContentProps : StandardProps 9 | 10 | fun RBuilder.dialogContent(rootStyle: String? = null, block: DialogContentElementBuilder.() -> Unit) { 11 | child(DialogContentElementBuilder(DialogContent, listOfNotNull(rootStyle?.let { MaterialStyle.root to it })).apply(block).create()) 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogcontenttext/DialogContentTextElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogcontenttext 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.typography.TypographyElementBuilder 6 | import react.ComponentType 7 | 8 | class DialogContentTextElementBuilder internal constructor( 9 | type: ComponentType, 10 | classMap: List, String>>, 11 | factory: (TagConsumer) -> T 12 | ) : TypographyElementBuilder(type, classMap, factory) 13 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogtitle/DialogTitleElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogtitle 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.getValue 7 | import materialui.components.setValue 8 | import react.ComponentType 9 | 10 | class DialogTitleElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>> 13 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) { 14 | 15 | var Tag.disableTypography: Boolean? by materialProps 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/dialogtitle/dialogTitle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.dialogtitle 2 | 3 | import materialui.DialogTitle 4 | import materialui.components.MaterialStyle 5 | import materialui.components.StandardProps 6 | import react.RBuilder 7 | 8 | external interface DialogTitleProps : StandardProps { 9 | var disableTypography: Boolean? 10 | } 11 | 12 | fun RBuilder.dialogTitle(rootStyle: String? = null, block: DialogTitleElementBuilder.() -> Unit) { 13 | child(DialogTitleElementBuilder(DialogTitle, listOfNotNull(rootStyle?.let { MaterialStyle.root to it })).apply(block).create()) 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/divider/enums/DividerOrientation.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.divider.enums 2 | 3 | 4 | @Suppress("EnumEntryName") 5 | enum class DividerOrientation { 6 | vertical, horizontal 7 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/divider/enums/DividerStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.divider.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DividerStyle { 5 | root, 6 | absolute, 7 | inset, 8 | light, 9 | middle, 10 | vertical, 11 | flexItem 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/divider/enums/DividerVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.divider.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DividerVariant { 5 | fullWidth, inset, middle 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/drawer/enums/DrawerAnchor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.drawer.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DrawerAnchor { 5 | left, top, right, bottom 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/drawer/enums/DrawerStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.drawer.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DrawerStyle { 5 | root, 6 | docked, 7 | paper, 8 | paperAnchorLeft, 9 | paperAnchorRight, 10 | paperAnchorTop, 11 | paperAnchorBottom, 12 | paperAnchorDockedLeft, 13 | paperAnchorDockedTop, 14 | paperAnchorDockedRight, 15 | paperAnchorDockedBottom, 16 | modal 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/drawer/enums/DrawerVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.drawer.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class DrawerVariant { 5 | permanent, persistent, temporary 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/expansionpanel/enums/ExpansionPanelStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.expansionpanel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ExpansionPanelStyle { 5 | root, 6 | rounded, 7 | expanded, 8 | disabled 9 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/expansionpanelactions/ExpansionPanelActionsElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.expansionpanelactions 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.expansionpanelactions.enums.ExpansionPanelActionsStyle 7 | import react.ComponentType 8 | 9 | class ExpansionPanelActionsElementBuilder internal constructor( 10 | type: ComponentType, 11 | classMap: List, String>> 12 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) { 13 | fun Tag.classes(vararg classMap: Pair) { 14 | classes(classMap.toList()) 15 | } 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/expansionpanelactions/enums/ExpansionPanelActionsStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.expansionpanelactions.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ExpansionPanelActionsStyle { 5 | root, spacing 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/expansionpanelactions/expansionPanelActions.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.expansionpanelactions 2 | 3 | import materialui.ExpansionPanelActions 4 | import materialui.components.StandardProps 5 | import materialui.components.expansionpanelactions.enums.ExpansionPanelActionsStyle 6 | import react.* 7 | 8 | external interface ExpansionPanelActionsProps : StandardProps 9 | 10 | fun RBuilder.expansionPanelActions(vararg classMap: Pair, block: ExpansionPanelActionsElementBuilder.() -> Unit) { 11 | child(ExpansionPanelActionsElementBuilder(ExpansionPanelActions, classMap.toList()).apply(block).create()) 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/expansionpaneldetails/ExpansionPanelDetailsElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.expansionpaneldetails 2 | 3 | import kotlinx.html.DIV 4 | import materialui.components.MaterialElementBuilder 5 | import react.ComponentType 6 | 7 | class ExpansionPanelDetailsElementBuilder internal constructor( 8 | type: ComponentType, 9 | classMap: List, String>> 10 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) 11 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/expansionpaneldetails/expansionPanelDetails.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.expansionpaneldetails 2 | 3 | import materialui.ExpansionPanelDetails 4 | import materialui.components.MaterialStyle 5 | import materialui.components.StandardProps 6 | import react.RBuilder 7 | 8 | external interface ExpansionPanelDetailsProps : StandardProps 9 | 10 | fun RBuilder.expansionPanelDetails(rootStyle: String? = null, block: ExpansionPanelDetailsElementBuilder.() -> Unit) { 11 | child(ExpansionPanelDetailsElementBuilder(ExpansionPanelDetails, listOfNotNull(rootStyle?.let{ MaterialStyle.root to it })).apply(block).create()) 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/expansionpanelsummary/enums/ExpansionPanelSummaryStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.expansionpanelsummary.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ExpansionPanelSummaryStyle { 5 | root, 6 | expanded, 7 | focused, 8 | disabled, 9 | content, 10 | expandIcon 11 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/fab/enums/FabStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.fab.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FabStyle { 5 | root, 6 | label, 7 | primary, 8 | secondary, 9 | extended, 10 | focusVisible, 11 | disabled, 12 | colorInherit, 13 | sizeSmall, 14 | sizeMedium 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/fab/enums/FabVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.fab.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FabVariant { 5 | round, extended 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/fade/FadeElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.fade 2 | 3 | import kotlinext.js.js 4 | import kotlinext.js.jsObject 5 | import materialui.reacttransiton.RTransitionBuilder 6 | import react.ComponentType 7 | 8 | class FadeElementBuilder internal constructor( 9 | type: ComponentType, 10 | props: FadeProps = jsObject { } 11 | ) : RTransitionBuilder(type, props) { 12 | 13 | fun FadeProps.timeout(msec: Long) { timeout = msec } 14 | fun FadeProps.timeout(enter: Long? = null, exit: Long? = null) { timeout = js { this["enter"] = enter; this["exit"] = exit } } 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/fade/fade.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.fade 2 | 3 | import materialui.Fade 4 | import materialui.reacttransiton.RTransitionProps 5 | import react.RBuilder 6 | import react.PropsWithChildren 7 | 8 | external interface FadeProps : RTransitionProps, PropsWithChildren 9 | 10 | fun RBuilder.fade(block: FadeElementBuilder.() -> Unit) { 11 | child(FadeElementBuilder(Fade).apply(block).create()) 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/filledinput/FilledInputElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.filledinput 2 | 3 | import kotlinx.html.Tag 4 | import materialui.components.filledinput.enums.FilledInputStyle 5 | import materialui.components.getValue 6 | import materialui.components.inputbase.InputBaseElementBuilder 7 | import materialui.components.setValue 8 | import react.ComponentType 9 | 10 | class FilledInputElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>> 13 | ) : InputBaseElementBuilder(type, classMap) { 14 | fun Tag.classes(vararg classMap: Pair) { 15 | classes(classMap.toList()) 16 | } 17 | 18 | var Tag.disableUnderline: Boolean? by materialProps 19 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/filledinput/enums/FilledInputStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.filledinput.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FilledInputStyle { 5 | root, 6 | underline, 7 | focused, 8 | disabled, 9 | adornedStart, 10 | adornedEnd, 11 | error, 12 | multiline, 13 | input, 14 | inputMarginDense, 15 | inputMultiline, 16 | inputAdornedStart, 17 | inputAdornedEnd 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/filledinput/filledInput.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.filledinput 2 | 3 | import materialui.FilledInput 4 | import materialui.components.filledinput.enums.FilledInputStyle 5 | import materialui.components.inputbase.InputBaseProps 6 | import react.RBuilder 7 | 8 | external interface FilledInputProps : InputBaseProps { 9 | var disableUnderline: Boolean? 10 | } 11 | 12 | fun RBuilder.filledInput(vararg classMap: Pair, block: FilledInputElementBuilder.() -> Unit) { 13 | child(FilledInputElementBuilder(FilledInput, classMap.toList()).apply(block).create()) 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formcontrol/enums/FormControlMargin.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formcontrol.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormControlMargin { 5 | none, dense, normal 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formcontrol/enums/FormControlStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formcontrol.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormControlStyle { 5 | root, 6 | marginNormal, 7 | marginDense, 8 | fullWidth 9 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formcontrol/enums/FormControlVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formcontrol.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormControlVariant { 5 | standard, outlined, filled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formcontrollabel/enums/FormControlLabelPlacement.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formcontrollabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormControlLabelPlacement { 5 | end, start, top, bottom 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formcontrollabel/enums/FormControlLabelStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formcontrollabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormControlLabelStyle { 5 | root, 6 | labelPlacementStart, 7 | labelPlacementTop, 8 | labelPlacementBottom, 9 | disabled, 10 | label 11 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formcontrollabel/formControlLabel.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formcontrollabel 2 | 3 | import materialui.FormControlLabel 4 | import materialui.components.StandardProps 5 | import materialui.components.formcontrollabel.enums.FormControlLabelStyle 6 | import org.w3c.dom.events.Event 7 | import react.* 8 | 9 | external interface FormControlLabelProps : StandardProps { 10 | var checked: Any? 11 | var control: ReactElement? 12 | var disabled: Boolean? 13 | var inputRef: Ref<*>? 14 | var label: ReactElement? 15 | var labelPlacement: String? 16 | var name: String? 17 | var onChange: ((Event, Boolean) -> Unit)? 18 | var value: String? 19 | } 20 | 21 | fun RBuilder.formControlLabel(vararg classMap: Pair, block: FormControlLabelElementBuilder.() -> Unit) { 22 | child(FormControlLabelElementBuilder(FormControlLabel, classMap.toList()).apply(block).create()) 23 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formgroup/FormGroupElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formgroup 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.formgroup.enums.FormGroupStyle 7 | import materialui.components.getValue 8 | import materialui.components.setValue 9 | import react.ComponentType 10 | 11 | open class FormGroupElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List, String>> 14 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) { 15 | fun Tag.classes(vararg classMap: Pair) { 16 | classes(classMap.toList()) 17 | } 18 | 19 | var Tag.row: Boolean? by materialProps 20 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formgroup/enums/FormGroupStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formgroup.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormGroupStyle { 5 | root, row 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formgroup/formGroup.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formgroup 2 | 3 | import materialui.FormGroup 4 | import materialui.components.StandardProps 5 | import materialui.components.formgroup.enums.FormGroupStyle 6 | import react.RBuilder 7 | 8 | external interface FormGroupProps : StandardProps { 9 | var row: Boolean? 10 | } 11 | 12 | fun RBuilder.formGroup(vararg classMap: Pair, block: FormGroupElementBuilder.() -> Unit) { 13 | child(FormGroupElementBuilder(FormGroup, classMap.toList()).apply(block).create()) 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formhelpertext/enums/FormHelperTextMargin.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formhelpertext.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormHelperTextMargin { 5 | dense 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formhelpertext/enums/FormHelperTextStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formhelpertext.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormHelperTextStyle { 5 | root, 6 | error, 7 | disabled, 8 | marginDense, 9 | contained, 10 | focused, 11 | filled, 12 | required 13 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formhelpertext/enums/FormHelperTextVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formhelpertext.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormHelperTextVariant { 5 | standard, outlined, filled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/formlabel/enums/FormLabelStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.formlabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class FormLabelStyle { 5 | root, 6 | focused, 7 | disabled, 8 | error, 9 | filled, 10 | required, 11 | asterisk 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grid/enums/GridAlign.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grid.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class GridAlign(override val realValue: String) : AttributeEnum { 7 | left("left"), 8 | center("center"), 9 | right("right"); 10 | 11 | override fun toString(): String = realValue 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grid/enums/GridAlignContent.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grid.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class GridAlignContent(override val realValue: String) : AttributeEnum { 7 | stretch("stretch"), 8 | center("center"), 9 | flexStart("flex-start"), 10 | flexEnd("flex-end"), 11 | spaceBetween("space-between"), 12 | spaceAround("space-around"); 13 | 14 | override fun toString(): String = realValue 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grid/enums/GridAlignItems.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grid.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class GridAlignItems(override val realValue: String) : AttributeEnum { 7 | flexStart("flex-start"), 8 | center("center"), 9 | flexEnd("flex-end"), 10 | stretch("stretch"), 11 | baseline("baseline"); 12 | 13 | override fun toString(): String = realValue 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grid/enums/GridDirection.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grid.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class GridDirection(override val realValue: String) : AttributeEnum { 7 | row("row"), 8 | rowReverse("row-reverse"), 9 | column("column"), 10 | columnReverse("column-reverse"); 11 | 12 | override fun toString(): String = realValue 13 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grid/enums/GridJustify.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grid.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class GridJustify(override val realValue: String) : AttributeEnum { 7 | flexStart("flex-start"), 8 | center("center"), 9 | flexEnd("flex-end"), 10 | spaceBetween("space-between"), 11 | spaceAround("space-around"), 12 | spaceEvenly("space-evenly"); 13 | 14 | override fun toString(): String = realValue 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grid/enums/GridWrap.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grid.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class GridWrap(override val realValue: String) : AttributeEnum { 7 | nowrap("nowrap"), 8 | wrap("wrap"), 9 | wrapReverse("wrap-reverse"); 10 | 11 | override fun toString(): String = realValue 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/gridlisttile/GridListTileElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.gridlisttile 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.getValue 7 | import materialui.components.gridlisttile.enums.GridListTitleStyle 8 | import materialui.components.setValue 9 | import react.ComponentType 10 | 11 | class GridListTileElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List>, 14 | factory: (TagConsumer) -> T 15 | ) : MaterialElementBuilder(type, classMap, factory) { 16 | fun Tag.classes(vararg classMap: Pair) { 17 | classes(classMap.toList()) 18 | } 19 | 20 | var Tag.cols: Number? by materialProps 21 | var Tag.rows: Number? by materialProps 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/gridlisttile/enums/GridListTitleStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.gridlisttile.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class GridListTitleStyle { 5 | root, 6 | tile, 7 | imgFullHeight, 8 | imgFullWidth 9 | } 10 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/gridlisttilebar/enums/GridListTileBarActionPosition.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.gridlisttilebar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class GridListTileBarActionPosition { 5 | left, right 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/gridlisttilebar/enums/GridListTileBarStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.gridlisttilebar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class GridListTileBarStyle { 5 | root, 6 | titlePositionBottom, 7 | titlePositionTop, 8 | rootSubtitle, 9 | titleWrap, 10 | titleWrapActionPosLeft, 11 | titleWrapActionPosRight, 12 | title, 13 | subtitle, 14 | actionIcon, 15 | actionIconActionPosLeft 16 | } 17 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/gridlisttilebar/enums/GridListTileBarTitlePosition.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.gridlisttilebar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class GridListTileBarTitlePosition { 5 | top, bottom 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/gridlisttilebar/gridListTileBar.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.gridlisttilebar 2 | 3 | import materialui.GridListTileBar 4 | import materialui.components.StandardProps 5 | import materialui.components.gridlisttile.enums.GridListTitleStyle 6 | import react.* 7 | 8 | external interface GridListTileBarProps : StandardProps { 9 | var actionIcon: ReactElement? 10 | var actionPosition: String? 11 | var subtitle: ReactElement? 12 | var title: ReactElement? 13 | var titlePosition: String? 14 | } 15 | 16 | fun RBuilder.gridListTileBar(vararg classMap: Pair, block: GridListTileBarElementBuilder.() -> Unit) { 17 | child(GridListTileBarElementBuilder(GridListTileBar, classMap.toList()).apply(block).create()) 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grow/GrowElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grow 2 | 3 | import kotlinext.js.js 4 | import kotlinext.js.jsObject 5 | import materialui.reacttransiton.RTransitionBuilder 6 | import react.ComponentType 7 | 8 | class GrowElementBuilder internal constructor( 9 | type: ComponentType 10 | ) : RTransitionBuilder(type, jsObject { }) { 11 | 12 | fun GrowProps.timeout(msec: Long) { timeout = msec } 13 | fun GrowProps.timeout(enter: Long? = null, exit: Long? = null) { timeout = js { this["enter"] = enter; this["exit"] = exit } } 14 | fun GrowProps.timeout() { timeout = "auto" } 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/grow/grow.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.grow 2 | 3 | import materialui.Grow 4 | import materialui.reacttransiton.RTransitionProps 5 | import materialui.styles.muitheme.MuiTheme 6 | import react.RBuilder 7 | import react.PropsWithChildren 8 | 9 | external interface GrowProps : RTransitionProps, PropsWithChildren { 10 | var style: Any? 11 | var theme: MuiTheme? 12 | } 13 | 14 | fun RBuilder.grow(block: GrowElementBuilder.() -> Unit) { 15 | child(GrowElementBuilder(Grow).apply(block).create()) 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/hidden/HiddenElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.hidden 2 | 3 | import kotlinext.js.jsObject 4 | import materialui.components.hidden.enums.HiddenWidth 5 | import react.* 6 | 7 | class HiddenElementBuilder internal constructor( 8 | val type: ComponentType, 9 | private val props: HiddenProps = jsObject { } 10 | ) : RBuilderImpl() { 11 | fun attrs(handler: HiddenProps.() -> Unit) { 12 | props.handler() 13 | } 14 | 15 | fun create() = createElement(type, props, *childList.toTypedArray()) 16 | 17 | fun HiddenProps.only(v: HiddenWidth) { only = v.toString() } 18 | fun HiddenProps.only(v: List) { only = v.map { it.toString() }.toTypedArray() } 19 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/hidden/enums/HiddenImplementation.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.hidden.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class HiddenImplementation { 5 | js, css 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/hidden/enums/HiddenWidth.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.hidden.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class HiddenWidth { 5 | xs, sm, md, lg, xl 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/hidden/hidden.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.hidden 2 | 3 | import materialui.Hidden 4 | import materialui.components.StandardProps 5 | import react.RBuilder 6 | 7 | external interface HiddenProps : StandardProps { 8 | var implementation: String? 9 | var initialWidth: String? 10 | var lgDown: Boolean? 11 | var lgUp: Boolean? 12 | var mdDown: Boolean? 13 | var mdUp: Boolean? 14 | var only: Any? 15 | var smDown: Boolean? 16 | var smUp: Boolean? 17 | var xlDown: Boolean? 18 | var xlUp: Boolean? 19 | var xsDown: Boolean? 20 | var xsUp: Boolean? 21 | } 22 | 23 | fun RBuilder.hidden(block: HiddenElementBuilder.() -> Unit) { 24 | child(HiddenElementBuilder(Hidden).apply(block).create()) 25 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/icon/enums/IconColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.icon.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class IconColor { 5 | inherit, primary, secondary, action, error, disabled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/icon/enums/IconFontSize.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.icon.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class IconFontSize { 5 | inherit, default, small, large 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/icon/enums/IconStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.icon.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class IconStyle { 5 | root, 6 | colorPrimary, 7 | colorSecondary, 8 | colorAction, 9 | colorError, 10 | colorDisabled, 11 | fontSizeInherit, 12 | fontSizeSmall, 13 | fontSizeLarge 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/icon/icon.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.icon 2 | 3 | import kotlinx.html.SPAN 4 | import kotlinx.html.Tag 5 | import kotlinx.html.TagConsumer 6 | import materialui.Icon 7 | import materialui.components.StandardProps 8 | import materialui.components.icon.enums.IconStyle 9 | import react.* 10 | 11 | external interface IconProps : StandardProps { 12 | var color: String? 13 | var fontSize: String? 14 | } 15 | 16 | fun RBuilder.icon(vararg classMap: Pair, block: IconElementBuilder.() -> Unit) { 17 | child(IconElementBuilder(Icon, classMap.toList()) { SPAN(mapOf(), it) }.apply(block).create()) 18 | } 19 | fun RBuilder.icon(vararg classMap: Pair, factory: (TagConsumer) -> T, block: IconElementBuilder.() -> Unit) { 20 | child(IconElementBuilder(Icon, classMap.toList(), factory).apply(block).create()) 21 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/iconbutton/enums/IconButtonEdge.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.iconbutton.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class IconButtonEdge { 5 | start, end 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/iconbutton/enums/IconButtonStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.iconbutton.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class IconButtonStyle { 5 | root, 6 | colorInherit, 7 | colorPrimary, 8 | colorSecondary, 9 | disabled, 10 | label 11 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/input/InputElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.input 2 | 3 | import kotlinx.html.Tag 4 | import materialui.components.getValue 5 | import materialui.components.input.enums.InputStyle 6 | import materialui.components.inputbase.InputBaseElementBuilder 7 | import materialui.components.setValue 8 | import react.ComponentType 9 | 10 | open class InputElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>> 13 | ) : InputBaseElementBuilder(type, classMap) { 14 | fun Tag.classes(vararg classMap: Pair) { 15 | classes(classMap.toList()) 16 | } 17 | 18 | var Tag.disableUnderline: Boolean? by materialProps 19 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/input/enums/InputStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.input.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputStyle { 5 | root, 6 | formControl, 7 | focused, 8 | disabled, 9 | underline, 10 | error, 11 | multiline, 12 | fullWidth, 13 | input, 14 | inputMarginDense, 15 | inputMultiline, 16 | inputType, 17 | inputTypeSearch 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/input/input.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.input 2 | 3 | import materialui.Input 4 | import materialui.components.input.enums.InputStyle 5 | import materialui.components.inputbase.InputBaseProps 6 | import react.RBuilder 7 | 8 | external interface InputProps : InputBaseProps { 9 | var disableUnderline: Boolean? 10 | } 11 | 12 | fun RBuilder.input(vararg classMap: Pair, block: InputElementBuilder.() -> Unit) { 13 | child(inputElement(classMap.toList(), block)) 14 | } 15 | internal fun inputElement( 16 | classMap: List> = listOf(), 17 | block: InputElementBuilder.() -> Unit 18 | ) = InputElementBuilder(Input, classMap).apply(block).create() 19 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputadornment/enums/InputAdornmentPosition.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputadornment.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputAdornmentPosition { 5 | start, end 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputadornment/enums/InputAdornmentStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputadornment.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputAdornmentStyle { 5 | root, 6 | filled, 7 | positionStart, 8 | positionEnd, 9 | disablePointerEvents 10 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputadornment/enums/InputAdornmentVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputadornment.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputAdornmentVariant { 5 | standard, outlined, filled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputbase/enums/InputBaseStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputbase.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputBaseStyle { 5 | root, 6 | formControl, 7 | focused, 8 | disabled, 9 | adornedStart, 10 | adornedEnd, 11 | error, 12 | marginDense, 13 | multiline, 14 | fullWidth, 15 | input, 16 | inputMarginDense, 17 | inputMultiline, 18 | inputTypeSearch, 19 | inputAdornedStart, 20 | inputAdornedEnd 21 | } 22 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputbase/enums/InputMargin.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputbase.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputMargin { 5 | dense, none 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputlabel/enums/InputLabelMargin.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputlabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputLabelMargin { 5 | dense 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputlabel/enums/InputLabelStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputlabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputLabelStyle { 5 | root, 6 | focused, 7 | disabled, 8 | error, 9 | required, 10 | formControl, 11 | marginDense, 12 | shrink, 13 | animated, 14 | filled, 15 | outlined 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/inputlabel/enums/InputLabelVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.inputlabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class InputLabelVariant { 5 | standard, outlined, filled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/internal/SwitchBaseProps.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.internal 2 | 3 | import materialui.components.StandardProps 4 | import react.PropsWithChildren 5 | import react.Ref 6 | import react.ReactElement 7 | 8 | external interface SwitchBaseProps : StandardProps { 9 | var autoFocus: Boolean? 10 | var checked: Boolean? 11 | var checkedIcon: ReactElement? 12 | var defaultChecked: Boolean? 13 | var disabled: Boolean? 14 | var disableRipple: Boolean? 15 | var icon: ReactElement? 16 | var id: String? 17 | var inputProps: PropsWithChildren? 18 | var inputRef: Ref<*>? 19 | var name: String? 20 | var readOnly: Boolean? 21 | var required: Boolean? 22 | var tabIndex: Any? 23 | var type: String? 24 | var value: Any? 25 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/linearprogress/enums/LinearProgressColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.linearprogress.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class LinearProgressColor { 5 | primary, secondary 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/linearprogress/enums/LinearProgressStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.linearprogress.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class LinearProgressStyle { 5 | root, 6 | colorPrimary, 7 | colorSecondary, 8 | determinate, 9 | indeterminate, 10 | buffer, 11 | query, 12 | dashed, 13 | dashedColorPrimary, 14 | dashedColorSecondary, 15 | bar, 16 | barColorPrimary, 17 | barColorSecondary, 18 | bar1Indeterminate, 19 | bar1Determinate, 20 | bar1Buffer, 21 | bar2Indeterminate, 22 | bar2Buffer 23 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/linearprogress/enums/LinearProgressVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.linearprogress.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class LinearProgressVariant { 5 | determinate, indeterminate, buffer, query 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/linearprogress/linearProgress.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.linearprogress 2 | 3 | import materialui.LinearProgress 4 | import materialui.components.StandardProps 5 | import materialui.components.linearprogress.enums.LinearProgressStyle 6 | import react.* 7 | 8 | external interface LinearProgressProps : StandardProps { 9 | var color: String? 10 | var value: Number? 11 | var valueBuffer: Number? 12 | var variant: String? 13 | } 14 | 15 | fun RBuilder.linearProgress(vararg classMap: Pair, block: LinearProgressElementBuilder.() -> Unit) { 16 | child(LinearProgressElementBuilder(LinearProgress, classMap.toList()).apply(block).create()) 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/link/enums/LinkStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.link.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class LinkStyle { 5 | root, 6 | underlineNone, 7 | underlineHover, 8 | underlineAlways, 9 | button, 10 | focusVisible 11 | } 12 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/link/enums/LinkUnderline.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.link.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class LinkUnderline { 5 | none, hover, always 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/link/link.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.link 2 | 3 | import kotlinx.html.A 4 | import kotlinx.html.Tag 5 | import kotlinx.html.TagConsumer 6 | import materialui.Link 7 | import materialui.components.link.enums.LinkStyle 8 | import materialui.components.typography.TypographyProps 9 | import react.RBuilder 10 | 11 | external interface LinkProps : TypographyProps { 12 | var block: Boolean? 13 | var TypographyClasses: dynamic 14 | var underline: String? 15 | } 16 | 17 | fun RBuilder.link(vararg classMap: Pair, block: LinkElementBuilder.() -> Unit) { 18 | child(LinkElementBuilder(Link, classMap.toList()) { A(mapOf(), it) }.apply(block).create()) 19 | } 20 | fun RBuilder.link(vararg classMap: Pair, factory: (TagConsumer) -> T, block: LinkElementBuilder.() -> Unit) { 21 | child(LinkElementBuilder(Link, classMap.toList(), factory).apply(block).create()) 22 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/list/enums/ListStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.list.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ListStyle { 5 | root, 6 | padding, 7 | dense, 8 | subheader 9 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitem/enums/ListItemAlignItem.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitem.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ListItemAlignItem(internal val value: String) { 5 | flexStart("flex-start"), center("center"); 6 | 7 | companion object { 8 | fun value(v: String): ListItemAlignItem 9 | = values().find { it.value == v } ?: throw IllegalArgumentException("Unknown value: $v") 10 | } 11 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitem/enums/ListItemStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitem.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ListItemStyle { 5 | root, 6 | container, 7 | focusVisible, 8 | default, 9 | dense, 10 | alignItemsFlexStart, 11 | disabled, 12 | divider, 13 | gutters, 14 | button, 15 | secondaryAction, 16 | selected 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemavatar/ListItemAvatarElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemavatar 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.listitemavatar.enums.ListItemAvaterStyle 7 | import react.ComponentType 8 | 9 | class ListItemAvatarElementBuilder internal constructor( 10 | type: ComponentType, 11 | classMap: List, String>> 12 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) { 13 | fun Tag.classes(vararg classMap: Pair) { 14 | classes(classMap.toList()) 15 | } 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemavatar/enums/ListItemAvaterStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemavatar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ListItemAvaterStyle { 5 | root, 6 | alignItemsFlexStart, 7 | icon 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemavatar/listItemAvatar.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemavatar 2 | 3 | import materialui.ListItemAvatar 4 | import materialui.components.StandardProps 5 | import materialui.components.listitemavatar.enums.ListItemAvaterStyle 6 | import react.RBuilder 7 | 8 | @JsModule("@material-ui/core/ListItemAvatar") 9 | @JsNonModule 10 | private external val listItemAvatarModule: dynamic 11 | 12 | external interface ListItemAvatarProps : StandardProps 13 | 14 | fun RBuilder.listAvatar(vararg classMap: Pair, block: ListItemAvatarElementBuilder.() -> Unit) { 15 | child(ListItemAvatarElementBuilder(ListItemAvatar, classMap.toList()).apply(block).create()) 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemicon/ListItemIconElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemicon 2 | 3 | import kotlinx.html.DIV 4 | import materialui.components.MaterialElementBuilder 5 | import react.ComponentType 6 | 7 | class ListItemIconElementBuilder internal constructor( 8 | type: ComponentType, 9 | classMap: List, String>> 10 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemicon/listItemIcon.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemicon 2 | 3 | import materialui.ListItemIcon 4 | import materialui.components.MaterialStyle 5 | import materialui.components.StandardProps 6 | import react.RBuilder 7 | 8 | external interface ListItemIconProps : StandardProps 9 | 10 | fun RBuilder.listItemIcon(rootStyle: String? = null, block: ListItemIconElementBuilder.() -> Unit) { 11 | child(ListItemIconElementBuilder(ListItemIcon, listOfNotNull(rootStyle?.let { MaterialStyle.root to it })).apply(block).create()) 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemsecondaryaction/ListItemSecondaryActionElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemsecondaryaction 2 | 3 | import kotlinx.html.DIV 4 | import materialui.components.MaterialElementBuilder 5 | import react.ComponentType 6 | 7 | class ListItemSecondaryActionElementBuilder internal constructor( 8 | type: ComponentType, 9 | classMap: List, String>> 10 | ) : MaterialElementBuilder(type, classMap, { DIV(mapOf(), it) }) -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemsecondaryaction/listItemSecondaryAction.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemsecondaryaction 2 | 3 | import materialui.ListItemSecondaryAction 4 | import materialui.components.MaterialStyle 5 | import materialui.components.StandardProps 6 | import react.RBuilder 7 | 8 | external interface ListItemSecondaryActionProps : StandardProps 9 | 10 | fun RBuilder.listItemSecondaryAction(rootStyle: String? = null, block: ListItemSecondaryActionElementBuilder.() -> Unit) { 11 | child(ListItemSecondaryActionElementBuilder(ListItemSecondaryAction, listOfNotNull(rootStyle?.let { MaterialStyle.root to it })).apply(block).create()) 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemtext/enums/ListItemTextStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemtext.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ListItemTextStyle { 5 | root, 6 | inset, 7 | dense, 8 | primary, 9 | secondary, 10 | textDense 11 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listitemtext/listItemText.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listitemtext 2 | 3 | import materialui.ListItemText 4 | import materialui.components.StandardProps 5 | import materialui.components.listitemtext.enums.ListItemTextStyle 6 | import react.* 7 | 8 | external interface ListItemTextProps : StandardProps { 9 | var disableTypography: Boolean? 10 | var inset: Boolean? 11 | var primary: ReactElement? 12 | var primaryTypographyProps: PropsWithChildren? 13 | var secondary: ReactElement? 14 | var secondaryTypographyProps: PropsWithChildren? 15 | var theme: Any? 16 | } 17 | 18 | fun RBuilder.listItemText(vararg classMap: Pair, block: ListItemTextElementBuilder.() -> Unit) { 19 | child(ListItemTextElementBuilder(ListItemText, classMap.toList()).apply(block).create()) 20 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listsubheader/enums/ListSubheaderColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listsubheader.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ListSubheaderColor { 5 | default, primary, inherit 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/listsubheader/enums/ListSubheaderStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.listsubheader.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ListSubheaderStyle { 5 | root, 6 | colorPrimary, 7 | colorInherit, 8 | gutters, 9 | inset, 10 | sticky 11 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/menu/enums/MenuStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.menu.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class MenuStyle { 5 | paper 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/menu/menu.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.menu 2 | 3 | import materialui.Menu 4 | import materialui.components.menu.enums.MenuStyle 5 | import materialui.components.popover.PopoverProps 6 | import materialui.styles.muitheme.MuiTheme 7 | import react.RBuilder 8 | import react.PropsWithChildren 9 | 10 | external interface MenuProps : PopoverProps { 11 | var disableAutoFocusItem: Boolean? 12 | var MenuListProps: PropsWithChildren? 13 | var theme: MuiTheme? 14 | var PopoveComponentClasses: Any? 15 | } 16 | 17 | fun RBuilder.menu(vararg classMap: Pair, block: MenuElementBuilder.() -> Unit) { 18 | child(menuElement(classMap.toList(), block)) 19 | } 20 | internal fun menuElement( 21 | classMap: List> = listOf(), 22 | block: MenuElementBuilder.() -> Unit 23 | ) = MenuElementBuilder(Menu, classMap.toList()).apply(block).create() 24 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/menuitem/MenuItemElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.menuitem 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.listitem.ListItemElementBuilder 6 | import materialui.components.menuitem.enums.MenuItemStyle 7 | import react.ComponentType 8 | 9 | class MenuItemElementBuilder internal constructor( 10 | type: ComponentType, 11 | classMap: List, String>>, 12 | factory: (TagConsumer) -> T 13 | ) : ListItemElementBuilder(type, classMap, factory) { 14 | fun Tag.classes(vararg classMap: Pair) { 15 | classes(classMap.toList()) 16 | } 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/menuitem/enums/MenuItemStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.menuitem.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class MenuItemStyle { 5 | root, 6 | gutters, 7 | selected 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/menulist/MenuListElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.menulist 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.getValue 6 | import materialui.components.list.ListElementBuilder 7 | import materialui.components.setValue 8 | import react.ComponentType 9 | 10 | class MenuListElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>>, 13 | factory: (TagConsumer) -> T 14 | ) : ListElementBuilder(type, classMap, factory) { 15 | var Tag.disableListWrap: Boolean? by materialProps 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/mobilestepper/enums/MobileStepperPosition.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.mobilestepper.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class MobileStepperPosition { 5 | bottom, top, static 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/mobilestepper/enums/MobileStepperVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.mobilestepper.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class MobileStepperVariant { 5 | text, dots, progress 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/modal/enums/ModalStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.modal.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ModalStyle { 5 | root, hidden 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/nativeselect/enums/NativeSelectStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.nativeselect.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class NativeSelectStyle { 5 | root, 6 | select, 7 | filled, 8 | outlined, 9 | selectMenu, 10 | disabled, 11 | icon 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/nativeselect/enums/NativeSelectVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.nativeselect.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class NativeSelectVariant { 5 | standard, outlined, filled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/nativeselect/nativeSelect.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.nativeselect 2 | 3 | import materialui.NativeSelect 4 | import materialui.components.input.InputProps 5 | import materialui.components.nativeselect.enums.NativeSelectStyle 6 | import react.* 7 | 8 | external interface NativeSelectProps : InputProps { 9 | var IconComponent: dynamic 10 | var input: ReactElement? 11 | var variant: String? 12 | } 13 | 14 | fun RBuilder.nativeSelect(vararg classMap: Pair, block: NativeSelectElementBuilder.() -> Unit) { 15 | child(NativeSelectElementBuilder(NativeSelect, classMap.toList()).apply(block).create()) 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/nossr/NoSsrElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.nossr 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | class NoSsrElementBuilder internal constructor( 7 | val type: ComponentType, 8 | private val props: NoSsrProps = jsObject { } 9 | ) : RBuilderImpl() { 10 | fun attrs(handler: NoSsrProps.() -> Unit) { 11 | props.handler() 12 | } 13 | 14 | fun create() = createElement(type, props, *childList.toTypedArray()) 15 | 16 | fun NoSsrProps.fallback(block: RBuilder.() -> Unit) { fallback = buildElement(block) } 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/nossr/noSsr.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.nossr 2 | 3 | import materialui.NoSsr 4 | import react.RBuilder 5 | import react.PropsWithChildren 6 | import react.ReactElement 7 | 8 | external interface NoSsrProps : PropsWithChildren { 9 | var defer: Boolean? 10 | var fallback: ReactElement? 11 | } 12 | 13 | fun RBuilder.noSsr(block: NoSsrElementBuilder.() -> Unit) { 14 | child(NoSsrElementBuilder(NoSsr).apply(block).create()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/outlinedinput/OutlinedInputElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.outlinedinput 2 | 3 | import kotlinx.html.Tag 4 | import materialui.components.getValue 5 | import materialui.components.inputbase.InputBaseElementBuilder 6 | import materialui.components.outlinedinput.enums.OutlinedInputStyle 7 | import materialui.components.setValue 8 | import react.ComponentType 9 | 10 | class OutlinedInputElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>> 13 | ) : InputBaseElementBuilder(type, classMap) { 14 | fun Tag.classes(vararg classMap: Pair) { 15 | classes(classMap.toList()) 16 | } 17 | 18 | var Tag.labelWidth: Number? by materialProps 19 | var Tag.notched: Boolean? by materialProps 20 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/outlinedinput/enums/OutlinedInputStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.outlinedinput.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class OutlinedInputStyle { 5 | root, 6 | focused, 7 | disabled, 8 | adornedStart, 9 | adornedEnd, 10 | error, 11 | multiline, 12 | notchedOutline, 13 | input, 14 | inputMarginDense, 15 | inputMultiline, 16 | inputAdornedStart, 17 | inputAdornedEnd 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/outlinedinput/outlinedInput.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.outlinedinput 2 | 3 | import materialui.OutlinedInput 4 | import materialui.components.inputbase.InputBaseProps 5 | import materialui.components.outlinedinput.enums.OutlinedInputStyle 6 | import react.* 7 | 8 | external interface OutlinedInputProps : InputBaseProps { 9 | var labelWidth: Number? 10 | var notched: Boolean? 11 | } 12 | 13 | fun RBuilder.outlinedInput(vararg classMap: Pair, block: OutlinedInputElementBuilder.() -> Unit) { 14 | child(OutlinedInputElementBuilder(OutlinedInput, classMap.toList()).apply(block).create()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/paper/PaperElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.paper 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.getValue 7 | import materialui.components.paper.enums.PaperStyle 8 | import materialui.components.setValue 9 | import react.ComponentType 10 | 11 | open class PaperElementBuilder( 12 | type: ComponentType, 13 | classMap: List, String>>, 14 | factory: (TagConsumer) -> T 15 | ) : MaterialElementBuilder(type, classMap, factory) { 16 | fun Tag.classes(vararg classMap: Pair) { 17 | classes(classMap.map { it.first to it.second }) 18 | } 19 | 20 | var Tag.elevation: Number? by materialProps 21 | var Tag.square: Boolean? by materialProps 22 | } 23 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/paper/enums/PaperStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.paper.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class PaperStyle { 5 | root, 6 | rounded, 7 | elevation0, 8 | elevation1, 9 | elevation2, 10 | elevation3, 11 | elevation4, 12 | elevation5, 13 | elevation6, 14 | elevation7, 15 | elevation8, 16 | elevation9, 17 | elevation10, 18 | elevation11, 19 | elevation12, 20 | elevation13, 21 | elevation14, 22 | elevation15, 23 | elevation16, 24 | elevation17, 25 | elevation18, 26 | elevation19, 27 | elevation20, 28 | elevation21, 29 | elevation22, 30 | elevation23, 31 | elevation24 32 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/popover/enums/PopoverOriginHorizontal.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.popover.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class PopoverOriginHorizontal { 5 | left, center, right 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/popover/enums/PopoverOriginVertical.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.popover.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class PopoverOriginVertical { 5 | top, center, bottom 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/popover/enums/PopoverReference.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.popover.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class PopoverReference { 5 | anchorEl, anchorPosition, none 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/popover/enums/PopoverStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.popover.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class PopoverStyle { 5 | paper 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/popper/enums/PopperPlacement.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.popper.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class PopperPlacement(override val realValue: String) : AttributeEnum { 7 | bottomEnd("bottom-end"), 8 | bottomStart("bottom-start"), 9 | bottom("bottom"), 10 | leftEnd("left-end"), 11 | leftStart("left-start"), 12 | left("left"), 13 | rightEnd("right-end"), 14 | rightStart("right-start"), 15 | right("right"), 16 | topEnd("top-end"), 17 | topStart("top-start"), 18 | top("top"); 19 | 20 | override fun toString(): String = realValue 21 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/portal/PortalElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.portal 2 | 3 | import kotlinext.js.jsObject 4 | import org.w3c.dom.HTMLElement 5 | import org.w3c.dom.Node 6 | import react.* 7 | 8 | class PortalElementBuilder internal constructor( 9 | val type: ComponentType, 10 | private val props: PortalProps = jsObject { } 11 | ) : RBuilderImpl() { 12 | fun attrs(handler: PortalProps.() -> Unit) { 13 | props.handler() 14 | } 15 | 16 | fun create() = createElement(type, props, *childList.toTypedArray()) 17 | 18 | fun PortalProps.container(node: Node) { props.container = node } 19 | fun PortalProps.container(htmlElement: HTMLElement) { props.container = htmlElement } 20 | fun PortalProps.container(block: RBuilder.() -> Unit) { props.container = buildElement(block) } 21 | fun PortalProps.onRendered(block: () -> Unit) { props.onRendered = block } 22 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/portal/portal.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.portal 2 | 3 | import materialui.Portal 4 | import react.RBuilder 5 | import react.PropsWithChildren 6 | 7 | external interface PortalProps : PropsWithChildren { 8 | var container: dynamic 9 | var disablePortal: Boolean? 10 | var onRendered: (() -> Unit)? 11 | } 12 | 13 | fun RBuilder.portal(block: PortalElementBuilder.() -> Unit) { 14 | child(PortalElementBuilder(Portal).apply(block).create()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/radio/enums/RadioColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.radio.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class RadioColor { 5 | primary, secondary, default 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/radio/enums/RadioStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.radio.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class RadioStyle { 5 | root, 6 | checked, 7 | disabled, 8 | colorPrimary, 9 | colorSecondary, 10 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/radio/radio.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.radio 2 | 3 | import materialui.Radio 4 | import materialui.components.internal.SwitchBaseProps 5 | import materialui.components.radio.enums.RadioStyle 6 | import react.RBuilder 7 | 8 | external interface RadioProps : SwitchBaseProps { 9 | var color: String? 10 | } 11 | 12 | fun RBuilder.radio(vararg classMap: Pair, block: RadioElementBuilder.() -> Unit) { 13 | child(RadioElementBuilder(Radio, classMap.toList()).apply(block).create()) 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/radiogroup/radioGroup.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.radiogroup 2 | 3 | import materialui.RadioGroup 4 | import materialui.components.formgroup.FormGroupProps 5 | import react.RBuilder 6 | 7 | external interface RadioGroupProps : FormGroupProps { 8 | var defaultValue: Any? 9 | var name: String? 10 | var value: Any? 11 | } 12 | 13 | fun RBuilder.radioGroup(block: RadioGroupElementBuilder.() -> Unit) { 14 | child(RadioGroupElementBuilder(RadioGroup, listOf()).apply(block).create()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/rootref/RootRefElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.rootref 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | class RootRefElementBuilder internal constructor( 7 | val type: ComponentType, 8 | private val props: RootRefProps = jsObject { } 9 | ) : RBuilderImpl() { 10 | fun attrs(handler: RootRefProps.() -> Unit) { 11 | props.handler() 12 | } 13 | 14 | fun create() = createElement(type, props, *childList.toTypedArray()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/rootref/rootRef.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.rootref 2 | 3 | import materialui.RootRef 4 | import react.* 5 | 6 | external interface RootRefProps : PropsWithChildren { 7 | var rootRef: Ref<*>? 8 | } 9 | 10 | fun RBuilder.rootRef(block: RootRefElementBuilder.() -> Unit) { 11 | child(RootRefElementBuilder(RootRef).apply(block).create()) 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/select/enums/SelectStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.select.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SelectStyle { 5 | root, 6 | select, 7 | filled, 8 | outlined, 9 | selectMenu, 10 | disabled, 11 | icon 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/select/enums/SelectVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.select.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SelectVariant { 5 | standard, outlined, filled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slide/SlideElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slide 2 | 3 | import kotlinext.js.js 4 | import kotlinext.js.jsObject 5 | import materialui.components.slide.enums.SlideDirection 6 | import materialui.reacttransiton.RTransitionBuilder 7 | import materialui.reacttransiton.getValue 8 | import materialui.reacttransiton.setValue 9 | import react.ComponentType 10 | 11 | class SlideElementBuilder internal constructor( 12 | type: ComponentType 13 | ) : RTransitionBuilder(type, jsObject { }) { 14 | var SlideProps.direction: SlideDirection by props 15 | 16 | fun SlideProps.timeout(msec: Long) { timeout = msec } 17 | fun SlideProps.timeout(enter: Long? = null, exit: Long? = null) { timeout = js { this["enter"] = enter; this["exit"] = exit } } 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slide/enums/SlideDirection.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slide.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SlideDirection { 5 | left, right, up, down 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slide/slide.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slide 2 | 3 | import materialui.Slide 4 | import materialui.reacttransiton.RTransitionProps 5 | import materialui.styles.muitheme.MuiTheme 6 | import react.RBuilder 7 | import react.PropsWithChildren 8 | 9 | external interface SlideProps : RTransitionProps, PropsWithChildren { 10 | var style: Any? 11 | var theme: MuiTheme? 12 | } 13 | 14 | fun RBuilder.slide(block: SlideElementBuilder.() -> Unit) { 15 | child(SlideElementBuilder(Slide).apply(block).create()) 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slider/enums/SliderColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slider.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SliderColor { 5 | primary, secondary 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slider/enums/SliderOrientation.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slider.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SliderOrientation { 5 | horizontal, vertical 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slider/enums/SliderStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slider.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SliderStyle { 5 | root, 6 | colorPrimary, 7 | colorSecondary, 8 | marked, 9 | vertical, 10 | disabled, 11 | rail, 12 | track, 13 | trackFalse, 14 | trackInverted, 15 | thumb, 16 | thumbColorPrimary, 17 | thumbColorSecondary, 18 | active, 19 | focusVisible, 20 | valueLabel, 21 | mark, 22 | markActive, 23 | markLabel, 24 | markLabelActive 25 | } 26 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slider/enums/SliderTrack.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slider.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SliderTrack { 5 | normal, inverted, `false` 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/slider/enums/SliderValueLabelDisplay.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.slider.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SliderValueLabelDisplay { 5 | on, auto, off 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/snackbar/enums/SnackbarOriginHorizontal.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.snackbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SnackbarOriginHorizontal { 5 | left, center, right 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/snackbar/enums/SnackbarOriginVertical.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.snackbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SnackbarOriginVertical { 5 | top, bottom 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/snackbar/enums/SnackbarStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.snackbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SnackbarStyle { 5 | root, 6 | anchorOriginTopCenter, 7 | anchorOriginBottomCenter, 8 | anchorOriginTopRight, 9 | anchorOriginBottomRight, 10 | anchorOriginTopLeft, 11 | anchorOriginBottomLeft 12 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/snackbarcontent/SnackbarContentElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.snackbarcontent 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.getValue 6 | import materialui.components.paper.PaperElementBuilder 7 | import materialui.components.setValue 8 | import react.* 9 | 10 | class SnackbarContentElementBuilder internal constructor( 11 | type: ComponentType, 12 | classMap: List, String>>, 13 | factory: (TagConsumer) -> T 14 | ) : PaperElementBuilder(type, classMap, factory) { 15 | 16 | var Tag.action: ReactElement? by materialProps 17 | var Tag.message: ReactElement? by materialProps 18 | 19 | fun Tag.action(block: RBuilder.() -> Unit) { action = buildElement(block) } 20 | fun Tag.message(block: RBuilder.() -> Unit) { message = buildElement(block) } 21 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/snackbarcontent/enums/SnackbarContentStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.snackbarcontent.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SnackbarContentStyle { 5 | root, 6 | message, 7 | action 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/step/enums/StepOrientation.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.step.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepOrientation { 5 | horizontal, vertical 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/step/enums/StepStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.step.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepStyle { 5 | root, 6 | horizontal, 7 | vertical, 8 | alternativeLabel, 9 | completed 10 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/step/step.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.step 2 | 3 | import materialui.Step 4 | import materialui.components.StandardProps 5 | import materialui.components.step.enums.StepStyle 6 | import react.RBuilder 7 | import react.ReactElement 8 | 9 | external interface StepProps : StandardProps { 10 | var active: Boolean? 11 | var alternativeLabel: Boolean? 12 | var completed: Boolean? 13 | var connector: ReactElement? 14 | var disabled: Boolean? 15 | var index: Number? 16 | var last: Boolean? 17 | var orientation: String? 18 | } 19 | 20 | fun RBuilder.step(vararg classMap: Pair, block: StepElementBuilder.() -> Unit) { 21 | child(StepElementBuilder(Step, classMap.toList()).apply(block).create()) 22 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepbutton/enums/StepButtonStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepbutton.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepButtonStyle { 5 | root, 6 | horizontal, 7 | vertical, 8 | touchRipple 9 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepconnector/enums/StepConnectorStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepconnector.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepConnectorStyle { 5 | root, 6 | horizontal, 7 | vertical, 8 | alternativeLabel, 9 | active, 10 | completed, 11 | disabled, 12 | line, 13 | lineHorizontal, 14 | lineVertical 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepconnector/stepConnector.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepconnector 2 | 3 | import materialui.StepConnector 4 | import materialui.components.StandardProps 5 | import materialui.components.stepconnector.enums.StepConnectorStyle 6 | import react.RBuilder 7 | 8 | external interface StepConnectorProps : StandardProps { 9 | var active: Boolean? 10 | var alternativeLabel: Boolean? 11 | var completed: Boolean? 12 | var disabled: Boolean? 13 | var index: Number? 14 | var orientation: String? 15 | } 16 | 17 | fun RBuilder.stepConnector(vararg classMap: Pair, block: StepConnectorElementBuilder.() -> Unit) { 18 | child(StepConnectorElementBuilder(StepConnector, classMap.toList()).apply(block).create()) 19 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepcontent/enums/StepContentStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepcontent.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepContentStyle { 5 | root, 6 | last, 7 | transition 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepcontent/stepContent.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepcontent 2 | 3 | import materialui.StepContent 4 | import materialui.components.StandardProps 5 | import materialui.components.stepcontent.enums.StepContentStyle 6 | import materialui.reacttransiton.RTransitionProps 7 | import react.RBuilder 8 | 9 | external interface StepContentProps : StandardProps { 10 | var active: Boolean? 11 | var alternativeLabel: Boolean? 12 | var completed: Boolean? 13 | var last: Boolean? 14 | var optional: Boolean? 15 | var orientation: String? 16 | var TransitionComponent: dynamic 17 | var transitionDuration: dynamic 18 | var TransitionProps: RTransitionProps? 19 | } 20 | 21 | fun RBuilder.stepContent(vararg classMap: Pair, block: StepContentElementBuilder.() -> Unit) { 22 | child(StepContentElementBuilder(StepContent, classMap.toList()).apply(block).create()) 23 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepicon/enums/StepIconStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepicon.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepIconStyle { 5 | root, 6 | text, 7 | active, 8 | completed, 9 | error 10 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepicon/stepIcon.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepicon 2 | 3 | import materialui.StepIcon 4 | import materialui.components.StandardProps 5 | import materialui.components.stepicon.enums.StepIconStyle 6 | import react.RBuilder 7 | import react.ReactElement 8 | 9 | external interface StepIconProps : StandardProps { 10 | var active: Boolean? 11 | var completed: Boolean? 12 | var error: Boolean? 13 | var icon: ReactElement? 14 | } 15 | 16 | fun RBuilder.stepIcon(vararg classMap: Pair, block: StepIconElementBuilder.() -> Unit) { 17 | child(StepIconElementBuilder(StepIcon, classMap.toList()).apply(block).create()) 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/steplabel/enums/StepLabelStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.steplabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepLabelStyle { 5 | root, 6 | horizontal, 7 | vertical, 8 | label, 9 | active, 10 | completed, 11 | error, 12 | disabled, 13 | iconContainer, 14 | alternativeLabel, 15 | labelContainer 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/stepper/enums/StepperStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.stepper.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class StepperStyle { 5 | root, 6 | horizontal, 7 | vertical, 8 | alternativeLabel 9 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/svgicon/enums/SvgIconColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.svgicon.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SvgIconColor { 5 | inherit, primary, secondary, action, error, disabled 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/svgicon/enums/SvgIconFontSize.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.svgicon.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SvgIconFontSize { 5 | inherit, default, small, large 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/svgicon/enums/SvgIconStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.svgicon.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SvgIconStyle { 5 | root, 6 | colorPrimary, 7 | colorSecondary, 8 | colorAction, 9 | colorError, 10 | colorDisabled, 11 | fontSizeInherit, 12 | fontSizeSmall, 13 | fontSizeLarge 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/swipeabledrawer/swipeableDrawer.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.swipeabledrawer 2 | 3 | import materialui.SwipeableDrawer 4 | import materialui.components.drawer.DrawerProps 5 | import org.w3c.dom.events.Event 6 | import react.RBuilder 7 | import react.PropsWithChildren 8 | 9 | external interface SwipeableDrawerProps : DrawerProps { 10 | var disableBackdropTransition: Boolean? 11 | var disableDiscovery: Boolean? 12 | var disableSwipeToOpen: Boolean? 13 | var hideBackdrop: Boolean? 14 | var hysteresis: Number? 15 | var minFlingVelocity: Number? 16 | var onOpen: ((Event) -> Unit)? 17 | var SwipeAreaProps: PropsWithChildren? 18 | var swipeAreaWidth: Number? 19 | } 20 | 21 | fun RBuilder.swipeableDrawer(block: SwipeableDrawerElementBuilder.() -> Unit) { 22 | child(SwipeableDrawerElementBuilder(SwipeableDrawer, listOf()).apply(block).create()) 23 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/switches/enums/SwitchColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.switches.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SwitchColor { 5 | primary, secondary, default 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/switches/enums/SwitchStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.switches.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class SwitchStyle { 5 | root, 6 | checked, 7 | disabled, 8 | input, 9 | switchBase, 10 | colorPrimary, 11 | colorSecondary, 12 | sizeSmall, 13 | thumb, 14 | track, 15 | } 16 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/switches/switch.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.switches 2 | 3 | import materialui.Switch 4 | import materialui.components.internal.SwitchBaseProps 5 | import materialui.components.switches.enums.SwitchStyle 6 | import react.RBuilder 7 | 8 | external interface SwitchProps : SwitchBaseProps { 9 | var color: String? 10 | } 11 | 12 | fun RBuilder.switch(vararg classMap: Pair, block: SwitchElementBuilder.() -> Unit) { 13 | child(SwitchElementBuilder(Switch, classMap.toList()).apply(block).create()) 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tab/enums/TabStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tab.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TabStyle { 5 | root, 6 | labelIcon, 7 | textColorInherit, 8 | textColorPrimary, 9 | textColorSecondary, 10 | selected, 11 | disabled, 12 | fullWidth, 13 | wrapper, 14 | labelContainer, 15 | label, 16 | labelWrapped 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tab/enums/TabTextColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tab.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TabTextColor { 5 | secondary, primary, inherit 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/table/TableElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.table 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.getValue 7 | import materialui.components.setValue 8 | import materialui.components.table.enums.TablePadding 9 | import react.ComponentType 10 | 11 | class TableElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List, String>>, 14 | factory: (TagConsumer) -> T 15 | ) : MaterialElementBuilder(type, classMap, factory) { 16 | 17 | var Tag.padding: TablePadding? by materialProps 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/table/enums/TablePadding.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.table.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TablePadding { 5 | default, checkbox, dense, none 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablebody/TableBodyElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablebody 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import react.ComponentType 7 | 8 | class TableBodyElementBuilder internal constructor( 9 | type: ComponentType, 10 | classMap: List, String>>, 11 | factory: (TagConsumer) -> T 12 | ) : MaterialElementBuilder(type, classMap, factory) -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablebody/tableBody.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablebody 2 | 3 | import kotlinx.html.TBODY 4 | import kotlinx.html.Tag 5 | import kotlinx.html.TagConsumer 6 | import materialui.TableBody 7 | import materialui.components.MaterialStyle 8 | import materialui.components.StandardProps 9 | import react.RBuilder 10 | 11 | external interface TableBodyProps : StandardProps 12 | 13 | fun RBuilder.tableBody(rootStyle: String? = null, block: TableBodyElementBuilder.() -> Unit) { 14 | child(TableBodyElementBuilder(TableBody, listOfNotNull(rootStyle?.let { MaterialStyle.root to it })) { TBODY(mapOf(), it) }.apply(block).create()) 15 | } 16 | fun RBuilder.tableBody(rootStyle: String? = null, factory: (TagConsumer) -> T, block: TableBodyElementBuilder.() -> Unit) { 17 | child(TableBodyElementBuilder(TableBody, listOfNotNull(rootStyle?.let { MaterialStyle.root to it }), factory).apply(block).create()) 18 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablecell/enums/TableCellAlign.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablecell.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableCellAlign { 5 | inherit, left, center, right, justify 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablecell/enums/TableCellPadding.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablecell.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableCellPadding { 5 | default, checkbox, none 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablecell/enums/TableCellSize.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablecell.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableCellSize { 5 | small, medium 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablecell/enums/TableCellSortDirection.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablecell.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableCellSortDirection(internal val value: Any) { 5 | asc("asc"), 6 | desc("desc"), 7 | `false`(false) 8 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablecell/enums/TableCellStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablecell.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableCellStyle { 5 | root, 6 | head, 7 | body, 8 | footer, 9 | numeric, 10 | paddingDense, 11 | paddingCheckbox, 12 | paddingNone, 13 | alignLeft, 14 | alignCenter, 15 | alignRight, 16 | alignJustify 17 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablecell/enums/TableCellVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablecell.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableCellVariant { 5 | head, body, footer 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablefooter/TableFooterElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablefooter 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import react.ComponentType 7 | 8 | class TableFooterElementBuilder internal constructor( 9 | type: ComponentType, 10 | classMap: List, String>>, 11 | factory: (TagConsumer) -> T 12 | ) : MaterialElementBuilder(type, classMap, factory) -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablehead/TableHeadElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablehead 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import react.ComponentType 7 | 8 | class TableHeadElementBuilder internal constructor( 9 | type: ComponentType, 10 | classMap: List, String>>, 11 | factory: (TagConsumer) -> T 12 | ) : MaterialElementBuilder(type, classMap, factory) 13 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablehead/tableHead.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablehead 2 | 3 | import kotlinx.html.THEAD 4 | import kotlinx.html.Tag 5 | import kotlinx.html.TagConsumer 6 | import materialui.TableHead 7 | import materialui.components.MaterialStyle 8 | import materialui.components.StandardProps 9 | import react.* 10 | 11 | external interface TableHeadProps : StandardProps 12 | 13 | fun RBuilder.tableHead(rootStyle: String? = null, block: TableHeadElementBuilder.() -> Unit) { 14 | child(TableHeadElementBuilder(TableHead, listOfNotNull(rootStyle?.let { MaterialStyle.root to it })) { THEAD(mapOf(), it) }.apply(block).create()) 15 | } 16 | fun RBuilder.tableHead(rootStyle: String? = null, factory: (TagConsumer) -> T, block: TableHeadElementBuilder.() -> Unit) { 17 | child(TableHeadElementBuilder(TableHead, listOfNotNull(rootStyle?.let { MaterialStyle.root to it }), factory).apply(block).create()) 18 | } 19 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablepagination/enums/TablePaginationStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablepagination.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TablePaginationStyle { 5 | root, 6 | toolbar, 7 | spacer, 8 | caption, 9 | selectRoot, 10 | select, 11 | selectIcon, 12 | input, 13 | menuItem, 14 | actions 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablerow/TableRowElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablerow 2 | 3 | import kotlinx.html.Tag 4 | import kotlinx.html.TagConsumer 5 | import materialui.components.MaterialElementBuilder 6 | import materialui.components.getValue 7 | import materialui.components.setValue 8 | import materialui.components.tablerow.enums.TableRowStyle 9 | import react.ComponentType 10 | 11 | class TableRowElementBuilder internal constructor( 12 | type: ComponentType, 13 | classMap: List, String>>, 14 | factory: (TagConsumer) -> T 15 | ) : MaterialElementBuilder(type, classMap, factory) { 16 | fun Tag.classes(vararg classMap: Pair) { 17 | classes(classMap.toList()) 18 | } 19 | 20 | var Tag.hover: Boolean? by materialProps 21 | var Tag.selected: Boolean? by materialProps 22 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablerow/enums/TableRowStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablerow.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableRowStyle { 5 | root, 6 | selected, 7 | hover, 8 | head, 9 | footer 10 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tablesortlabel/enums/TableSortLabelDirection.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tablesortlabel.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TableSortLabelDirection { 5 | asc, desc 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tabs/TabIndicatorElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tabs 2 | 3 | import kotlinx.css.CssBuilder 4 | import kotlinx.css.RuleSet 5 | import kotlinx.html.SPAN 6 | import kotlinx.html.Tag 7 | import materialui.components.tabs.enums.TabsIndicatorColor 8 | import materialui.styles.toDynamic 9 | import react.dom.RDOMBuilderImpl 10 | import react.dom.setProp 11 | 12 | class TabIndicatorElementBuilder internal constructor() : RDOMBuilderImpl({ SPAN(mapOf(), it) }) { 13 | var Tag.color: TabsIndicatorColor? 14 | get() = (asDynamic()["color"] as String?)?.let { TabsIndicatorColor.valueOf(it) } 15 | set(value) { asDynamic()["color"] = value?.toString() } 16 | 17 | fun style(ruleSet: RuleSet) { 18 | setProp("style", CssBuilder().apply(ruleSet).toDynamic) 19 | } 20 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tabs/enums/TabsIndicatorColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tabs.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TabsIndicatorColor { 5 | secondary, primary 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tabs/enums/TabsScrollButtons.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tabs.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TabsScrollButtons { 5 | auto, on, off 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tabs/enums/TabsStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tabs.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TabsStyle { 5 | root, 6 | flexContainer, 7 | centered, 8 | scroller, 9 | fixed, 10 | scrollable, 11 | scrollButtons, 12 | scrollButtonsAuto, 13 | indicator 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tabs/enums/TabsTextColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tabs.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TabsTextColor { 5 | secondary, primary, inherit 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tabs/enums/TabsVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tabs.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TabsVariant { 5 | standard, scrollable, fullWidth 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tabs/tabIndicator.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tabs 2 | 3 | internal fun tabIndicatorElement( 4 | block: TabIndicatorElementBuilder.() -> Unit 5 | ) = TabIndicatorElementBuilder().apply(block).create() -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/textfield/enums/TextFieldSize.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.textfield.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TextFieldSize{ 5 | small,medium 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/toolbar/enums/ToolbarStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.toolbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ToolbarStyle { 5 | root, 6 | gutters, 7 | regular, 8 | dense 9 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/toolbar/enums/ToolbarVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.toolbar.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class ToolbarVariant { 5 | regular, dense 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/toolbar/toolbar.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.toolbar 2 | 3 | import kotlinx.html.DIV 4 | import kotlinx.html.Tag 5 | import kotlinx.html.TagConsumer 6 | import materialui.Toolbar 7 | import materialui.components.StandardProps 8 | import materialui.components.toolbar.enums.ToolbarStyle 9 | import react.* 10 | 11 | external interface ToolbarProps : StandardProps { 12 | var disableGutters: Boolean? 13 | var variant: String? 14 | } 15 | 16 | fun RBuilder.toolbar(vararg classMap: Pair, block: ToolbarElementBuilder
.() -> Unit) { 17 | child(ToolbarElementBuilder(Toolbar, classMap.toList()) { DIV(mapOf(), it) }.apply(block).create()) 18 | } 19 | fun RBuilder.toolbar(vararg classMap: Pair, factory: (TagConsumer) -> T, block: ToolbarElementBuilder.() -> Unit) { 20 | child(ToolbarElementBuilder(Toolbar, classMap.toList(), factory).apply(block).create()) 21 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tooltip/enums/TooltipPlacement.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tooltip.enums 2 | 3 | import kotlinx.html.AttributeEnum 4 | 5 | @Suppress("EnumEntryName") 6 | enum class TooltipPlacement(override val realValue: String) : AttributeEnum { 7 | bottomEnd("bottom-end"), 8 | bottomStart("bottom-start"), 9 | bottom("bottom"), 10 | leftEnd("left-end"), 11 | leftStart("left-start"), 12 | left("left"), 13 | rightEnd("right-end"), 14 | rightStart("right-start"), 15 | right("right"), 16 | topEnd("top-end"), 17 | topStart("top-start"), 18 | top("top"); 19 | 20 | override fun toString(): String = realValue 21 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/tooltip/enums/TooltipStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.tooltip.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TooltipStyle { 5 | popper, 6 | popperInteractive, 7 | tooltip, 8 | touch, 9 | tooltipPlacementLeft, 10 | tooltipPlacementRight, 11 | tooltipPlacementTop, 12 | tooltipPlacementBottom 13 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/typography/enums/TypographyAlign.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.typography.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TypographyAlign { 5 | inherit, left, center, right, justify 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/typography/enums/TypographyColor.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.typography.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TypographyColor { 5 | initial, inherit, primary, secondary, textPrimary, textSecondary, error 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/typography/enums/TypographyDisplay.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.typography.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TypographyDisplay { 5 | initial, block, inline 6 | } 7 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/typography/enums/TypographyStyle.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.typography.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TypographyStyle { 5 | root, 6 | body2, 7 | body1, 8 | caption, 9 | button, 10 | h1, 11 | h2, 12 | h3, 13 | h4, 14 | h5, 15 | h6, 16 | subtitle1, 17 | subtitle2, 18 | overline, 19 | srOnly, 20 | alignLeft, 21 | alignCenter, 22 | alignRight, 23 | alignJustify, 24 | noWrap, 25 | gutterBottom, 26 | paragraph, 27 | colorInherit, 28 | colorPrimary, 29 | colorSecondary, 30 | colorTextPrimary, 31 | colorTextSecondary, 32 | colorError, 33 | displayInline, 34 | displayBlock, 35 | } 36 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/typography/enums/TypographyVariant.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.typography.enums 2 | 3 | @Suppress("EnumEntryName") 4 | enum class TypographyVariant { 5 | h1, 6 | h2, 7 | h3, 8 | h4, 9 | h5, 10 | h6, 11 | subtitle1, 12 | subtitle2, 13 | body1, 14 | body2, 15 | caption, 16 | button, 17 | overline, 18 | srOnly, 19 | inherit 20 | } 21 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/zoom/ZoomElementBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.zoom 2 | 3 | import kotlinext.js.js 4 | import kotlinext.js.jsObject 5 | import materialui.reacttransiton.RTransitionBuilder 6 | import react.ComponentType 7 | 8 | class ZoomElementBuilder internal constructor( 9 | type: ComponentType 10 | ) : RTransitionBuilder(type, jsObject { }) { 11 | 12 | fun ZoomProps.timeout(msec: Long) { timeout = msec } 13 | fun ZoomProps.timeout(enter: Long? = null, exit: Long? = null) { timeout = js { this["enter"] = enter; this["exit"] = exit } } 14 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/components/zoom/zoom.kt: -------------------------------------------------------------------------------- 1 | package materialui.components.zoom 2 | 3 | import materialui.Zoom 4 | import materialui.reacttransiton.RTransitionProps 5 | import materialui.styles.muitheme.MuiTheme 6 | import react.RBuilder 7 | import react.PropsWithChildren 8 | 9 | external interface ZoomProps : RTransitionProps, PropsWithChildren { 10 | var style: Any? 11 | var theme: MuiTheme? 12 | } 13 | 14 | fun RBuilder.zoom(block: ZoomElementBuilder.() -> Unit) { 15 | child(ZoomElementBuilder(Zoom).apply(block).create()) 16 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/reacteventlistener/REventListenerBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.reacteventlistener 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | abstract class REventListenerBuilder internal constructor( 7 | val type: ComponentType, 8 | protected val props: Props = jsObject { } 9 | ) : RBuilderImpl() { 10 | fun attrs(handler: Props.() -> Unit) { 11 | props.handler() 12 | } 13 | 14 | fun create() = createElement(type, props, *childList.toTypedArray()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/reacttransiton/RTransitionBuilder.kt: -------------------------------------------------------------------------------- 1 | package materialui.reacttransiton 2 | 3 | import kotlinext.js.jsObject 4 | import react.* 5 | 6 | abstract class RTransitionBuilder( 7 | protected val type: ComponentType

, 8 | protected val props: P = jsObject { } 9 | ) : RBuilderImpl() { 10 | fun attrs(handler: P.() -> Unit) { 11 | props.handler() 12 | } 13 | 14 | fun create() = createElement(type, props, *childList.toTypedArray()) 15 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/JssPreset.kt: -------------------------------------------------------------------------------- 1 | package materialui.styles 2 | 3 | external interface JssOptions { 4 | var plugins: Array 5 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/breakpoint/Breakpoint.kt: -------------------------------------------------------------------------------- 1 | package materialui.styles.breakpoint 2 | 3 | @Suppress("EnumEntryName") 4 | enum class Breakpoint { 5 | xs, sm, md, lg, xl 6 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/breakpoint/BreakpointValues.kt: -------------------------------------------------------------------------------- 1 | package materialui.styles.breakpoint 2 | 3 | external interface BreakpointValues { 4 | val xs: Number 5 | val sm: Number 6 | val md: Number 7 | val lg: Number 8 | val xl: Number 9 | } 10 | 11 | operator fun BreakpointValues.get(key: Breakpoint): Number = when (key) { 12 | Breakpoint.xs -> xs 13 | Breakpoint.sm -> sm 14 | Breakpoint.md -> md 15 | Breakpoint.lg -> lg 16 | Breakpoint.xl -> xl 17 | } 18 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/breakpoint/options/BreakpointValuesOptions.kt: -------------------------------------------------------------------------------- 1 | package materialui.styles.breakpoint.options 2 | 3 | import materialui.styles.breakpoint.Breakpoint 4 | 5 | external interface BreakpointValuesOptions { 6 | var xs: Number 7 | var sm: Number 8 | var md: Number 9 | var lg: Number 10 | var xl: Number 11 | } 12 | 13 | operator fun BreakpointValuesOptions.get(key: Breakpoint): Number = when (key) { 14 | Breakpoint.xs -> xs 15 | Breakpoint.sm -> sm 16 | Breakpoint.md -> md 17 | Breakpoint.lg -> lg 18 | Breakpoint.xl -> xl 19 | } 20 | 21 | operator fun BreakpointValuesOptions.set(key: Breakpoint, value: Number) { 22 | when (key) { 23 | Breakpoint.xs -> { xs = value } 24 | Breakpoint.sm -> { sm = value } 25 | Breakpoint.md -> { md = value } 26 | Breakpoint.lg -> { lg = value } 27 | Breakpoint.xl -> { xl = value } 28 | } 29 | } 30 | 31 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/createBreakpoints.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") 2 | 3 | package materialui.styles 4 | 5 | import kotlinext.js.jsObject 6 | import materialui.rawCreateBreakpoints 7 | import materialui.styles.breakpoint.options.BreakpointsOptions 8 | 9 | fun createBreakpoints(handler: BreakpointsOptions.() -> Unit) = rawCreateBreakpoints(jsObject(handler)) 10 | fun defaultBreakpoints() = createBreakpoints { } 11 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/createGenerateClassName.kt: -------------------------------------------------------------------------------- 1 | package materialui.styles 2 | 3 | import kotlinext.js.jsObject 4 | import materialui.createGenerateClassName 5 | import materialui.styles.stylesprovider.GenerateId 6 | 7 | external interface GenerateClassNameOptions { 8 | var disableGlobal: Boolean? 9 | var productionPrefix: String? 10 | var seed: String? 11 | } 12 | 13 | fun createGenerateClassName( 14 | disableGlobal: Boolean? = null, 15 | productionPrefix: String? = null, 16 | seed: String? = null 17 | ): GenerateId{ 18 | return createGenerateClassName(jsObject{ 19 | disableGlobal?.let {this.disableGlobal = it } 20 | productionPrefix?.let { this.productionPrefix = it } 21 | seed?. let { this.seed = it } 22 | }) 23 | } -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/createMuiTheme.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") 2 | 3 | package materialui.styles 4 | 5 | import kotlinext.js.jsObject 6 | import materialui.rawCreateMuiTheme 7 | import materialui.styles.muitheme.options.MuiThemeOptions 8 | 9 | fun createMuiTheme(handler: MuiThemeOptions.() -> Unit) = rawCreateMuiTheme(jsObject { }.apply(handler)) 10 | 11 | val defaultMuiTheme get() = createMuiTheme { } 12 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/createPalette.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") 2 | 3 | package materialui.styles 4 | 5 | import kotlinext.js.jsObject 6 | import materialui.rawCreatePalette 7 | import materialui.styles.palette.options.PaletteOptions 8 | 9 | fun createPalette(handler: PaletteOptions.() -> Unit) = rawCreatePalette(jsObject(handler)) 10 | 11 | fun defaultPalette() = createPalette { } 12 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/createTypography.kt: -------------------------------------------------------------------------------- 1 | @file:Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE") 2 | 3 | package materialui.styles 4 | 5 | import materialui.rawCreateTypography 6 | import materialui.styles.palette.Palette 7 | import materialui.styles.typography.Typography 8 | 9 | fun createTypography(palette: Palette, typography: Typography) = rawCreateTypography(palette, typography) 10 | fun createTypography(palette: Palette, typography: (Palette) -> Typography) = rawCreateTypography(palette, typography) 11 | -------------------------------------------------------------------------------- /core/src/main/kotlin/materialui/styles/makeStyles.kt: -------------------------------------------------------------------------------- 1 | package materialui.styles 2 | 3 | import kotlinext.js.js 4 | import materialui.rawMakeStyles 5 | import materialui.styles.muitheme.MuiTheme 6 | import react.* 7 | 8 | @Suppress("UNCHECKED_CAST") 9 | fun