@tui-cruises/mein-schiff-web-react-component-library 2.2.10 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -2,24 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [2.2.10](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.9...v2.2.10) (2025-09-09)
5
+ ## [3.0.0](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.9...v3.0.0) (2025-09-12)
6
6
 
7
- ### [2.2.9](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.7...v2.2.9) (2025-09-09)
8
-
9
-
10
- ### Bug Fixes
11
-
12
- * **OM-2216:** change pagination icon button size on mobile/tablet according to design (pull request [#6](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/issues/6)) ([6541f91](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/6541f9109995bab9644ddf46682005988bee2255))
13
- * **Pagination:** adjust icon button sizes on mobile/tablet to match design ([c468b10](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/c468b1075f2425fcfa871c3d4459a1b401a61423))
14
- * **Tag:** use text-center (pull request [#7](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/issues/7)) ([f6184d1](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/f6184d1027637018693aef04e2986d36b86521aa))
15
- * typefix ([b7fccaf](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/b7fccaf80e990db4d68b42411c1ce57a6356ad05))
16
-
17
- ### [2.2.8](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.7...v2.2.8) (2025-09-08)
18
7
 
8
+ ### Features
19
9
 
20
- ### Bug Fixes
10
+ * next15 prep ([46b3477](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/46b3477fda31e4bb8b29a12da0a544e620cdbc11))
21
11
 
22
- * **Calendar:** Typefix i18n ([b7fccaf](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/b7fccaf80e990db4d68b42411c1ce57a6356ad05))
12
+ ### [2.2.9](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.8...v2.2.9) (2025-09-08)
23
13
 
24
14
  ### [2.2.7](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.6...v2.2.7) (2025-08-25)
25
15
 
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import dynamic from 'next/dynamic';
2
3
 
3
4
  export const dynamicComponents = {
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import dynamic from 'next/dynamic';
2
3
 
3
4
  export const dynamicComponents = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tui-cruises/mein-schiff-web-react-component-library",
3
- "version": "2.2.10",
3
+ "version": "3.0.0",
4
4
  "main": "./index.tsx",
5
5
  "types": "./index.tsx",
6
6
  "type": "module",
@@ -37,7 +37,6 @@
37
37
  "README.md"
38
38
  ],
39
39
  "dependencies": {
40
- "@next/font": "^13.5.3",
41
40
  "@radix-ui/react-accordion": "^1.1.2",
42
41
  "@radix-ui/react-alert-dialog": "^1.0.4",
43
42
  "@radix-ui/react-checkbox": "^1.0.4",
@@ -56,6 +55,7 @@
56
55
  "@tuic/i18n": "^1.0.0",
57
56
  "@tuic/lib": "^1.0.0",
58
57
  "@tuic/logger": "^1.0.0",
58
+ "@tuic/tailwind-config": "file:/usr/local/var/www/tuic-nextjs-frontend/packages/tailwind-config",
59
59
  "@tuic/tracking": "^1.0.0",
60
60
  "d3": "^7.9.0",
61
61
  "date-fns": "^3.4.0",
@@ -65,11 +65,11 @@
65
65
  "libphonenumber-js": "^1.10.54",
66
66
  "lodash": "^4.17.21",
67
67
  "luxon": "^3.5.0",
68
- "next": "^14.1.3",
69
- "react": "^18.2.0",
68
+ "next": "^15.5.2",
69
+ "react": "^19.1.1",
70
70
  "react-country-flag": "^3.1.0",
71
- "react-day-picker": "^8.10.0",
72
- "react-dom": "^18.2.0",
71
+ "react-day-picker": "^9.9.0",
72
+ "react-dom": "^19.1.1",
73
73
  "react-is": "^18.2.0",
74
74
  "react-slider": "^2.0.6",
75
75
  "react-youtube": "^10.1.0",
@@ -97,8 +97,8 @@
97
97
  "@types/d3": "^7.4.3",
98
98
  "@types/lodash": "^4.17.13",
99
99
  "@types/luxon": "^3.4.2",
100
- "@types/react": "^18.2.48",
101
- "@types/react-is": "^18.2.3",
100
+ "@types/react": "^19.1.12",
101
+ "@types/react-is": "*",
102
102
  "@types/react-slider": "^1.3.6",
103
103
  "autoprefixer": "^10.4.14",
104
104
  "chromatic": "^11.27.0",
@@ -3,11 +3,22 @@ import { ReactElement } from 'react';
3
3
  export const assignDefaultValues = (
4
4
  children: ReactElement[],
5
5
  ): ReactElement[] => {
6
- return children.map((item, idx) => ({
7
- ...item,
8
- props: {
9
- ...item.props,
10
- value: item.props.value ?? `intermediateValue${idx}`,
11
- },
12
- }));
6
+ return children.map((item, idx) => {
7
+ const props = item.props
8
+ ? {
9
+ ...item.props,
10
+ value:
11
+ (item.props &&
12
+ typeof item.props === 'object' &&
13
+ 'value' in item.props
14
+ ? item.props.value
15
+ : undefined) ?? `intermediateValue${idx}`,
16
+ }
17
+ : undefined;
18
+
19
+ return {
20
+ ...item,
21
+ props,
22
+ };
23
+ });
13
24
  };
@@ -174,7 +174,7 @@ const BirthdateField = forwardRef<HTMLInputElement, BirthdateFieldProps>(
174
174
  const handleChange = (
175
175
  part: PartKey,
176
176
  value: string,
177
- nextRef?: React.RefObject<HTMLInputElement> | null,
177
+ nextRef?: React.RefObject<HTMLInputElement | null>,
178
178
  ) => {
179
179
  if (readOnly || disabled) return;
180
180
 
@@ -1,8 +1,7 @@
1
1
  import { Icon, IconName } from '../../core/Icon';
2
2
  import {
3
3
  ButtonHTMLAttributes,
4
- ForwardRefRenderFunction,
5
- forwardRef,
4
+ RefObject
6
5
  } from 'react';
7
6
  import { twJoin, twMerge } from 'tailwind-merge';
8
7
  import { Slot, Slottable } from '@radix-ui/react-slot';
@@ -21,12 +20,10 @@ export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &
21
20
  active?: boolean;
22
21
  hasFullWidthOnMobile?: boolean;
23
22
  indicating?: boolean;
23
+ ref?: RefObject<HTMLButtonElement>
24
24
  };
25
25
 
26
- const ButtonRenderFunction: ForwardRefRenderFunction<
27
- HTMLButtonElement,
28
- ButtonProps
29
- > = (props, ref) => {
26
+ const ButtonRenderFunction = (props: ButtonProps) => {
30
27
  const {
31
28
  asChild,
32
29
  className,
@@ -40,6 +37,7 @@ const ButtonRenderFunction: ForwardRefRenderFunction<
40
37
  disabled: disabledArg,
41
38
  hasFullWidthOnMobile, // @revisit
42
39
  indicating,
40
+ ref,
43
41
  ...rest
44
42
  } = props;
45
43
 
@@ -190,6 +188,4 @@ const ButtonRenderFunction: ForwardRefRenderFunction<
190
188
  );
191
189
  };
192
190
 
193
- export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
194
- ButtonRenderFunction,
195
- ) as typeof ButtonRenderFunction;
191
+ export const Button = ButtonRenderFunction
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { useEffect, useState } from 'react';
5
5
  import {
6
6
  DayPicker,
7
- DayPickerBase,
7
+ PropsBase,
8
8
  DayPickerMultipleProps,
9
9
  DayPickerRangeProps,
10
10
  DayPickerSingleProps,
@@ -14,12 +14,11 @@ import { de, enGB } from 'date-fns/locale';
14
14
 
15
15
  import { twJoin } from 'tailwind-merge';
16
16
  import { Icon } from '../Icon';
17
- import { Locale as I18nLocale } from '@tuic/i18n';
18
17
  import { TextButton } from '../TextButton';
19
18
  import { differenceInMonths, type Locale } from 'date-fns';
20
19
 
21
- type BaseProps = Omit<DayPickerBase, 'locale' | 'fromDate'> & {
22
- localeCode?: I18nLocale;
20
+ type BaseProps = Omit<PropsBase, 'locale' | 'fromDate'> & {
21
+ localeCode?: string;
23
22
  useShowMoreButtonOnMobile?: boolean;
24
23
  showPrevMonthsButtonLabel?: string;
25
24
  showNextMonthsButtonLabel?: string;
@@ -32,7 +31,7 @@ export type CalendarProps =
32
31
  | (BaseProps & DayPickerMultipleProps)
33
32
  | (BaseProps & DayPickerRangeProps);
34
33
 
35
- const DEFAULT_LOCALE: I18nLocale = 'de';
34
+ const DEFAULT_LOCALE: string = 'de';
36
35
 
37
36
  /**
38
37
  * Calendar integration
@@ -59,7 +58,7 @@ function Calendar({
59
58
  toMonth,
60
59
  ...props
61
60
  }: CalendarProps) {
62
- const [usedLocale, setUsedLocale] = useState<I18nLocale | undefined>(undefined);
61
+ const [usedLocale, setUsedLocale] = useState<Locale | undefined>(undefined);
63
62
  const [currentMonth, setCurrentMonth] = useState<Date | undefined>(
64
63
  useShowMoreButtonOnMobile ? (month ?? defaultMonth) : undefined,
65
64
  );
@@ -280,18 +279,18 @@ function Calendar({
280
279
  day_hidden: 'invisible',
281
280
  ...classNames,
282
281
  }}
283
- components={{
284
- IconLeft: ({ ...props }) => (
285
- <Icon className="-ml-2 h-5 w-5" name="nav-arrow-left" size="lg" />
286
- ),
287
- IconRight: ({ ...props }) => (
288
- <Icon
289
- className="-mr-2 ml-auto h-5 w-5"
290
- name="nav-arrow-right"
291
- size="lg"
292
- />
293
- ),
294
- }}
282
+ // components={{
283
+ // IconLeft: ({ ...props }) => (
284
+ // <Icon className="-ml-2 h-5 w-5" name="nav-arrow-left" size="lg" />
285
+ // ),
286
+ // IconRight: ({ ...props }) => (
287
+ // <Icon
288
+ // className="-mr-2 ml-auto h-5 w-5"
289
+ // name="nav-arrow-right"
290
+ // size="lg"
291
+ // />
292
+ // ),
293
+ // }}
295
294
  locale={usedLocale}
296
295
  {...props}
297
296
  />
@@ -1,7 +1,6 @@
1
1
  import {
2
- forwardRef,
3
2
  LabelHTMLAttributes,
4
- ForwardRefRenderFunction,
3
+ RefObject
5
4
  } from 'react';
6
5
  import { twJoin } from 'tailwind-merge';
7
6
  import { Slot, Slottable } from '@radix-ui/react-slot';
@@ -11,13 +10,11 @@ export type FormLabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
11
10
  /** Indicates if the associated field is required. */
12
11
  required?: boolean;
13
12
  'data-invalid'?: boolean;
13
+ ref?: RefObject<HTMLLabelElement>
14
14
  };
15
15
 
16
- const FormLabelImplementation: ForwardRefRenderFunction<
17
- HTMLLabelElement,
18
- FormLabelProps
19
- > = (props, ref) => {
20
- const { asChild, className, required, children, ...args } = props;
16
+ const FormLabelImplementation = (props: FormLabelProps) => {
17
+ const { asChild, className, required, children, ref, ...args } = props;
21
18
 
22
19
  const Component = asChild ? Slot : 'label';
23
20
 
@@ -81,6 +78,4 @@ const FormLabelImplementation: ForwardRefRenderFunction<
81
78
  * </FormLabel>
82
79
  * ```
83
80
  */
84
- export const FormLabel = forwardRef(
85
- FormLabelImplementation,
86
- ) as typeof FormLabelImplementation;
81
+ export const FormLabel = FormLabelImplementation;
@@ -66,7 +66,7 @@ export const Pagination = ({
66
66
  variant: 'secondary',
67
67
  iconName: 'nav-arrow-left',
68
68
  disabled: !forcePreviousClickable && (pending || minCurrent <= 1),
69
- size: ['md', { lg: 'sm' }],
69
+ size: 'sm',
70
70
  onClick: createNavigationHandler(setPending, onPrevious),
71
71
  'aria-label': i18n?.previousPage ?? 'Vorherige Seite',
72
72
  });
@@ -75,7 +75,7 @@ export const Pagination = ({
75
75
  variant: 'secondary',
76
76
  iconName: 'nav-arrow-right',
77
77
  disabled: !forceNextClickable && (pending || maxCurrent >= total),
78
- size: ['md', { lg: 'sm' }],
78
+ size: 'sm',
79
79
  onClick: createNavigationHandler(setPending, onNext),
80
80
  'aria-label': i18n?.nextPage ?? 'Nächste Seite',
81
81
  });
@@ -59,7 +59,7 @@ const SelectRenderFunction: ForwardRefRenderFunction<
59
59
 
60
60
  let combinedOptions = useMemo(() => {
61
61
  let optionsFromChildren = getChildrenAsArrayOfElements(children).map(
62
- (node): Option => node.props,
62
+ (node): Option => node.props as never,
63
63
  );
64
64
 
65
65
  return [...options, ...optionsFromChildren];
@@ -105,7 +105,7 @@ const Tag = ({
105
105
  <div
106
106
  {...args}
107
107
  className={twJoin(
108
- 'inline-flex items-center justify-center text-center font-semibold text-marine-high-emphasis',
108
+ 'inline-flex items-center justify-center font-semibold text-marine-high-emphasis',
109
109
  borderRadius,
110
110
  textSize,
111
111
  padding,
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  ButtonHTMLAttributes,
3
- ForwardRefRenderFunction,
4
- PropsWithChildren,
3
+ PropsWithChildren, RefObject
5
4
  } from 'react';
6
5
  import React, { forwardRef } from 'react';
7
6
  import { Icon, IconName } from '../../core/Icon';
@@ -18,6 +17,7 @@ type CommonProps = ButtonHTMLAttributes<HTMLButtonElement> &
18
17
  iconSize?: 'xs' | 'sm' | 'md' | 'lg';
19
18
  size?: 'sm' | 'md' | 'lg';
20
19
  on?: 'white' | 'gray' | 'ocean' | 'image';
20
+ ref?: RefObject<HTMLButtonElement>
21
21
  }>;
22
22
 
23
23
  type ButtonAttributes = Omit<
@@ -28,10 +28,7 @@ type ButtonAttributes = Omit<
28
28
 
29
29
  export type TextButtonProps = ButtonAttributes & CommonProps;
30
30
 
31
- const TextButtonRenderFunction: ForwardRefRenderFunction<
32
- HTMLButtonElement,
33
- TextButtonProps
34
- > = (
31
+ const TextButtonRenderFunction = (
35
32
  {
36
33
  children,
37
34
  asChild,
@@ -41,9 +38,9 @@ const TextButtonRenderFunction: ForwardRefRenderFunction<
41
38
  size = 'md',
42
39
  on = 'white',
43
40
  className: classNameArg,
41
+ ref,
44
42
  ...rest
45
- },
46
- ref,
43
+ }: TextButtonProps,
47
44
  ) => {
48
45
  const Comp = asChild ? Slot : 'button';
49
46
 
@@ -104,6 +101,4 @@ const TextButtonRenderFunction: ForwardRefRenderFunction<
104
101
  /**
105
102
  * `TextButton` is a component that renders a text button.
106
103
  */
107
- export const TextButton = forwardRef<HTMLButtonElement, TextButtonProps>(
108
- TextButtonRenderFunction,
109
- ) as typeof TextButtonRenderFunction;
104
+ export const TextButton = TextButtonRenderFunction
@@ -1,5 +1,5 @@
1
1
  import type { FC, ReactNode } from 'react';
2
- import localFont from '@next/font/local';
2
+ import localFont from 'next/font/local';
3
3
 
4
4
  type Props = {
5
5
  children: (font: ReturnType<typeof localFont>) => ReactNode;
@@ -11,7 +11,7 @@ import { CarouselStage } from './CarouselStage';
11
11
  import { ScrollToIndex } from './CarouselInterface';
12
12
  import { logger } from '@tuic/logger';
13
13
 
14
- type StageRef = RefObject<HTMLUListElement>;
14
+ type StageRef = RefObject<HTMLUListElement | undefined | null>;
15
15
 
16
16
  type ItemsChildren = ComponentPropsWithoutRef<typeof CarouselStage>['children'];
17
17
 
@@ -1,4 +1,4 @@
1
- import { Children, cloneElement, isValidElement, ReactNode } from 'react';
1
+ import { Children, cloneElement, isValidElement, PropsWithChildren, ReactNode } from 'react';
2
2
 
3
3
  /**
4
4
  * Dynamically wraps the children intended for a Radix UI `Slot` with a specified wrapper element or component.
@@ -63,6 +63,8 @@ export const wrapSlottableChildren = (
63
63
  if (!isValidElement(child)) {
64
64
  return wrapper(children);
65
65
  }
66
+
67
+ const props = child.props as PropsWithChildren
66
68
 
67
- return cloneElement(child, undefined, wrapper(child.props.children));
69
+ return cloneElement(child, undefined, wrapper(props?.children));
68
70
  };
@@ -98,7 +98,7 @@ export function useIntersectionObserver({
98
98
  entry: undefined,
99
99
  }));
100
100
 
101
- const callbackRef = useRef<UseIntersectionObserverOptions['onChange']>();
101
+ const callbackRef = useRef<UseIntersectionObserverOptions['onChange'] | null>(null);
102
102
 
103
103
  callbackRef.current = onChange;
104
104
 
Binary file