@capra/core 1.5.1 → 1.5.3

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/dist/index.cjs CHANGED
@@ -3427,9 +3427,12 @@ var EmptyState_module_default = {
3427
3427
  };
3428
3428
  //#endregion
3429
3429
  //#region src/components/EmptyState/EmptyState.tsx
3430
+ const NOOP_IMAGE = () => null;
3430
3431
  function lazyLoad(importFn) {
3431
3432
  return react.default.lazy(() => importFn().then((m) => {
3432
- return { default: m[Object.getOwnPropertyNames(m)[0]] };
3433
+ const componentName = Object.getOwnPropertyNames(m).find((name) => name.match(/^[A-Z]/));
3434
+ if (!componentName) return { default: NOOP_IMAGE };
3435
+ return { default: m[componentName] };
3433
3436
  }));
3434
3437
  }
3435
3438
  const ILLUSTRATIONS = {
package/dist/index.d.cts CHANGED
@@ -2,6 +2,7 @@ import * as React$2 from "react";
2
2
  import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
3
3
  import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
4
4
  import { SvgIcon } from "@capra/icons";
5
+ import { SvgLogo } from "@capra/icons/logos";
5
6
 
6
7
  //#region src/utils/stylingOverride.d.ts
7
8
  interface StylingOverrideProps {
@@ -510,9 +511,9 @@ type TagProps = DraggableProps & {
510
511
  */
511
512
  color?: TagColor;
512
513
  /**
513
- * The icon to display in the tag.
514
+ * The icon or logo to display in the tag.
514
515
  */
515
- icon?: SvgIcon;
516
+ icon?: SvgIcon | SvgLogo;
516
517
  /**
517
518
  * The label text to display in the tag.
518
519
  */
package/dist/index.d.mts CHANGED
@@ -2,6 +2,7 @@ import * as React$2 from "react";
2
2
  import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
3
3
  import { SvgIcon } from "@capra/icons";
4
4
  import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
5
+ import { SvgLogo } from "@capra/icons/logos";
5
6
 
6
7
  //#region src/utils/stylingOverride.d.ts
7
8
  interface StylingOverrideProps {
@@ -510,9 +511,9 @@ type TagProps = DraggableProps & {
510
511
  */
511
512
  color?: TagColor;
512
513
  /**
513
- * The icon to display in the tag.
514
+ * The icon or logo to display in the tag.
514
515
  */
515
- icon?: SvgIcon;
516
+ icon?: SvgIcon | SvgLogo;
516
517
  /**
517
518
  * The label text to display in the tag.
518
519
  */
package/dist/index.mjs CHANGED
@@ -3403,9 +3403,12 @@ var EmptyState_module_default = {
3403
3403
  };
3404
3404
  //#endregion
3405
3405
  //#region src/components/EmptyState/EmptyState.tsx
3406
+ const NOOP_IMAGE = () => null;
3406
3407
  function lazyLoad(importFn) {
3407
3408
  return React.lazy(() => importFn().then((m) => {
3408
- return { default: m[Object.getOwnPropertyNames(m)[0]] };
3409
+ const componentName = Object.getOwnPropertyNames(m).find((name) => name.match(/^[A-Z]/));
3410
+ if (!componentName) return { default: NOOP_IMAGE };
3411
+ return { default: m[componentName] };
3409
3412
  }));
3410
3413
  }
3411
3414
  const ILLUSTRATIONS = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capra/core",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "type": "module",
6
6
  "description": "Core React components for the Capra design system",
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "react-aria": "^3.48.0",
36
36
  "react-aria-components": "^1.17.0",
37
- "@capra/icons": "1.6.0"
37
+ "@capra/icons": "1.6.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@ant-design/icons": "4.8.3",
@@ -43,11 +43,11 @@
43
43
  "antd": "4.24.16",
44
44
  "storybook": "^10.4.6",
45
45
  "tsdown": "^0.22.0",
46
- "@private/building": "0.0.3",
47
- "@capra/theme": "1.2.0",
48
- "@private/testing": "0.0.7",
46
+ "@capra/theme": "1.2.1",
47
+ "@private/building": "0.0.4",
48
+ "@private/stories": "0.0.0",
49
49
  "@private/linting": "0.0.0",
50
- "@private/stories": "0.0.0"
50
+ "@private/testing": "0.0.7"
51
51
  },
52
52
  "scripts": {
53
53
  "clean": "rm -rf ./dist",