@fiscozen/icons 0.1.38 → 1.0.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # @fiscozen/icons
2
+
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Add FzIconBackground component
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - a26bc2c: Add support to v-color directive
14
+ - 2d4fc5e: Add FzIconBackground component
package/README.md CHANGED
@@ -1,7 +1,33 @@
1
1
  # @fiscozen/icons
2
2
 
3
+ Design system icon components (Font Awesome). For usage documentation and examples, see Storybook (Documentation/Media/FzIcon and Documentation/Media/FzIconBackground).
4
+
5
+ ## FzIcon
6
+
7
+ Base icon component. Renders a single icon with configurable size and variant.
8
+
9
+ | Prop | Type | Default | Description |
10
+ |-----------|----------|---------|-------------|
11
+ | `name` | `string` | required | Font Awesome icon name (e.g. `bell`, `check`). |
12
+ | `size` | `IconSize` | `'lg'` | Size: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. |
13
+ | `variant` | `IconVariant` | `'far'` | Font Awesome style (e.g. `fas`, `far`, `fal`). |
14
+ | `spin` | `boolean` | `false` | Enables spinning animation. |
15
+
16
+ To apply design system text color, use the <code>v-color</code> directive on the component (e.g. <code>&lt;FzIcon v-color:blue="500" /&gt;</code>). The root element is a <code>&lt;span role="presentation"&gt;</code>, so v-color is valid (SPAN is allowed in @fiscozen/style) and the icon can be nested inside <code>&lt;p&gt;</code> or <code>&lt;span&gt;</code> without invalid HTML.
17
+
18
+ ## FzIconBackground
19
+
20
+ Wrapper around FzIcon that adds a configurable background to the icon container (rounded, padded). Same props as FzIcon plus <code>backgroundColor</code>; use when you need an icon with a visible background (e.g. status indicators, badges).
21
+
22
+ | Prop | Type | Default | Description |
23
+ |--------------------|----------|-----------------|-------------|
24
+ | `name` | `string` | required | Font Awesome icon name (e.g. `bell`, `check`). |
25
+ | `size` | `IconSize` | `'lg'` | Size: `xs`, `sm`, `md`, `lg`, `xl`, `2xl`. |
26
+ | `variant` | `IconVariant` | `'far'` | Font Awesome style (e.g. `fas`, `far`, `fal`). |
27
+ | `spin` | `boolean` | `false` | Enables spinning animation. |
28
+ | `backgroundColor` | `string` | `'core-white'` | Tailwind background color token (e.g. core-white, grey-100). Applied as <code>bg-&#123;value&#125;</code>. |
29
+
3
30
  ## Notes
4
31
 
5
- - For the current iteration we decided to ship icons in a bundle (svg + js style), no API or lazy loading is currently happening
6
- - In order to keep the bundle size low we are leveraging the "incon kits" Pro Font Awesome feature, therefore tailoring the icon set that we ship. In order to install the design system users therefore need to configure a `.npmrc` in the application root folder, use the one in this repo as a guideline.
7
- To avoid exposing secrets the Font Awesome Pro token should be configured in a environment variable as `FONTAWESOME_PACKAGE_TOKEN`
32
+ - For the current iteration we decided to ship icons in a bundle (svg + js style), no API or lazy loading is currently happening.
33
+ - To keep the bundle size low we use Font Awesome "icon kits" (Pro), so the shipped set is tailored. Configure `.npmrc` in the app root (see this repo); set `FONTAWESOME_PACKAGE_TOKEN` in the environment for the Pro token.