@xh/hoist 71.0.0-SNAPSHOT.1735337947270 → 71.0.0-SNAPSHOT.1735340606080

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.
@@ -2,6 +2,7 @@ import { IconName } from '@fortawesome/fontawesome-svg-core';
2
2
  import { FontAwesomeIconProps } from '@fortawesome/react-fontawesome';
3
3
  import { HoistProps, Intent, Thunkable } from '@xh/hoist/core';
4
4
  import { ReactElement } from 'react';
5
+ import { SetRequired } from 'type-fest';
5
6
  export interface IconProps extends HoistProps, Partial<Omit<FontAwesomeIconProps, 'ref'>> {
6
7
  /** Name of the icon in FontAwesome. */
7
8
  iconName?: IconName;
@@ -53,9 +54,7 @@ export declare const Icon: {
53
54
  * ```
54
55
  * and then pass its string name to this factory: `icon({iconName: 'dream-icon'})`
55
56
  */
56
- icon(opts: IconProps & {
57
- iconName: IconName;
58
- }): any;
57
+ icon(opts: SetRequired<IconProps, 'iconName'>): any;
59
58
  addressCard(p?: IconProps): any;
60
59
  angleDoubleDown(p?: IconProps): any;
61
60
  angleDoubleLeft(p?: IconProps): any;
package/icon/Icon.ts CHANGED
@@ -14,6 +14,7 @@ import {last, pickBy, split, toLower} from 'lodash';
14
14
  import {ReactElement} from 'react';
15
15
  import {iconCmp} from './impl/IconCmp';
16
16
  import {enhanceFaClasses, iconHtml} from './impl/IconHtml';
17
+ import {SetRequired} from 'type-fest';
17
18
 
18
19
  export interface IconProps extends HoistProps, Partial<Omit<FontAwesomeIconProps, 'ref'>> {
19
20
  /** Name of the icon in FontAwesome. */
@@ -96,7 +97,7 @@ export const Icon = {
96
97
  * ```
97
98
  * and then pass its string name to this factory: `icon({iconName: 'dream-icon'})`
98
99
  */
99
- icon(opts: IconProps & {iconName: IconName}): any {
100
+ icon(opts: SetRequired<IconProps, 'iconName'>): any {
100
101
  let {
101
102
  iconName,
102
103
  prefix = 'far',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "71.0.0-SNAPSHOT.1735337947270",
3
+ "version": "71.0.0-SNAPSHOT.1735340606080",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",