@akinon/ui-layout 1.7.7-rc.0 → 1.7.7

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.
@@ -20,6 +20,11 @@ const __1 = require("..");
20
20
  const iconContainer = utils_1.screen.getByTestId('icon-container');
21
21
  (0, vitest_1.expect)(iconContainer).toHaveClass('akinon-navcard-icon-akinon');
22
22
  });
23
+ (0, vitest_1.it)('renders with ai variant', () => {
24
+ (0, utils_1.render)(React.createElement(__1.NavCard, { title: "Test Title", description: "Test Description", icon: "search", variant: "ai" }));
25
+ const iconContainer = utils_1.screen.getByTestId('icon-container');
26
+ (0, vitest_1.expect)(iconContainer).toHaveClass('akinon-navcard-icon-ai');
27
+ });
23
28
  (0, vitest_1.it)('applies custom background color', () => {
24
29
  const customBackground = '#ff0000';
25
30
  (0, utils_1.render)(React.createElement(__1.NavCard, { title: "Test Title", description: "Test Description", icon: "search", background: customBackground }));
@@ -46,6 +46,20 @@ describe('NavCard', () => {
46
46
  expect(iconContainer).toHaveClass('akinon-navcard-icon-akinon');
47
47
  });
48
48
 
49
+ it('renders with ai variant', () => {
50
+ render(
51
+ <NavCard
52
+ title="Test Title"
53
+ description="Test Description"
54
+ icon="search"
55
+ variant="ai"
56
+ />
57
+ );
58
+
59
+ const iconContainer = screen.getByTestId('icon-container');
60
+ expect(iconContainer).toHaveClass('akinon-navcard-icon-ai');
61
+ });
62
+
49
63
  it('applies custom background color', () => {
50
64
  const customBackground = '#ff0000';
51
65
  render(
@@ -14,6 +14,7 @@ export type * from './types';
14
14
  * - **Color Variants**: Offers a range of predefined color options for theming, including:
15
15
  * - `default`
16
16
  * - `akinon`
17
+ * - `ai`
17
18
  * - **Custom Styling**: Allows additional customizations via the `className` prop.
18
19
  *
19
20
  * Ideal for use in dashboards, navigation menus, or any scenario where visually distinct
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NavCard/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,mBAAmB,SAAS,CAAC;AAE7B;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,OAAO,GAAI,yEAQrB,YAAY,sBAwFd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NavCard/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,mBAAmB,SAAS,CAAC;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,OAAO,GAAI,yEAQrB,YAAY,sBA4Fd,CAAC"}
@@ -22,6 +22,7 @@ const Flex_1 = require("../Flex");
22
22
  * - **Color Variants**: Offers a range of predefined color options for theming, including:
23
23
  * - `default`
24
24
  * - `akinon`
25
+ * - `ai`
25
26
  * - **Custom Styling**: Allows additional customizations via the `className` prop.
26
27
  *
27
28
  * Ideal for use in dashboards, navigation menus, or any scenario where visually distinct
@@ -56,6 +57,9 @@ const NavCard = ({ title, description, icon, variant = 'default', className, bac
56
57
  },
57
58
  [`&${prefixClsWithoutHash}-icon-akinon`]: {
58
59
  background: 'var(--color-akinon-500)'
60
+ },
61
+ [`&${prefixClsWithoutHash}-icon-ai`]: {
62
+ backgroundImage: 'linear-gradient(to bottom, var(--color-azure-450), var(--color-azure-500))'
59
63
  }
60
64
  },
61
65
  [`${prefixClsWithoutHash}-content`]: {
@@ -1,6 +1,6 @@
1
1
  import { IconName } from '@akinon/icons';
2
2
 
3
- export type NavCardColorVariant = 'akinon' | 'default';
3
+ export type NavCardColorVariant = 'akinon' | 'default' | 'ai';
4
4
 
5
5
  export interface NavCardProps {
6
6
  /**
@@ -18,6 +18,11 @@ describe('NavCard', () => {
18
18
  const iconContainer = screen.getByTestId('icon-container');
19
19
  expect(iconContainer).toHaveClass('akinon-navcard-icon-akinon');
20
20
  });
21
+ it('renders with ai variant', () => {
22
+ render(React.createElement(NavCard, { title: "Test Title", description: "Test Description", icon: "search", variant: "ai" }));
23
+ const iconContainer = screen.getByTestId('icon-container');
24
+ expect(iconContainer).toHaveClass('akinon-navcard-icon-ai');
25
+ });
21
26
  it('applies custom background color', () => {
22
27
  const customBackground = '#ff0000';
23
28
  render(React.createElement(NavCard, { title: "Test Title", description: "Test Description", icon: "search", background: customBackground }));
@@ -46,6 +46,20 @@ describe('NavCard', () => {
46
46
  expect(iconContainer).toHaveClass('akinon-navcard-icon-akinon');
47
47
  });
48
48
 
49
+ it('renders with ai variant', () => {
50
+ render(
51
+ <NavCard
52
+ title="Test Title"
53
+ description="Test Description"
54
+ icon="search"
55
+ variant="ai"
56
+ />
57
+ );
58
+
59
+ const iconContainer = screen.getByTestId('icon-container');
60
+ expect(iconContainer).toHaveClass('akinon-navcard-icon-ai');
61
+ });
62
+
49
63
  it('applies custom background color', () => {
50
64
  const customBackground = '#ff0000';
51
65
  render(
@@ -14,6 +14,7 @@ export type * from './types';
14
14
  * - **Color Variants**: Offers a range of predefined color options for theming, including:
15
15
  * - `default`
16
16
  * - `akinon`
17
+ * - `ai`
17
18
  * - **Custom Styling**: Allows additional customizations via the `className` prop.
18
19
  *
19
20
  * Ideal for use in dashboards, navigation menus, or any scenario where visually distinct
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NavCard/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,mBAAmB,SAAS,CAAC;AAE7B;;;;;;;;;;;;;;;;;GAiBG;AAEH,eAAO,MAAM,OAAO,GAAI,yEAQrB,YAAY,sBAwFd,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NavCard/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,mBAAmB,SAAS,CAAC;AAE7B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,OAAO,GAAI,yEAQrB,YAAY,sBA4Fd,CAAC"}
@@ -19,6 +19,7 @@ import { Flex } from '../Flex';
19
19
  * - **Color Variants**: Offers a range of predefined color options for theming, including:
20
20
  * - `default`
21
21
  * - `akinon`
22
+ * - `ai`
22
23
  * - **Custom Styling**: Allows additional customizations via the `className` prop.
23
24
  *
24
25
  * Ideal for use in dashboards, navigation menus, or any scenario where visually distinct
@@ -53,6 +54,9 @@ export const NavCard = ({ title, description, icon, variant = 'default', classNa
53
54
  },
54
55
  [`&${prefixClsWithoutHash}-icon-akinon`]: {
55
56
  background: 'var(--color-akinon-500)'
57
+ },
58
+ [`&${prefixClsWithoutHash}-icon-ai`]: {
59
+ backgroundImage: 'linear-gradient(to bottom, var(--color-azure-450), var(--color-azure-500))'
56
60
  }
57
61
  },
58
62
  [`${prefixClsWithoutHash}-content`]: {
@@ -1,6 +1,6 @@
1
1
  import { IconName } from '@akinon/icons';
2
2
 
3
- export type NavCardColorVariant = 'akinon' | 'default';
3
+ export type NavCardColorVariant = 'akinon' | 'default' | 'ai';
4
4
 
5
5
  export interface NavCardProps {
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akinon/ui-layout",
3
- "version": "1.7.7-rc.0",
3
+ "version": "1.7.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/esm/index.js",
@@ -12,17 +12,22 @@
12
12
  "@ant-design/cssinjs": "^1.24.0",
13
13
  "antd": "^5.27.0",
14
14
  "clsx": "^2.0.0",
15
- "@akinon/icons": "1.3.0-rc.0",
16
- "@akinon/ui-theme": "1.2.5",
17
- "@akinon/ui-typography": "1.2.4"
15
+ "@akinon/icons": "1.2.6",
16
+ "@akinon/ui-typography": "1.2.5",
17
+ "@akinon/ui-theme": "1.2.6"
18
18
  },
19
19
  "devDependencies": {
20
+ "@testing-library/react": "^16.0.0",
21
+ "@vitejs/plugin-react": "^4.0.0",
20
22
  "clean-package": "2.2.0",
21
23
  "copyfiles": "^2.4.1",
24
+ "happy-dom": "^14.0.0",
22
25
  "rimraf": "^5.0.5",
23
26
  "typescript": "*",
24
- "@akinon/typescript-config": "1.1.5",
25
- "@akinon/utils": "1.2.6"
27
+ "vitest": "^3.0.0",
28
+ "@akinon/typescript-config": "1.1.6",
29
+ "@akinon/utils": "1.2.7",
30
+ "@akinon/vitest-config": "1.1.6"
26
31
  },
27
32
  "peerDependencies": {
28
33
  "react": "^18 || ^19",
@@ -44,6 +49,10 @@
44
49
  "build:esm": "tsc --outDir dist/esm",
45
50
  "clean": "rimraf dist/",
46
51
  "copy:files": "copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/esm && copyfiles -u 1 \"src/**/*.!(ts|tsx)\" dist/cjs",
52
+ "test": "vitest",
53
+ "test:coverage": "vitest run --coverage",
54
+ "test:run": "vitest run",
55
+ "test:ui": "vitest --ui",
47
56
  "typecheck": "tsc --noEmit"
48
57
  }
49
58
  }