Esempio n. 1
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            if (ColumnSize != null)
            {
                builder.Append(ColumnSize.Class(ClassProvider));
            }

            base.BuildClasses(builder);
        }
Esempio n. 2
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            // Only add column classname if there are no custom sizes defined!
            // If any provider need to have base classname then it needs to add
            // it in ClassProvider.Column(...) builder.
            builder.Append(ClassProvider.Column(ColumnSize?.HasSizes == true));

            base.BuildClasses(builder);
        }
Esempio n. 3
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Button());
            builder.Append(ClassProvider.ButtonColor(Color), Color != Color.Default && !Outline);
            builder.Append(ClassProvider.ButtonOutline(Color), Color != Color.Default && Outline);
            builder.Append(ClassProvider.ButtonSize(ThemeSize), ThemeSize != Blazorise.Size.Default);
            builder.Append(ClassProvider.ButtonBlock(), Block);
            builder.Append(ClassProvider.ButtonActive(), Active);
            builder.Append(ClassProvider.ButtonDisabled(), Disabled);
            builder.Append(ClassProvider.ButtonLoading(), Loading && LoadingTemplate == null);

            base.BuildClasses(builder);
        }
Esempio n. 4
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append("b-table");
            builder.Append(ClassProvider.Table());
            builder.Append(ClassProvider.TableFullWidth(), FullWidth);
            builder.Append(ClassProvider.TableStriped(), Striped);
            builder.Append(ClassProvider.TableBordered(), Bordered);
            builder.Append(ClassProvider.TableHoverable(), Hoverable);
            builder.Append(ClassProvider.TableNarrow(), Narrow);
            builder.Append(ClassProvider.TableBorderless(), Borderless);

            base.BuildClasses(builder);
        }
Esempio n. 5
0
        /// <summary>
        /// Builds a list of classnames for this component.
        /// </summary>
        /// <param name="builder">Class builder used to append the classnames.</param>
        protected virtual void BuildClasses(ClassBuilder builder)
        {
            if (Class != null)
            {
                builder.Append(Class);
            }

            if (Margin != null)
            {
                builder.Append(Margin.Class(ClassProvider));
            }

            if (Padding != null)
            {
                builder.Append(Padding.Class(ClassProvider));
            }

            if (Display != null)
            {
                builder.Append(Display.Class(ClassProvider));
            }

            if (Float != Float.None)
            {
                builder.Append(ClassProvider.ToFloat(Float));
            }

            if (Casing != CharacterCasing.Normal)
            {
                builder.Append(ClassProvider.Casing(Casing));
            }
        }
Esempio n. 6
0
        protected virtual void BuildClasses(ClassBuilder builder)
        {
            if (Class != null)
            {
                builder.Append(Class);
            }

            if (Margin != null)
            {
                builder.Append(Margin.Class(ClassProvider));
            }

            if (Padding != null)
            {
                builder.Append(Padding.Class(ClassProvider));
            }

            if (Float != Float.None)
            {
                builder.Append(ClassProvider.ToFloat(Float));
            }
        }
Esempio n. 7
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Button());
            builder.Append(ClassProvider.ButtonColor(Color), Color != Color.None && !Outline);
            builder.Append(ClassProvider.ButtonOutline(Color), Color != Color.None && Outline);
            builder.Append(ClassProvider.ButtonSize(Size), Size != Size.None);
            builder.Append(ClassProvider.ButtonBlock(), Block);
            builder.Append(ClassProvider.ButtonActive(), Active);
            builder.Append(ClassProvider.ButtonLoading(), Loading && LoadingTemplate == null);

            base.BuildClasses(builder);
        }
Esempio n. 8
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Alert());
            builder.Append(ClassProvider.AlertColor(Color), Color != Color.None);
            builder.Append(ClassProvider.AlertDismisable(), Dismisable);
            builder.Append(ClassProvider.AlertFade(), Dismisable);
            builder.Append(ClassProvider.AlertShow(), Dismisable && Visible);
            builder.Append(ClassProvider.AlertHasMessage(), hasMessage);
            builder.Append(ClassProvider.AlertHasDescription(), hasDescription);

            base.BuildClasses(builder);
        }
Esempio n. 9
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Button());
            builder.Append(ClassProvider.ButtonColor(Color), Color != Color.None && !IsOutline);
            builder.Append(ClassProvider.ButtonOutline(Color), Color != Color.None && IsOutline);
            builder.Append(ClassProvider.ButtonSize(Size), Size != ButtonSize.None);
            builder.Append(ClassProvider.ButtonBlock(), IsBlock);
            builder.Append(ClassProvider.ButtonActive(), IsActive);
            builder.Append(ClassProvider.ButtonLoading(), IsLoading);

            base.BuildClasses(builder);
        }
Esempio n. 10
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Dropdown());
            builder.Append(ClassProvider.DropdownGroup(), IsGroup);
            builder.Append(ClassProvider.DropdownShow(), Visible);
            builder.Append(ClassProvider.DropdownRight(), RightAligned);
            builder.Append(ClassProvider.DropdownDirection(Direction), Direction != Direction.Down);
            builder.Append(ClassProvider.DropdownTableResponsive(), InResponsiveTable);

            base.BuildClasses(builder);
        }
Esempio n. 11
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Tabs());
            builder.Append(ClassProvider.TabsCards(), IsCards);
            builder.Append(ClassProvider.TabsPills(), Pills);
            builder.Append(ClassProvider.TabsFullWidth(), FullWidth);
            builder.Append(ClassProvider.TabsJustified(), Justified);
            builder.Append(ClassProvider.TabsVertical(), TabPosition == TabPosition.Left || TabPosition == TabPosition.Right);

            base.BuildClasses(builder);
        }
Esempio n. 12
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.DropdownToggle(ParentDropdown?.IsDropdownSubmenu == true));
            builder.Append(ClassProvider.DropdownToggleColor(Color), Color != Color.Default && !Outline);
            builder.Append(ClassProvider.DropdownToggleOutline(Color), Color != Color.Default && Outline);
            builder.Append(ClassProvider.DropdownToggleSize(ThemeSize), ThemeSize != Blazorise.Size.Default);
            builder.Append(ClassProvider.DropdownToggleSplit(), Split);
            builder.Append(ClassProvider.DropdownToggleIcon(IsToggleIconVisible));

            base.BuildClasses(builder);
        }
Esempio n. 13
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Bar());
            builder.Append(ClassProvider.BarInitial(initial && Mode != BarMode.Horizontal));
            builder.Append(ClassProvider.BarThemeContrast(ThemeContrast), ThemeContrast != ThemeContrast.None);
            builder.Append(ClassProvider.BarBreakpoint(Breakpoint), Breakpoint != Breakpoint.None);
            builder.Append(ClassProvider.FlexAlignment(Alignment), Alignment != Alignment.None);
            builder.Append(ClassProvider.BarMode(Mode));

            base.BuildClasses(builder);
        }
Esempio n. 14
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Bar());
            builder.Append(ClassProvider.BarBackground(Background), Background != Background.None);
            builder.Append(ClassProvider.BarThemeContrast(ThemeContrast), ThemeContrast != ThemeContrast.None);
            builder.Append(ClassProvider.BarBreakpoint(Breakpoint), Breakpoint != Breakpoint.None);
            builder.Append(ClassProvider.FlexAlignment(Alignment), Alignment != Alignment.None);
            builder.Append(ClassProvider.BarMode(Mode));

            base.BuildClasses(builder);
        }
Esempio n. 15
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.TableRow());
            builder.Append(ClassProvider.TableRowColor(Color), Color != Color.None);
            builder.Append(ClassProvider.TableRowBackground(Background), Background != Background.None);
            builder.Append(ClassProvider.TableRowTextColor(TextColor), TextColor != TextColor.None);
            builder.Append(ClassProvider.TableRowIsSelected(), Selected);
            builder.Append(ClassProvider.TableRowHoverCursor(), HoverCursor != Cursor.Default);

            base.BuildClasses(builder);
        }
Esempio n. 16
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Tooltip());
            builder.Append(ClassProvider.TooltipPlacement(Placement));
            builder.Append(ClassProvider.TooltipMultiline(), Multiline);
            builder.Append(ClassProvider.TooltipAlwaysActive(), AlwaysActive);
            builder.Append(ClassProvider.TooltipInline(), Inline);
            builder.Append(ClassProvider.TooltipFade(), Fade);

            base.BuildClasses(builder);
        }
Esempio n. 17
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.CarouselSlide());
            builder.Append(ClassProvider.CarouselSlideActive(Active));
            builder.Append(ClassProvider.CarouselSlideSlidingLeft(Left));
            builder.Append(ClassProvider.CarouselSlideSlidingRight(Right));
            builder.Append(ClassProvider.CarouselSlideSlidingPrev(Prev));
            builder.Append(ClassProvider.CarouselSlideSlidingNext(Next));

            base.BuildClasses(builder);
        }
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.DropdownToggle());
            builder.Append(ClassProvider.DropdownToggleColor(Color), Color != Color.None && !Outline);
            builder.Append(ClassProvider.DropdownToggleOutline(Color), Color != Color.None && Outline);
            builder.Append(ClassProvider.DropdownToggleSize(ThemeSize), ThemeSize != Blazorise.Size.None);
            builder.Append(ClassProvider.DropdownToggleSplit(), Split);
            builder.Append(ClassProvider.DropdownToggleIcon(IsToggleIconVisible));

            base.BuildClasses(builder);
        }
Esempio n. 19
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.ControlCheck(), Role == ControlRole.Check);
            builder.Append(ClassProvider.ControlRadio(), Role == ControlRole.Radio);
            builder.Append(ClassProvider.ControlSwitch(), Role == ControlRole.Switch);
            builder.Append(ClassProvider.ControlFile(), Role == ControlRole.File);
            builder.Append(ClassProvider.ControlText(), Role == ControlRole.Text);
            builder.Append(ClassProvider.CheckInline(), Inline);

            base.BuildClasses(builder);
        }
Esempio n. 20
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Nav());
            builder.Append(ClassProvider.NavTabs(), Tabs);
            builder.Append(ClassProvider.NavCards(), Cards);
            builder.Append(ClassProvider.NavPills(), Pills);
            builder.Append(ClassProvider.NavVertical(), Vertical);
            builder.Append(ClassProvider.NavFill(Fill), Fill != NavFillType.None);

            base.BuildClasses(builder);
        }
Esempio n. 21
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Tabs());
            builder.Append(ClassProvider.TabsCards(), IsCards);
            builder.Append(ClassProvider.TabsPills(), IsPills);
            builder.Append(ClassProvider.TabsFullWidth(), IsFullWidth);
            builder.Append(ClassProvider.TabsJustified(), IsJustified);
            builder.Append(ClassProvider.TabsVertical(), IsVertical);

            base.BuildClasses(builder);
        }
Esempio n. 22
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Switch());
            builder.Append(ClassProvider.SwitchColor(Color), Color != Color.None);
            builder.Append(ClassProvider.SwitchSize(Size), Size != Size.None);
            builder.Append(ClassProvider.SwitchChecked(IsChecked));
            builder.Append(ClassProvider.SwitchCursor(Cursor), Cursor != Cursor.Default);
            builder.Append(ClassProvider.SwitchValidation(ParentValidation?.Status ?? ValidationStatus.None), ParentValidation?.Status != ValidationStatus.None);

            base.BuildClasses(builder);
        }
Esempio n. 23
0
        /// <summary>
        /// Builds the classnames for a progress bar.
        /// </summary>
        /// <param name="builder">Class builder used to append the classnames.</param>
        private void BuildProgressBarClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.ProgressBar());
            builder.Append(ClassProvider.ProgressBarColor(Color), Color != Color.Default);
            builder.Append(ClassProvider.ProgressBarWidth(Percentage ?? 0));
            builder.Append(ClassProvider.ProgressBarStriped(), Striped);
            builder.Append(ClassProvider.ProgressBarAnimated(), Animated);

            if (ThemeSize != Blazorise.Size.Default)
            {
                builder.Append(ClassProvider.ProgressBarSize(ThemeSize));
            }
        }
Esempio n. 24
0
        /// <inheritdoc/>
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.ProgressBar());
            builder.Append(ClassProvider.ProgressBarColor(Color), Color != Color.Default);
            builder.Append(ClassProvider.ProgressBarWidth(Percentage ?? 0));
            builder.Append(ClassProvider.ProgressBarStriped(), Striped);
            builder.Append(ClassProvider.ProgressBarAnimated(), Animated);

            if (ParentProgress?.ThemeSize != Size.Default)
            {
                builder.Append(ClassProvider.ProgressBarSize(ParentProgress.ThemeSize));
            }

            base.BuildClasses(builder);
        }
Esempio n. 25
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.Inline());

            base.BuildClasses(builder);
        }
Esempio n. 26
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.FieldBody());

            base.BuildClasses(builder);
        }
Esempio n. 27
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.TabsContent());

            base.BuildClasses(builder);
        }
Esempio n. 28
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.AlertMessage());

            base.BuildClasses(builder);
        }
Esempio n. 29
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.ColorEdit());

            base.BuildClasses(builder);
        }
Esempio n. 30
0
        protected override void BuildClasses(ClassBuilder builder)
        {
            builder.Append(ClassProvider.LayoutSider());

            base.BuildClasses(builder);
        }