@kitconcept/volto-light-theme 7.0.0-alpha.10 → 7.0.0-alpha.11

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/.changelog.draft CHANGED
@@ -1,7 +1,15 @@
1
- ## 7.0.0-alpha.10 (2025-06-10)
1
+ ## 7.0.0-alpha.11 (2025-06-12)
2
2
 
3
3
  ### Bugfix
4
4
 
5
- - Fixed Person Teaser top variant. Added Storybook. @sneridagh
5
+ - Do not show sticky menu in add view. @sneridagh
6
+ - Fix aspect ratio for images in file grid teaser block @iRohitSingh
7
+ - Fixed position of sticky menu for small screens. @sneridagh
8
+
9
+ ### Internal
10
+
11
+ - Added visual regression tests for Storybook stories. @sneridagh [#576](https://github.com/kitconcept/volto-light-theme/pull/576)
12
+ - Upgrade to Volto 18.23.0 @sneridagh
13
+ - Use `vitest` for unit tests. @sneridagh
6
14
 
7
15
 
package/CHANGELOG.md CHANGED
@@ -8,6 +8,20 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 7.0.0-alpha.11 (2025-06-12)
12
+
13
+ ### Bugfix
14
+
15
+ - Do not show sticky menu in add view. @sneridagh
16
+ - Fix aspect ratio for images in file grid teaser block @iRohitSingh
17
+ - Fixed position of sticky menu for small screens. @sneridagh
18
+
19
+ ### Internal
20
+
21
+ - Added visual regression tests for Storybook stories. @sneridagh [#576](https://github.com/kitconcept/volto-light-theme/pull/576)
22
+ - Upgrade to Volto 18.23.0 @sneridagh
23
+ - Use `vitest` for unit tests. @sneridagh
24
+
11
25
  ## 7.0.0-alpha.10 (2025-06-10)
12
26
 
13
27
  ### Bugfix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitconcept/volto-light-theme",
3
- "version": "7.0.0-alpha.10",
3
+ "version": "7.0.0-alpha.11",
4
4
  "description": "Volto Light Theme by kitconcept",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -32,11 +32,16 @@
32
32
  "devDependencies": {
33
33
  "@plone/scripts": "^3.6.2",
34
34
  "@storybook/react": "^8.6.12",
35
+ "@testing-library/cypress": "10.0.3",
36
+ "@testing-library/react": "^16.2.0",
35
37
  "@types/jest": "^29.5.8",
36
38
  "@types/lodash": "^4.14.201",
39
+ "@types/node": "^22",
37
40
  "@types/react": "^18.3.12",
38
41
  "@types/react-dom": "^18.3.1",
42
+ "typescript": "^5.7.3",
39
43
  "release-it": "^19.0.3",
44
+ "vitest": "^3.1.2",
40
45
  "@plone/types": "1.4.5"
41
46
  },
42
47
  "dependencies": {
@@ -19,35 +19,36 @@ const meta = {
19
19
  export default meta;
20
20
  type Story = StoryObj<typeof meta>;
21
21
 
22
- export const PersonListing: Story = {
22
+ export const Person: Story = {
23
23
  render: (args) => (
24
- <Wrapper>
25
- <div style={{ width: 'var(--default-container-width)' }}>
26
- <BlockWrapper {...args}>
27
- <div className="block listing">
28
- <ListingBody {...args} />
29
- </div>
30
- </BlockWrapper>
24
+ <BlockWrapper {...args}>
25
+ <div className="block listing">
26
+ <ListingBody {...args} />
31
27
  </div>
32
- </Wrapper>
28
+ </BlockWrapper>
33
29
  ),
34
30
  args: {
35
31
  data: listingBlockPerson,
36
32
  listingItems: listingBlockPerson.items,
37
33
  },
34
+ decorators: [
35
+ (Story) => (
36
+ <Wrapper>
37
+ <div style={{ width: 'var(--default-container-width)' }}>
38
+ <Story />
39
+ </div>
40
+ </Wrapper>
41
+ ),
42
+ ],
38
43
  };
39
44
 
40
- export const PersonListingSummary: Story = {
45
+ export const PersonSummary: Story = {
41
46
  render: (args) => (
42
- <Wrapper>
43
- <div style={{ width: 'var(--default-container-width)' }}>
44
- <BlockWrapper {...args}>
45
- <div className="block listing summary">
46
- <ListingBody {...args} />
47
- </div>
48
- </BlockWrapper>
47
+ <BlockWrapper {...args}>
48
+ <div className="block listing summary">
49
+ <ListingBody {...args} />
49
50
  </div>
50
- </Wrapper>
51
+ </BlockWrapper>
51
52
  ),
52
53
  args: {
53
54
  data: {
@@ -60,4 +61,13 @@ export const PersonListingSummary: Story = {
60
61
  title: 'List with images',
61
62
  },
62
63
  },
64
+ decorators: [
65
+ (Story) => (
66
+ <Wrapper>
67
+ <div style={{ width: 'var(--default-container-width)' }}>
68
+ <Story />
69
+ </div>
70
+ </Wrapper>
71
+ ),
72
+ ],
63
73
  };
@@ -53,7 +53,7 @@ export const Right: Story = {
53
53
  },
54
54
  };
55
55
 
56
- export const Center: Story = {
56
+ export const Top: Story = {
57
57
  render: (args) => (
58
58
  <Wrapper>
59
59
  <div style={{ width: 'var(--default-container-width)' }}>
@@ -73,7 +73,7 @@ export const Center: Story = {
73
73
  },
74
74
  };
75
75
 
76
- export const PersonTeaser: Story = {
76
+ export const PersonTeaserLeft: Story = {
77
77
  render: (args) => (
78
78
  <Wrapper>
79
79
  <div style={{ width: 'var(--default-container-width)' }}>
@@ -47,6 +47,14 @@
47
47
  a {
48
48
  text-decoration: none;
49
49
  }
50
+ &.file-teaser .card .card-inner .image-wrapper {
51
+ img {
52
+ aspect-ratio: var(
53
+ --file-image-aspect-ratio,
54
+ $aspect-ratio-A4
55
+ ) !important;
56
+ }
57
+ }
50
58
 
51
59
  .teaser-item {
52
60
  height: 100%;
@@ -1,8 +1,15 @@
1
1
  .sticky-menu {
2
2
  position: fixed;
3
3
  z-index: 1000;
4
- top: 373px;
4
+ top: 50vh;
5
5
  right: 0;
6
+ transform: translateY(-50%);
7
+ transition: all 0.2s linear;
8
+
9
+ @media (min-height: 920px) {
10
+ top: 373px;
11
+ transform: none;
12
+ }
6
13
 
7
14
  ul {
8
15
  display: flex;
@@ -45,6 +52,7 @@
45
52
  }
46
53
  }
47
54
 
55
+ body.view-addview .sticky-menu,
48
56
  body.view-editview .sticky-menu {
49
57
  display: none;
50
58
  }
@@ -0,0 +1,13 @@
1
+ import { defineConfig } from 'vitest/config';
2
+ import voltoVitestConfig from '@plone/volto/vitest.config.mjs';
3
+ import path from 'path';
4
+
5
+ export default defineConfig({
6
+ ...voltoVitestConfig,
7
+ resolve: {
8
+ alias: {
9
+ '@plone/volto': path.resolve(__dirname, '../../core/packages/volto/src'), // Add paths accordingly
10
+ // 'promise-file-reader': require.resolve('promise-file-reader') // Add to identify dependency from package
11
+ },
12
+ },
13
+ });