@stack-spot/citric-react 0.25.0 → 0.25.1

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.
@@ -1,7 +1,10 @@
1
1
  import { IconGroup, IconProps as OgIconProps } from '@stack-spot/citric-icons';
2
2
  import { ColorKey } from '@stack-spot/portal-theme';
3
3
  export type IconProps<T extends IconGroup> = Omit<OgIconProps<T>, 'color'> & {
4
- color: ColorKey;
4
+ /**
5
+ * The color for the icon. Can be any color in the theme.
6
+ */
7
+ color?: ColorKey;
5
8
  };
6
9
  /**
7
10
  * Renders an icon based on the properties "icon" and "group".
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/components/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,SAAS,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,QAAQ,CAAA;CAAE,CAAA;AAEhG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,2CAEjF"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/components/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,SAAS,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAC3E;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAC;CAClB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,2CAEjF"}
@@ -23,6 +23,6 @@ import { colorNameToColorVariable } from '../utils/css.js';
23
23
  * ```
24
24
  */
25
25
  export function Icon({ color, style, ...props }) {
26
- return _jsx(OgIcon, { ...props, style: { color: colorNameToColorVariable(color), ...style } });
26
+ return _jsx(OgIcon, { ...props, style: { color: color ? colorNameToColorVariable(color) : undefined, ...style } });
27
27
  }
28
28
  //# sourceMappingURL=Icon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../src/components/Icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,IAAI,IAAI,MAAM,EAA4B,MAAM,0BAA0B,CAAA;AAE9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AAIvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,IAAI,CAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAgB;IAChF,OAAO,KAAC,MAAM,OAAK,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,wBAAwB,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,GAAI,CAAA;AAC3F,CAAC"}
1
+ {"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../src/components/Icon.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,IAAI,IAAI,MAAM,EAA4B,MAAM,0BAA0B,CAAA;AAE9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AASvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,IAAI,CAAsB,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAgB;IAChF,OAAO,KAAC,MAAM,OAAK,KAAK,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,KAAK,EAAE,GAAI,CAAA;AAC/G,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/citric-react",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "author": "StackSpot",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -2,7 +2,12 @@ import { IconGroup, Icon as OgIcon, IconProps as OgIconProps } from '@stack-spot
2
2
  import { ColorKey } from '@stack-spot/portal-theme'
3
3
  import { colorNameToColorVariable } from '../utils/css'
4
4
 
5
- export type IconProps<T extends IconGroup> = Omit<OgIconProps<T>, 'color'> & { color: ColorKey }
5
+ export type IconProps<T extends IconGroup> = Omit<OgIconProps<T>, 'color'> & {
6
+ /**
7
+ * The color for the icon. Can be any color in the theme.
8
+ */
9
+ color?: ColorKey,
10
+ }
6
11
 
7
12
  /**
8
13
  * Renders an icon based on the properties "icon" and "group".
@@ -26,5 +31,5 @@ export type IconProps<T extends IconGroup> = Omit<OgIconProps<T>, 'color'> & { c
26
31
  * ```
27
32
  */
28
33
  export function Icon<T extends IconGroup>({ color, style, ...props }: IconProps<T>) {
29
- return <OgIcon {...props} style={{ color: colorNameToColorVariable(color), ...style }} />
34
+ return <OgIcon {...props} style={{ color: color ? colorNameToColorVariable(color) : undefined, ...style }} />
30
35
  }