@tui-cruises/mein-schiff-web-react-component-library 2.2.0 → 2.2.1

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,6 +2,13 @@
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.1](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.0...v2.2.1) (2025-07-18)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * set IconButton as 'use client' to fix import problems ([6a1c421](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/6a1c42100b9f38fd3b6ed7c9b8d931afe4774b7c))
11
+
5
12
  ## [2.2.0](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.1.0...v2.2.0) (2025-07-15)
6
13
 
7
14
 
@@ -12,7 +19,7 @@ All notable changes to this project will be documented in this file. See [standa
12
19
 
13
20
  ### Bug Fixes
14
21
 
15
- * **OM-2207:** form label with error style for data-invalid attribute ([285587c](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/285587cee026b4dc5c9d9ca5efa8fc87080244c8))
22
+ * form label with error style for data-invalid attribute ([285587c](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/285587cee026b4dc5c9d9ca5efa8fc87080244c8))
16
23
 
17
24
  ### [2.1.0](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.0.5...v2.1.0) (2025-06-19)
18
25
 
@@ -56,4 +63,4 @@ All notable changes to this project will be documented in this file. See [standa
56
63
 
57
64
  ### [2.0.0-rc.1](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.0.0...v2.0.0-rc.1) (2025-04-29)
58
65
 
59
- * **Release:** initial release candidate
66
+ * **Release:** initial release candidate
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.0",
3
+ "version": "2.2.1",
4
4
  "main": "./index.tsx",
5
5
  "types": "./index.tsx",
6
6
  "type": "module",
@@ -2,19 +2,23 @@
2
2
 
3
3
  import * as React from 'react';
4
4
  import { useEffect, useState } from 'react';
5
- import { DayPicker, Matcher } from 'react-day-picker';
5
+ import {
6
+ DayPicker,
7
+ DayPickerBase,
8
+ DayPickerMultipleProps,
9
+ DayPickerRangeProps,
10
+ DayPickerSingleProps,
11
+ Matcher,
12
+ } from 'react-day-picker';
6
13
  import { de, enGB } from 'date-fns/locale';
7
14
 
8
15
  import { twJoin } from 'tailwind-merge';
9
- import { Icon } from '../../core/Icon';
16
+ import { Icon } from '../Icon';
10
17
  import { Locale as I18nLocale } from '@tuic/i18n';
11
- import { TextButton } from '../../core/TextButton';
18
+ import { TextButton } from '../TextButton';
12
19
  import { differenceInMonths } from 'date-fns';
13
20
 
14
- export type CalendarProps = Omit<
15
- React.ComponentProps<typeof DayPicker>,
16
- 'locale' | 'fromDate'
17
- > & {
21
+ type BaseProps = Omit<DayPickerBase, 'locale' | 'fromDate'> & {
18
22
  localeCode?: I18nLocale;
19
23
  useShowMoreButtonOnMobile?: boolean;
20
24
  showPrevMonthsButtonLabel?: string;
@@ -23,6 +27,11 @@ export type CalendarProps = Omit<
23
27
  pastIsPickable?: boolean;
24
28
  };
25
29
 
30
+ export type CalendarProps =
31
+ | (BaseProps & DayPickerSingleProps)
32
+ | (BaseProps & DayPickerMultipleProps)
33
+ | (BaseProps & DayPickerRangeProps);
34
+
26
35
  const DEFAULT_LOCALE: I18nLocale = 'de';
27
36
 
28
37
  /**
@@ -243,7 +252,7 @@ function Calendar({
243
252
  cell: twJoin(
244
253
  'relative w-1/7 p-0 text-center text-xs focus-within:relative focus-within:z-20' +
245
254
  '[&:has([aria-selected].day-range-end)]:rounded-r-lg [&:has([aria-selected])]:bg-surface-secondary-7 [&:has([aria-selected].day-outside)]:bg-surface-secondary-7',
246
- props.mode === 'range'
255
+ (props.mode as string) === 'range'
247
256
  ? '[&:has(>.day-range-end)]:rounded-r-lg [&:has(>.day-range-start)]:rounded-l-lg first:[&:has([aria-selected])]:rounded-l-lg last:[&:has([aria-selected])]:rounded-r-lg'
248
257
  : '[&:has([aria-selected])]:rounded-sm',
249
258
  ),
@@ -1,4 +1,6 @@
1
- import { Icon, IconName } from '../../core/Icon';
1
+ 'use client'
2
+
3
+ import { Icon, IconName } from '../Icon';
2
4
  import {
3
5
  ButtonHTMLAttributes,
4
6
  forwardRef,