@spinnaker/presentation 2026.2.3 → 2026.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/icons/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,WAAW,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAC1C,IAAI,CAAC,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAqBF,eAAO,MAAM,IAAI,2FAAuE,UAAU,iBAehG,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/icons/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,KAAe,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,WAAW,CAAC;AAEjD,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;IAC1C,IAAI,CAAC,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAyBF,eAAO,MAAM,IAAI,2FAAuE,UAAU,iBAehG,CAAC"}
package/dist/index.js CHANGED
@@ -1895,16 +1895,19 @@ const throwInvalidIconError = (name) => {
1895
1895
  const throwInvalidIconComponentError = () => {
1896
1896
  throw new Error('No name or reactComponent provided in Icon props');
1897
1897
  };
1898
+ const normalizeIconComponent = (component) => {
1899
+ return (component === null || component === void 0 ? void 0 : component.ReactComponent) || (component === null || component === void 0 ? void 0 : component.default) || component;
1900
+ };
1898
1901
  const Icon = memo(({ name, reactComponent, appearance, size, color, className }) => {
1899
1902
  let Component;
1900
1903
  if (name) {
1901
- Component = iconsByName[name];
1904
+ Component = normalizeIconComponent(iconsByName[name]);
1902
1905
  if (!Component) {
1903
1906
  throwInvalidIconError(name);
1904
1907
  }
1905
1908
  }
1906
1909
  else {
1907
- Component = reactComponent || throwInvalidIconComponentError();
1910
+ Component = normalizeIconComponent(reactComponent || throwInvalidIconComponentError());
1908
1911
  }
1909
1912
  const width = size ? pxDimensionsBySize[size] || size : pxDimensionsBySize[DEFAULT_SIZE];
1910
1913
  const fill = color ? `var(--color-${color})` : `var(--color-icon-${appearance || DEFAULT_APPEARANCE})`;