bevi-icon 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,45 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { SVGAttributes } from 'react';
3
3
 
4
- export declare const BvIcon: <T extends IconName>({ fallback, height, name, onError, showErrorIcon, title, variant, weight, width, ...props }: BvIconProps<T>) => ReactElement | null;
5
-
6
- declare type BvIconProps<T extends IconName> = {
7
- fallback?: ReactElement;
8
- height?: number;
9
- name: T;
10
- onError?: (error: ErrorInfo) => void;
11
- showErrorIcon?: boolean;
12
- title?: string;
13
- variant?: VariantType<T>;
14
- weight?: WeightType<T>;
15
- width?: number;
16
- } & Omit<SVGAttributes<SVGSVGElement>, "color" | "width" | "height">;
17
-
18
- declare type ErrorInfo = {
19
- type: "not-found" | "invalid-variant" | "fetch-failed" | "parse-failed";
20
- message: string;
21
- details?: string;
22
- };
23
-
24
- declare type GetIconByName<T extends IconName> = Extract<IconRegistry, {
25
- displayName: T;
26
- }>;
27
-
28
- export declare type Icon = {
29
- id: string;
30
- name: string;
31
- displayName: string;
32
- status: "active" | "inactive";
33
- tags: readonly string[];
34
- variants: IconVariants;
35
- metadata: Metadata;
36
- };
37
-
38
- export declare type IconName = IconRegistry["displayName"];
39
-
40
- export declare type IconRegistry = (typeof icons)[number];
41
-
42
- export declare const icons: readonly [{
4
+ export declare const allBvIcons: readonly [{
43
5
  readonly id: "account-box";
44
6
  readonly name: "Account box";
45
7
  readonly displayName: "accountBox";
@@ -4189,12 +4151,40 @@ export declare const icons: readonly [{
4189
4151
  };
4190
4152
  }];
4191
4153
 
4192
- export declare type IconVariants = {
4154
+ export declare const BvIcon: <T extends BvIconName>({ fallback, height, name, onError, showErrorIcon, title, variant, weight, width, ...props }: BvIconProps<T>) => ReactElement | null;
4155
+
4156
+ export declare type BvIconName = BvIconRegistry["displayName"];
4157
+
4158
+ declare type BvIconProps<T extends BvIconName> = {
4159
+ fallback?: ReactElement;
4160
+ height?: number;
4161
+ name: T;
4162
+ onError?: (error: ErrorInfo) => void;
4163
+ showErrorIcon?: boolean;
4164
+ title?: string;
4165
+ variant?: BvVariantType<T>;
4166
+ weight?: WeightType<T>;
4167
+ width?: number;
4168
+ } & Omit<SVGAttributes<SVGSVGElement>, "color" | "width" | "height">;
4169
+
4170
+ export declare type BvIconRegistry = (typeof allBvIcons)[number];
4171
+
4172
+ export declare type BvIconType = {
4173
+ id: string;
4174
+ name: string;
4175
+ displayName: string;
4176
+ status: "active" | "inactive";
4177
+ tags: readonly string[];
4178
+ variants: BvIconVariants;
4179
+ metadata: BvMetadata;
4180
+ };
4181
+
4182
+ export declare type BvIconVariants = {
4193
4183
  variant: readonly ("solid" | "duo" | "dark" | "light")[];
4194
4184
  weight: readonly (400 | 600)[];
4195
4185
  };
4196
4186
 
4197
- export declare type Metadata = {
4187
+ export declare type BvMetadata = {
4198
4188
  createdAt: string;
4199
4189
  updatedAt: string;
4200
4190
  addedIn: string;
@@ -4202,13 +4192,23 @@ export declare type Metadata = {
4202
4192
  iconVersion: string;
4203
4193
  };
4204
4194
 
4205
- export declare type VariantKey = {
4195
+ export declare type BvVariantKey = {
4206
4196
  variant?: string;
4207
4197
  weight?: string;
4208
4198
  };
4209
4199
 
4210
- export declare type VariantType<T extends IconName> = GetIconByName<T>["variants"]["variant"][number];
4200
+ export declare type BvVariantType<T extends BvIconName> = GetIconByName<T>["variants"]["variant"][number];
4201
+
4202
+ declare type ErrorInfo = {
4203
+ type: "not-found" | "invalid-variant" | "fetch-failed" | "parse-failed";
4204
+ message: string;
4205
+ details?: string;
4206
+ };
4207
+
4208
+ declare type GetIconByName<T extends BvIconName> = Extract<BvIconRegistry, {
4209
+ displayName: T;
4210
+ }>;
4211
4211
 
4212
- declare type WeightType<T extends IconName> = GetIconByName<T>["variants"]["weight"][number];
4212
+ declare type WeightType<T extends BvIconName> = GetIconByName<T>["variants"]["weight"][number];
4213
4213
 
4214
4214
  export { }
package/dist/index.js CHANGED
@@ -5705,6 +5705,6 @@ const Ga = {
5705
5705
  };
5706
5706
  export {
5707
5707
  Ua as BvIcon,
5708
- k as icons
5708
+ k as allBvIcons
5709
5709
  };
5710
5710
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bevi-icon",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Biblioteca de ícones da Bevi",
5
5
  "private": false,
6
6
  "type": "module",