@fiscozen/icons 0.1.0 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiscozen/icons",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Design system icon plugin and component",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  "@fiscozen/tsconfig": "^0.1.0"
17
17
  },
18
18
  "dependencies": {
19
- "@awesome.me/kit-8137893ad3": "^1.0.65",
19
+ "@awesome.me/kit-8137893ad3": "^1.0.74",
20
20
  "@fortawesome/fontawesome-svg-core": "^6.5.1",
21
21
  "@fortawesome/vue-fontawesome": "^3.0.6"
22
22
  },
package/src/FzIcon.vue CHANGED
@@ -11,11 +11,31 @@ withDefaults(
11
11
  }>(),
12
12
  { size: 'lg', variant: 'far' }
13
13
  )
14
+ const staticContainerClasses = ['flex', 'items-center', 'justify-center']
15
+ const containerClassSizeMap: Record<IconSize, string> = {
16
+ xs: 'size-[12.5px]',
17
+ sm: 'w-[15px] h-[15px]',
18
+ md: 'w-[20px] h-[20px]',
19
+ lg: 'w-[25px] h-[25px]',
20
+ xl: 'w-[32px] h-[32px]',
21
+ '2xl': 'w-[40px] h-[40px]'
22
+ }
23
+ const iconClassSizeMap: Record<IconSize, string> = {
24
+ xs: 'h-[10px]',
25
+ sm: 'h-[12px]',
26
+ md: 'h-[16px]',
27
+ lg: 'h-[20px]',
28
+ xl: 'h-[24px]',
29
+ '2xl': 'h-[32px]'
30
+ }
14
31
  </script>
15
32
 
16
33
  <template>
17
- <font-awesome-icon
18
- :icon="typeof name === 'string' ? byPrefixAndName[variant][name] : name"
19
- :size="size !== 'md' ? size : undefined"
20
- />
34
+ <div :class="[staticContainerClasses, containerClassSizeMap[size]]">
35
+ <font-awesome-icon
36
+ :class="iconClassSizeMap[size]"
37
+ :icon="typeof name === 'string' ? byPrefixAndName[variant][name] : name"
38
+ :size="size !== 'md' ? size : undefined"
39
+ />
40
+ </div>
21
41
  </template>
package/src/types.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  type IconVariant = 'fas' | 'far' | 'fal' | 'fat' | 'fad' | 'fass' | 'fasr' | 'fasl' | 'fast' | 'fak'
2
- type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
2
+ type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
3
3
 
4
4
  export type { IconVariant, IconSize }