Skip to content

Commit

Permalink
add new ver
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Shevchik committed Oct 13, 2024
1 parent a729e77 commit e2a1892
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 11 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 0.1.3 (2024-10-13)

### Bugs

- fix BtnSpinnerIcon
- fix CopyBtn

### New

- add specialized::LetCatInIcon
- add specialized::SpinnerIcon

## 0.1.2 (2024-09-30)

### Bugs
Expand Down
61 changes: 58 additions & 3 deletions docs/.vitepress/theme/components/icons/CopyButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,66 @@ function copyComponentName()
success()
}
function prepareBySpecializedClassNameList(): string[]
{
const className = []
if(props.icon.specialized.animateSpin)
{
className.push('animate-spin-slow')
}
if(props.icon.specialized.animateSpinNormal)
{
className.push('animate-spin')
}
if(props.icon.specialized.stroke === 'stroke-bold')
{
className.push('stroke-[6px]')
}
else if(props.icon.specialized.stroke === 'stroke-normal')
{
className.push('stroke-2')
}
else if(props.icon.specialized.stroke === 'stroke-thin')
{
className.push('stroke-1')
}
if(props.icon.specialized.width === 'w-lg')
{
className.push('w-lg')
}
else if(props.icon.specialized.width === 'w-[21px]')
{
className.push('w-[21px]')
}
else
{
className.push('w-3')
}
if(props.icon.specialized.height === 'h-lg')
{
className.push('h-lg')
}
else if(props.icon.specialized.height === 'h-[21px]')
{
className.push('h-[21px]')
}
else
{
className.push('h-3')
}
return className
}
function copyVue()
{
const attrs = ['']
attrs.push('class="w-3 h-3"')
attrs.push(`class="${prepareBySpecializedClassNameList().join(' ')}"`)
const code = [
`import #icon# from '@bitrix24/b24icons-vue/#type#/#icon#'`,
Expand All @@ -72,7 +127,7 @@ function copyVueB24Icon()
const attrs = ['']
attrs.push(`name="${getIconFullName()}"`)
attrs.push('class="w-3 h-3"')
attrs.push(`class="${prepareBySpecializedClassNameList().join(' ')}"`)
const code = [
`import { B24Icon } from '@bitrix24/b24icons-vue'`,
Expand Down
4 changes: 4 additions & 0 deletions docs/.vitepress/theme/components/icons/IconView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ function openSlideover ()
class="size-14"
:class="[
icon.specialized?.animateSpin ? 'animate-spin-slow' : '',
icon.specialized?.animateSpinNormal ? 'animate-spin' : '',
icon.specialized?.stroke === 'stroke-bold' ? 'stroke-[6px]' : '',
icon.specialized?.stroke === 'stroke-normal' ? 'stroke-2' : '',
icon.specialized?.stroke === 'stroke-thin' ? 'stroke-1' : '',
icon.specialized?.width === 'w-lg' ? 'w-lg' : '',
icon.specialized?.height === 'h-lg' ? 'h-lg' : '',
Expand Down
4 changes: 4 additions & 0 deletions docs/.vitepress/theme/components/icons/SlideoverIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ function toUpperFirstChar(value: string): string
class="size-24 text-base-master dark:text-base-200"
:class="[
icon.specialized?.animateSpin ? 'animate-spin-slow' : '',
icon.specialized?.animateSpinNormal ? 'animate-spin' : '',
icon.specialized?.stroke === 'stroke-bold' ? 'stroke-[6px]' : '',
icon.specialized?.stroke === 'stroke-normal' ? 'stroke-2' : '',
icon.specialized?.stroke === 'stroke-thin' ? 'stroke-1' : '',
icon.specialized?.width === 'w-lg' ? 'w-lg' : '',
icon.specialized?.height === 'h-lg' ? 'h-lg' : '',
Expand Down
2 changes: 2 additions & 0 deletions docs/.vitepress/theme/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export type InfoIconRow = {
icon: string,
specialized?: {
animateSpin?: boolean,
animateSpinNormal?: boolean,
stroke?: 'stroke-bold'|'stroke-normal'|'stroke-thin',
width?: 'auto'|'w-lg'|'w-[21px]',
height?: 'auto'|'h-lg'|'h-[21px]',
},
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bitrix24/b24icons",
"version": "0.1.2",
"version": "0.1.3",
"author": "Bitrix",
"license": "MIT",
"description": "Документация: Битрикс24 SVG иконки для разработки веб-приложений",
Expand Down Expand Up @@ -42,7 +42,7 @@
"vue-router": "^4.3.2"
},
"dependencies": {
"@bitrix24/b24icons-vue": "^0.1.1",
"@bitrix24/b24icons-vue": "^0.1.3",
"@headlessui/vue": "^1.7.23",
"@vueuse/core": "^11.1.0",
"fuse.js": "^7"
Expand Down

0 comments on commit e2a1892

Please sign in to comment.