@ekanos/ui 0.1.3 → 0.1.5
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/README.md +8 -1
- package/dist/icon.d.ts +12 -12
- package/dist/icon.js +2596 -3
- package/dist/styles.css +82 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -186,7 +186,14 @@ import { IconStyleOverrideProvider } from '@ekanos/ui/icon';
|
|
|
186
186
|
```
|
|
187
187
|
|
|
188
188
|
Any glyph Free still doesn't have falls back to a question mark rather than
|
|
189
|
-
vanishing (`--ekanos-icon-fa-fallback`, default `'\f059'`)
|
|
189
|
+
vanishing (`--ekanos-icon-fa-fallback`, default `'\f059'`) — and in
|
|
190
|
+
development, `Icon` / `resolveIcon` / `renderIcon` `console.warn` once per
|
|
191
|
+
distinct name that isn't in Free's set, so you find out from your terminal
|
|
192
|
+
instead of a screenshot review. Check a name yourself with
|
|
193
|
+
`pnpm --filter @ekanos/ui check:fa-free-names` (it verifies the generated
|
|
194
|
+
`src/_impl/fa-free-icon-names.generated.ts` against the installed
|
|
195
|
+
`@fortawesome/fontawesome-free`; run it with `--write` after bumping that
|
|
196
|
+
package).
|
|
190
197
|
|
|
191
198
|
**If you load no Font Awesome at all**, icons do not disappear silently: this
|
|
192
199
|
package's CSS draws a placeholder box (`□`) in their place, so "I forgot the
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentType, CSSProperties, ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
declare const FA_ICON_STYLES: readonly ["solid", "regular", "light", "duotone", "brands"];
|
|
5
5
|
type FaIconStyle = (typeof FA_ICON_STYLES)[number];
|
|
@@ -30,18 +30,18 @@ declare function IconStyleOverrideProvider({ value, children, }: {
|
|
|
30
30
|
children: ReactNode;
|
|
31
31
|
}): React.JSX.Element;
|
|
32
32
|
declare function useIconStyleOverride(): "solid" | "regular" | "light" | "duotone" | null;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
declare function resolveIcon(name: string): IconRenderer;
|
|
40
|
-
/** Ergonomic single-shot renderer for new code. */
|
|
41
|
-
declare function Icon({ name, className, style }: {
|
|
33
|
+
|
|
34
|
+
declare function Icon({ name, className, style, }: {
|
|
35
|
+
name: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
style?: CSSProperties;
|
|
38
|
+
}): React.FunctionComponentElement<{
|
|
42
39
|
name: string;
|
|
43
|
-
} &
|
|
44
|
-
|
|
40
|
+
} & {
|
|
41
|
+
className?: string;
|
|
42
|
+
style?: CSSProperties;
|
|
43
|
+
}>;
|
|
44
|
+
declare function resolveIcon(name: string): IconRenderer;
|
|
45
45
|
declare function renderIcon(name: string | null | undefined, className?: string): React.JSX.Element | null;
|
|
46
46
|
|
|
47
47
|
export { FA_ICON_STYLES, FA_OVERRIDE_STYLES, type FaIconOverrideStyle, type FaIconStyle, Icon, type IconRenderer, IconStyleOverrideProvider, buildFaIconValue, isFaIcon, renderIcon, resolveIcon, useIconStyleOverride };
|