@kitconcept/volto-light-theme 8.0.0-alpha.26 → 8.0.0-alpha.28

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,12 +1,8 @@
1
- ## 8.0.0-alpha.26 (2026-05-12)
1
+ ## 8.0.0-alpha.28 (2026-05-15)
2
2
 
3
3
  ### Bugfix
4
4
 
5
- - Fix Mobile layout of social media icons @iRohitSingh [#852](https://github.com/kitconcept/volto-light-theme/pull/852)
6
- - Fix social media icon color @iRohitSingh [#854](https://github.com/kitconcept/volto-light-theme/pull/854)
7
- - Fix loading of inherited site customization fields on error views. @davisagli
8
- - Fixed not working combinations with the richtext-widget in the text-block and updated line-height of ToC block according to figma. @TimoBroeskamp
9
- - Update Volto to 19a36.
10
- See https://github.com/plone/volto/releases/tag/19.0.0-alpha.36 @sneridagh
5
+ - Fix Search icon color changes when changing footer font color @iRohitSingh [#850](https://github.com/kitconcept/volto-light-theme/pull/850)
6
+ - Fix customized ObjectListWidget to support the `schemaExtender` prop. @davisagli
11
7
 
12
8
 
package/CHANGELOG.md CHANGED
@@ -8,6 +8,15 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 8.0.0-alpha.28 (2026-05-15)
12
+
13
+ ### Bugfix
14
+
15
+ - Fix Search icon color changes when changing footer font color @iRohitSingh [#850](https://github.com/kitconcept/volto-light-theme/pull/850)
16
+ - Fix customized ObjectListWidget to support the `schemaExtender` prop. @davisagli
17
+
18
+ ## 8.0.0-alpha.27 (2026-05-12)
19
+
11
20
  ## 8.0.0-alpha.26 (2026-05-12)
12
21
 
13
22
  ### Bugfix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitconcept/volto-light-theme",
3
- "version": "8.0.0-alpha.26",
3
+ "version": "8.0.0-alpha.28",
4
4
  "description": "Volto Light Theme by kitconcept",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -59,8 +59,8 @@
59
59
  "react-aria-components": "^1.17.0",
60
60
  "react-colorful": "^5.6.1",
61
61
  "uuid": "^11.0.0",
62
- "@plone/components": "^4.0.0-alpha.8",
63
- "@kitconcept/volto-bm3-compat": "^1.0.0-alpha.1"
62
+ "@kitconcept/volto-bm3-compat": "^1.0.0-alpha.1",
63
+ "@plone/components": "^4.0.0-alpha.8"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "classnames": "^2.5.1",
@@ -16,10 +16,11 @@ import deleteSVG from '@plone/volto/icons/delete.svg';
16
16
  import addSVG from '@plone/volto/icons/add.svg';
17
17
  import dragSVG from '@plone/volto/icons/drag.svg';
18
18
  import { v4 as uuid } from 'uuid';
19
- import type { BlockConfigBase, Content, JSONSchema } from '@plone/types';
19
+ import type { Content, JSONSchema } from '@plone/types';
20
20
  import type { IntlShape } from 'react-intl';
21
21
  import config from '@plone/volto/registry';
22
22
  import isEmpty from 'lodash/isEmpty';
23
+ import { type DragEndEvent } from '@dnd-kit/core';
23
24
 
24
25
  const messages = defineMessages({
25
26
  labelRemoveItem: {
@@ -114,11 +115,22 @@ export type ObjectListWidgetProps = {
114
115
  */
115
116
  schemaEnhancer?: (args: {
116
117
  schema: JSONSchema & { addMessage: string };
117
- formData: BlockConfigBase;
118
+ formData: object;
118
119
  intl: IntlShape;
119
- navRoot: Content;
120
- contentType: string;
120
+ navRoot?: Content;
121
+ contentType?: string;
121
122
  }) => JSONSchema;
123
+ /**
124
+ * Another optional function to enhance the schema.
125
+ * (Deprecated API with fewer supported arguments.
126
+ * This is here for backwards-compatibility
127
+ * with the ObjectListWidget in Volto.)
128
+ */
129
+ schemaExtender?: (
130
+ schema: JSONSchema,
131
+ formData: object,
132
+ intl: IntlShape,
133
+ ) => JSONSchema;
122
134
  };
123
135
 
124
136
  const EMPTY_SCHEMA = {
@@ -141,14 +153,16 @@ const ObjectListWidget = (props: ObjectListWidgetProps) => {
141
153
  value = [],
142
154
  onChange,
143
155
  schemaEnhancer,
156
+ schemaExtender,
144
157
  schemaName,
145
158
  } = props;
146
159
 
147
160
  const schema =
148
- config.getUtility({
149
- type: 'schema',
150
- name: schemaName,
151
- }).method ||
161
+ (schemaName &&
162
+ config.getUtility({
163
+ type: 'schema',
164
+ name: schemaName,
165
+ }).method) ||
152
166
  props.schema ||
153
167
  EMPTY_SCHEMA;
154
168
 
@@ -170,7 +184,7 @@ const ObjectListWidget = (props: ObjectListWidgetProps) => {
170
184
 
171
185
  const intl = useIntl();
172
186
 
173
- function handleChangeActiveObject(index) {
187
+ function handleChangeActiveObject(index: number) {
174
188
  const newIndex = activeObject === index ? -1 : index;
175
189
 
176
190
  setActiveObject(newIndex);
@@ -178,13 +192,22 @@ const ObjectListWidget = (props: ObjectListWidgetProps) => {
178
192
 
179
193
  const objectSchema =
180
194
  typeof schema === 'function' ? schema({ ...props, activeObject }) : schema;
195
+ const getEnhancedSchema = (data: object) => {
196
+ const enhancedSchema = schemaEnhancer
197
+ ? schemaEnhancer({ schema: objectSchema, formData: data, intl })
198
+ : objectSchema;
199
+ const extendedSchema = schemaExtender
200
+ ? schemaExtender(objectSchema, data, intl)
201
+ : enhancedSchema;
202
+ return extendedSchema;
203
+ };
181
204
 
182
- function handleDragEnd(event) {
205
+ function handleDragEnd(event: DragEndEvent) {
183
206
  const { active, over } = event;
184
207
 
185
- if (active.id !== over.id) {
208
+ if (active.id !== over?.id) {
186
209
  const source = value.findIndex((item) => item['@id'] === active.id);
187
- const destination = value.findIndex((item) => item['@id'] === over.id);
210
+ const destination = value.findIndex((item) => item['@id'] === over?.id);
188
211
 
189
212
  const newValue = reorderArray(value, source, destination);
190
213
  onChange(id, newValue);
@@ -205,13 +228,9 @@ const ObjectListWidget = (props: ObjectListWidgetProps) => {
205
228
  '@id': uuid(),
206
229
  };
207
230
 
208
- const objSchema = schemaEnhancer
209
- ? // @ts-ignore - TODO Make sure this continues to have sense
210
- schemaEnhancer({ schema: objectSchema, formData: data, intl })
211
- : objectSchema;
212
231
  const dataWithDefaults = applySchemaDefaults({
213
232
  data,
214
- schema: objSchema,
233
+ schema: getEnhancedSchema(data),
215
234
  intl,
216
235
  });
217
236
 
@@ -318,16 +337,7 @@ const ObjectListWidget = (props: ObjectListWidgetProps) => {
318
337
  id={`${uid}`}
319
338
  key={`olw-${uid}`}
320
339
  block={block}
321
- schema={
322
- schemaEnhancer
323
- ? // @ts-ignore - TODO Make sure this continues to have sense
324
- schemaEnhancer({
325
- schema: objectSchema,
326
- formData: item,
327
- intl,
328
- })
329
- : objectSchema
330
- }
340
+ schema={getEnhancedSchema(item)}
331
341
  value={item}
332
342
  onChange={(fieldId: string, fieldValue: any) => {
333
343
  const newvalue = value.map((v, i) =>
@@ -1327,7 +1327,7 @@
1327
1327
 
1328
1328
  & > button:not(:hover, :active, :focus) {
1329
1329
  svg path {
1330
- fill: var(--secondary-foreground-color);
1330
+ fill: var(--search-foreground);
1331
1331
  }
1332
1332
  }
1333
1333
  }