diff --git a/package.json b/package.json index 6e732b7b..364c578c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fastybird/web-ui-theme", - "version": "0.7.2", + "version": "0.8.0", "description": "FastyBird basic theme & Vue components for web apps", "keywords": [ "fastybird", diff --git a/src/assets/components/ui/fb-divider.scss b/src/assets/components/ui/fb-divider.scss index ceb11d95..f09b5f25 100644 --- a/src/assets/components/ui/fb-divider.scss +++ b/src/assets/components/ui/fb-divider.scss @@ -1,4 +1,5 @@ @use "sass:math"; +@import "../../variables/colors"; @import "../../variables/screen"; @import "../../variables/texts"; @@ -9,3 +10,5 @@ $divider-size-half: math.ceil(math.div($divider-size, 2)) !default; $divider-margin: 2rem 0; $divider-color: #ddd; $screen-tablet-min: $screen-sm-min; +$screen-gradient-color: $gray-light; +$screen-gradient-bgcolor: transparent; diff --git a/src/components/ui/FbAlert/types.ts b/src/components/ui/FbAlert/types.ts index 4df52272..e75bfe38 100644 --- a/src/components/ui/FbAlert/types.ts +++ b/src/components/ui/FbAlert/types.ts @@ -1,5 +1,5 @@ import { FbUiVariantTypes } from "@/types"; export interface IFbUiAlertProps { - variant: FbUiVariantTypes; + variant?: FbUiVariantTypes; } diff --git a/src/components/ui/FbButton/types.ts b/src/components/ui/FbButton/types.ts index 07260976..1d309e95 100644 --- a/src/components/ui/FbButton/types.ts +++ b/src/components/ui/FbButton/types.ts @@ -6,16 +6,16 @@ import { } from "@/types"; export interface IFbUiButtonProps { - action: string | { [key: string]: any } | null; - actionType: FbUiButtonActionsTypes; - type: FbUiButtonButtonTypes; - size: FbSizeTypes; - variant: FbUiButtonVariantTypes; - block: boolean; - uppercase: boolean; - pill: boolean; - thick: boolean; - active: boolean; - disabled: boolean; - loading: boolean; + action?: string | { [key: string]: any } | null; + actionType?: FbUiButtonActionsTypes; + type?: FbUiButtonButtonTypes; + size?: FbSizeTypes; + variant?: FbUiButtonVariantTypes; + block?: boolean; + uppercase?: boolean; + pill?: boolean; + thick?: boolean; + active?: boolean; + disabled?: boolean; + loading?: boolean; } diff --git a/src/components/ui/FbComponentLoading/types.ts b/src/components/ui/FbComponentLoading/types.ts index 81b44a8b..943c128b 100644 --- a/src/components/ui/FbComponentLoading/types.ts +++ b/src/components/ui/FbComponentLoading/types.ts @@ -1,6 +1,6 @@ import { FbSizeTypes } from "@/types"; export interface IFbUiComponentLoadingProps { - text: string; - size: FbSizeTypes; + text?: string; + size?: FbSizeTypes; } diff --git a/src/components/ui/FbComponentLoadingError/types.ts b/src/components/ui/FbComponentLoadingError/types.ts index 252f7be0..8962e381 100644 --- a/src/components/ui/FbComponentLoadingError/types.ts +++ b/src/components/ui/FbComponentLoadingError/types.ts @@ -1,6 +1,6 @@ import { FbSizeTypes } from "@/types"; export interface IFbUiComponentLoadingErrorProps { - text: string; - size: FbSizeTypes; + text?: string; + size?: FbSizeTypes; } diff --git a/src/components/ui/FbConfirmationWindow/types.ts b/src/components/ui/FbConfirmationWindow/types.ts index f5f779c0..1b3ec9f2 100644 --- a/src/components/ui/FbConfirmationWindow/types.ts +++ b/src/components/ui/FbConfirmationWindow/types.ts @@ -5,14 +5,14 @@ import { } from "@/types"; export interface IFbUiConfirmationWindowProps { - size: FbSizeTypes; - primaryButton: FbUiConfirmationWindowPrimaryButtonTypes; - variant: FbUiVariantTypes; - showYes: boolean; - yesBtnLabel: string; - showNo: boolean; - noBtnLabel: string; - enableClosing: boolean; - transparentBg: boolean; - show: boolean; + size?: FbSizeTypes; + primaryButton?: FbUiConfirmationWindowPrimaryButtonTypes; + variant?: FbUiVariantTypes; + showYes?: boolean; + yesBtnLabel?: string; + showNo?: boolean; + noBtnLabel?: string; + enableClosing?: boolean; + transparentBg?: boolean; + show?: boolean; } diff --git a/src/components/ui/FbDivider/index.scss b/src/components/ui/FbDivider/index.scss index 1ac7075b..6e37131b 100644 --- a/src/components/ui/FbDivider/index.scss +++ b/src/components/ui/FbDivider/index.scss @@ -46,6 +46,37 @@ } } } + + &[data-variant="gradient"] { + height: 1px; + border: 0; + background: $screen-gradient-color; + background: + -webkit-gradient( + linear, + 0 0, + 100% 0, + from($screen-gradient-bgcolor), + to($screen-gradient-bgcolor), + color-stop(50%, $screen-gradient-color) + ); + + &[data-type="vertical"] { + @media (min-width: $screen-tablet-min) { + height: 100%; + width: 1px; + background: + -webkit-gradient( + linear, + 0 100%, + 0 0, + from($screen-gradient-bgcolor), + to($screen-gradient-bgcolor), + color-stop(50%, $screen-gradient-color) + ); + } + } + } } &__content { diff --git a/src/components/ui/FbDivider/index.vue b/src/components/ui/FbDivider/index.vue index d3f1bcbe..59c6dfe1 100644 --- a/src/components/ui/FbDivider/index.vue +++ b/src/components/ui/FbDivider/index.vue @@ -1,6 +1,15 @@