Skip to content

Commit b6177ee

Browse files
committed
- Rename component BsFontAwesome to BsIconFontawesome
- Update component registration - Update CHANGELOG.md - Update typescript doc comments
1 parent 08a7222 commit b6177ee

File tree

7 files changed

+67
-52
lines changed

7 files changed

+67
-52
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
> All notable changes to this project will be documented in this file.
44
55

6+
## v2.1.1
7+
8+
Released: December 04, 2024
9+
10+
### Improvements
11+
12+
- **BsColorPicker**: rename property `outlineModeButton` to `modeButtonOutlined`.
13+
- Rename component **BsFontAwesome** to **BsIconFontawesome** for consistency.
14+
- Improve typescript doc comments.
15+
16+
### Bug Fixes
17+
18+
- **BsTooltip**: fixed bug inconsistent arrow color.
19+
20+
621
## v2.1.0
722

823
Released: December 03, 2024

component.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import type {
2929
BsDivider,
3030
BsDropdownMenu,
3131
BsExpandTransition,
32-
BsFontAwesome,
3332
BsIcon,
33+
BsIconFontawesome,
3434
BsIconSpinner,
3535
BsIconSvg,
3636
BsImageHolder,
@@ -113,8 +113,8 @@ declare module '@vue/runtime-core' {
113113
BsDivider: typeof BsDivider;
114114
BsDropdownMenu: typeof BsDropdownMenu;
115115
BsExpandTransition: typeof BsExpandTransition;
116-
BsFontAwesome: typeof BsFontAwesome;
117116
BsIcon: typeof BsIcon;
117+
BsIconFontawesome: typeof BsIconFontawesome;
118118
BsIconSpinner: typeof BsIconSpinner;
119119
BsIconSvg: typeof BsIconSvg;
120120
BsIconToggle: typeof BsToggleIcon;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-mdbootstrap",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "Bootstrap5 Material Design Components for Vue.js",
55
"author": {
66
"name": "Ahmad Fajar",

scss/banner.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue MDBootstrap v2.1.0
2+
* Vue MDBootstrap v2.1.1
33
* Released under the BSD-3 License.
44
* Copyright Ahmad Fajar (https://ahmadfajar.github.io).
55
*/

src/components/Icon/BsFontAwesome.ts renamed to src/components/Icon/BsIconFontawesome.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
useSvgClasses,
77
} from '@/components/Icon/mixins/svgApi.ts';
88
import type {
9-
TBsFontAwesome,
10-
TFontAwesomeOptionProps,
9+
TBsIconFontawesome,
10+
TIconFontawesomeOptionProps,
1111
TFontAwesomeVariant,
1212
TIconData,
1313
} from '@/components/Icon/types';
@@ -16,8 +16,8 @@ import type { TRecord } from '@/types';
1616
import Helper from '@/utils/Helper.ts';
1717
import { computed, defineComponent, h, onBeforeMount, type Prop, ref, watch } from 'vue';
1818

19-
export default defineComponent<TBsFontAwesome>({
20-
name: 'BsFontAwesome',
19+
export default defineComponent<TBsIconFontawesome>({
20+
name: 'BsIconFontawesome',
2121
props: {
2222
size: iconSizeObjectProp,
2323
variant: {
@@ -32,7 +32,7 @@ export default defineComponent<TBsFontAwesome>({
3232
...iconProps,
3333
},
3434
setup(props) {
35-
const thisProps = props as Readonly<TFontAwesomeOptionProps>;
35+
const thisProps = props as Readonly<TIconFontawesomeOptionProps>;
3636
const szWidth = useSizeWidth(thisProps) || 24;
3737
const szHeight = useSizeHeight(thisProps) || 24;
3838
const svgIcon = ref<TIconData>();

src/components/Icon/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import BsIcon from './BsIcon';
33
import BsIconSvg from './BsIconSvg';
44
import BsIconSpinner from './BsIconSpinner';
55
import BsToggleIcon from './BsToggleIcon';
6-
import BsFontAwesome from './BsFontAwesome';
6+
import BsIconFontawesome from './BsIconFontawesome.ts';
77

88
const BsIconPlugin: ObjectPlugin = {
99
install: (app: App): void => {
1010
app.component(BsIcon.name as string, BsIcon);
1111
app.component(BsIconSvg.name as string, BsIconSvg);
1212
app.component(BsIconSpinner.name as string, BsIconSpinner);
1313
app.component(BsToggleIcon.name as string, BsToggleIcon);
14-
app.component(BsFontAwesome.name as string, BsFontAwesome);
14+
app.component(BsIconFontawesome.name as string, BsIconFontawesome);
1515
// Backward compatibility
1616
app.component('BsIconToggle', BsToggleIcon);
1717
},
1818
};
1919

20-
export { BsIconPlugin, BsIcon, BsIconSvg, BsIconSpinner, BsToggleIcon, BsFontAwesome };
20+
export { BsIconPlugin, BsIcon, BsIconSvg, BsIconSpinner, BsToggleIcon, BsIconFontawesome };

src/components/Icon/types/index.d.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,40 @@ export declare type TIconOptionProps = TSizeOptionProps & {
9595
rotate?: TIconRotation;
9696
};
9797

98+
export declare type TIconFontawesomeOptionProps = TSizeOptionProps & {
99+
/**
100+
* Any valid font awesome icon name.
101+
*
102+
* @see [Font Awesome](https://fontawesome.com/v6/search?o=r&m=free) for details.
103+
*/
104+
icon: string;
105+
/**
106+
* Font Awesome style variant, valid values are: `regular`, `solid`, `light`.
107+
* Default is `solid`.
108+
*/
109+
variant?: TFontAwesomeVariant;
110+
/**
111+
* Font Awesome vendor version. Default is `6.7.1`.
112+
*/
113+
version?: string;
114+
/**
115+
* Apply **pulse** animation to the icon.
116+
*/
117+
pulse?: boolean;
118+
/**
119+
* Apply **spin** animation to the icon.
120+
*/
121+
spin?: boolean;
122+
/**
123+
* Flip the icon, valid values are: `horizontal`, `vertical`, `both`.
124+
*/
125+
flip?: TFlipMode;
126+
/**
127+
* Rotate the icon, valid values are: `90`, `180`, `270`.
128+
*/
129+
rotate?: TIconRotation;
130+
}
131+
98132
export declare type TIconSpinnerOptionProps = {
99133
/**
100134
* The Icon color.
@@ -159,61 +193,27 @@ export declare type TToggleIconOptionProps = {
159193
size?: string | number;
160194
};
161195

162-
export declare type TFontAwesomeOptionProps = TSizeOptionProps & {
163-
/**
164-
* Any valid font awesome icon name.
165-
*
166-
* @see [Font Awesome](https://fontawesome.com/v6/search?o=r&m=free) for details.
167-
*/
168-
icon: string;
169-
/**
170-
* Font Awesome style variant, valid values are: `regular`, `solid`, `light`.
171-
* Default is `solid`.
172-
*/
173-
variant?: TFontAwesomeVariant;
174-
/**
175-
* Font Awesome vendor version. Default is `6.7.1`.
176-
*/
177-
version?: string;
178-
/**
179-
* Apply **pulse** animation to the icon.
180-
*/
181-
pulse?: boolean;
182-
/**
183-
* Apply **spin** animation to the icon.
184-
*/
185-
spin?: boolean;
186-
/**
187-
* Flip the icon, valid values are: `horizontal`, `vertical`, `both`.
188-
*/
189-
flip?: TFlipMode;
190-
/**
191-
* Rotate the icon, valid values are: `90`, `180`, `270`.
192-
*/
193-
rotate?: TIconRotation;
194-
}
195-
196-
export declare type TBsFontAwesome = ComponentObjectPropsOptions<TFontAwesomeOptionProps>;
197-
198196
export declare type TBsIcon = ComponentObjectPropsOptions<TIconOptionProps>;
199197

200198
export declare type TBsIconSvg = ComponentObjectPropsOptions<TIconOptionProps>;
201199

202200
export declare type TBsIconSpinner = ComponentObjectPropsOptions<TIconSpinnerOptionProps>;
203201

202+
export declare type TBsIconFontawesome = ComponentObjectPropsOptions<TIconFontawesomeOptionProps>;
203+
204204
export declare type TBsToggleIcon = ComponentObjectPropsOptions<TToggleIconOptionProps>;
205205

206206
export declare const spinnerSvgData = 'SVG+ML/data';
207207

208-
export declare const BsFontAwesome: {
208+
export declare const BsIcon: {
209209
new (): {
210-
$props: AllowedComponentProps & ComponentCustomProps & VNodeProps & TFontAwesomeOptionProps;
210+
$props: AllowedComponentProps & ComponentCustomProps & VNodeProps & TIconOptionProps;
211211
};
212212
};
213213

214-
export declare const BsIcon: {
214+
export declare const BsIconFontawesome: {
215215
new (): {
216-
$props: AllowedComponentProps & ComponentCustomProps & VNodeProps & TIconOptionProps;
216+
$props: AllowedComponentProps & ComponentCustomProps & VNodeProps & TIconFontawesomeOptionProps;
217217
};
218218
};
219219

0 commit comments

Comments
 (0)