Components renaming (#225)

* refactor: eslint config adjusted for better diff's

* refactor: stricter linting
 + dependencies updated

* refactoring: paragraph component
 - component
 - docs

* refactoring: heading component
 - component
 - docs

* Update docs/components/heading.md

Co-authored-by: Ilya Artamonov <ilya.sosidka@gmail.com>

* refactoring: link component
 - component
 - docs

* refactoring: image component
 - component
 - docs

* refactoring: alert component
 - component
 - docs

* refactoring: avatar component
 - component
 - docs

* refactoring: removed unnecessary code
    - component names come from the file name

* refactoring: breadcrumb component
 - component
 - docs

* refactoring: accordion component
 - component
 - docs

* refactoring: buttom component
 - component
 - docs

* refactoring: badge component
 - component
 - docs

* refactoring: card component
 - component
 - docs

* refactoring: order of components in docs updated

* refactoring: unnecessary semicolons removed

* refactoring: button group component
 - component
 - docs

* refactoring: carousel component
 - component
 - docs

* refactoring: dropdown component
 - component
 - docs

* refactoring: footer component
 - component
 - docs

* refactoring:list-group component
 - component
 - docs

* refactoring: modal component
 - component
 - docs

* refactoring: navbar component
 - component
 - docs

* refactoring: pagination component
 - component
 - docs

* refactoring: progress component
 - component
 - docs

* refactoring: rating component
 - component
 - docs

* refactoring: spinner component
 - component
 - docs

* refactoring: table component
 - component
 - docs

* refactoring: tabs component
 - component
 - docs

* feat: Updated pagination examples

* lint: Lister fixes

* feat: Sidebar component and some fixes

* feat: Input component

* feat: Some fixes

* feat: Some fixes

* chore: update deps

* refactor: removed old Modal component

* refactor: radio component and some fixes

* fix: fixed path error

* refactor: Range component

* refactoring: timeline component
 - component
 - docs

* refactor: Select component

* refactoring: toast component
 - component
 - docs

* refactoring: tooltip component
 - component
 - docs

* refactoring: sidebar component
 - component
 - docs

* refactoring: input component
 - component
 - docs

* refactoring: fileInput component
 - component
 - docs

* refactoring: select component
 - component
 - docs

* refactoring: textarea component
 - component
 - docs

* refactoring: checkbox component
 - component
 - docs

* refactoring: radio component
 - component
 - docs

* refactoring: toggle component
 - component
 - docs

* refactoring: range component
 - component
 - docs

* local configs linted

* documentation quick start updated

* flowbite-themable refactored to fit new linters and style guide

* random linter fixes

* refactoring: toast-provider component
 - component
 - docs

* final linter fixes

* lint: Linter fixes

* fix: Fixed types

* fix: Fixed card component

* docs: Updated card examples

* fix: Fixed tabs

* refactor: Heading component refactoring

* Fwb rename - few fixes after component review (#237)

* fix: button documentation

* fix: model type in range examples

* chore: Toast marked as WIP

---------

Co-authored-by: Sqrcz <naorniakowski@slashlab.pl>
Co-authored-by: Sqrcz <naorniakowski@gmail.com>
This commit is contained in:
Ilya Artamonov
2023-10-23 18:23:14 +03:00
committed by GitHub
parent ea6fcf1a4c
commit d316cf3a12
600 changed files with 16349 additions and 10239 deletions

View File

@@ -1,9 +1,9 @@
<script setup>
import BadgeTypesExample from './badge/examples/BadgeTypesExample.vue'
import BadgeSizesExample from './badge/examples/BadgeSizesExample.vue'
import BadgeLinksExample from './badge/examples/BadgeLinksExample.vue'
import BadgeIconsExample from './badge/examples/BadgeIconsExample.vue'
import BadgeOnlyIconsExample from './badge/examples/BadgeOnlyIconsExample.vue'
import FwbBadgeExample from './badge/examples/FwbBadgeExample.vue'
import FwbBadgeExampleSize from './badge/examples/FwbBadgeExampleSize.vue'
import FwbBadgeExampleLink from './badge/examples/FwbBadgeExampleLink.vue'
import FwbBadgeExampleIcon from './badge/examples/FwbBadgeExampleIcon.vue'
import FwbBadgeExampleIconOnly from './badge/examples/FwbBadgeExampleIconOnly.vue'
</script>
# Vue Badge - Flowbite
@@ -17,98 +17,127 @@ Original reference: [https://flowbite.com/docs/components/badge/](https://flowbi
The badge component can be used to complement other elements such as buttons or text elements as a label or to show the count of a given data, such as the number of comments for an article or how much time has passed by since a comment has been made.
Alternatively, badges can also be used as standalone elements that link to a certain page by using the anchor tag instead of a span element.
## Default badge
Prop type
<BadgeTypesExample />
<fwb-badge-example />
```vue
<script setup>
import { Badge } from 'flowbite-vue'
</script>
<template>
<Badge />
<Badge type="dark" />
<Badge type="red" />
<Badge type="green" />
<Badge type="yellow" />
<Badge type="indigo" />
<Badge type="purple" />
<Badge type="pink" />
<fwb-badge>Default</fwb-badge>
<fwb-badge type="dark">Dark</fwb-badge>
<fwb-badge type="red">Red</fwb-badge>
<fwb-badge type="green">Green</fwb-badge>
<fwb-badge type="yellow">Yellow</fwb-badge>
<fwb-badge type="indigo">Indigo</fwb-badge>
<fwb-badge type="purple">Purple</fwb-badge>
<fwb-badge type="pink">Pink</fwb-badge>
</template>
<script setup>
import { FwbBadge } from 'flowbite-vue'
</script>
```
## Large badges
Prop size
<BadgeSizesExample />
<fwb-badge-example-size />
```vue
<script setup>
import { Badge } from 'flowbite-vue'
</script>
<template>
<Badge />
<Badge type="dark" />
<Badge type="red" />
<Badge type="green" />
<Badge type="yellow" />
<Badge type="indigo" />
<Badge type="purple" />
<Badge type="pink" />
<fwb-badge size="xs">Default</fwb-badge>
<fwb-badge size="xs" type="dark">Dark</fwb-badge>
<fwb-badge size="xs" type="red">Red</fwb-badge>
<fwb-badge size="xs" type="green">Green</fwb-badge>
<fwb-badge size="sm" type="yellow">Yellow</fwb-badge>
<fwb-badge size="sm" type="indigo">Indigo</fwb-badge>
<fwb-badge size="sm" type="purple">Purple</fwb-badge>
<fwb-badge size="sm" type="pink">Pink</fwb-badge>
</template>
<script setup>
import { FwbBadge } from 'flowbite-vue'
</script>
```
## Badges as links
You can also use badges as anchor elements to link to another page.
Prop href
<fwb-badge-example-link />
```vue
<script setup>
import { Badge } from 'flowbite-vue'
</script>
<template>
<Badge href="#">Link</Badge>
<fwb-badge href="#">
Link
</fwb-badge>
<fwb-badge href="#" size="sm">
Link small
</fwb-badge>
</template>
```
<BadgeLinksExample />
<script setup>
import { FwbBadge } from 'flowbite-vue'
</script>
```
## Badges with icon
You can also use SVG icons inside the badge elements.
slot icon
<fwb-badge-example-icon />
```vue
<script setup>
import { Badge } from 'flowbite-vue'
</script>
<template>
<Badge>
<template #icon>
<svg aria-hidden="true" class="mr-1 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clip-rule="evenodd"></path></svg>
</template>
Default
</Badge>
<fwb-badge>
<template #icon>
<svg aria-hidden="true" class="mr-1 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" fill-rule="evenodd" />
</svg>
</template>
Default
</fwb-badge>
<fwb-badge size="sm" type="dark">
<template #icon>
<svg aria-hidden="true" class="mr-1 w-3 h-3" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" fill-rule="evenodd" />
</svg>
</template>
Dark
</fwb-badge>
</template>
```
<BadgeIconsExample />
<script setup>
import { FwbBadge } from 'flowbite-vue'
</script>
```
## Badge with icon only
<fwb-badge-example-icon-only />
```vue
<script setup>
import { Badge } from 'flowbite-vue'
</script>
<template>
<Badge>
<template #icon>
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" clip-rule="evenodd"></path></svg>
</template>
</Badge>
<fwb-badge>
<template #icon>
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" fill-rule="evenodd" />
</svg>
</template>
</fwb-badge>
<fwb-badge type="dark">
<template #icon>
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" fill-rule="evenodd" />
</svg>
</template>
</fwb-badge>
<fwb-badge size="sm" type="green">
<template #icon>
<svg aria-hidden="true" class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path clip-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm1-12a1 1 0 10-2 0v4a1 1 0 00.293.707l2.828 2.829a1 1 0 101.415-1.415L11 9.586V6z" fill-rule="evenodd" />
</svg>
</template>
</fwb-badge>
</template>
```
<BadgeOnlyIconsExample />
<script setup>
import { FwbBadge } from 'flowbite-vue'
</script>
```