@tui-cruises/mein-schiff-web-react-component-library 2.2.0 → 2.2.2
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,21 @@
|
|
|
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.2](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.2.1...v2.2.2) (2025-07-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* set IconButton as 'use client' to fix import problems ([9cd7b87](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/9cd7b8743309953e97a4768c9933a561ca3920e1))
|
|
11
|
+
* remove FieldSetVariant from InputFieldInput.tsx ([918af78](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/918af7869d319b3a00bd6aae4ee540907ef976d5))
|
|
12
|
+
|
|
13
|
+
### [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)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* set IconButton as 'use client' to fix import problems ([6a1c421](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/6a1c42100b9f38fd3b6ed7c9b8d931afe4774b7c))
|
|
19
|
+
|
|
5
20
|
## [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
21
|
|
|
7
22
|
|
|
@@ -12,7 +27,7 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
12
27
|
|
|
13
28
|
### Bug Fixes
|
|
14
29
|
|
|
15
|
-
*
|
|
30
|
+
* 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
31
|
|
|
17
32
|
### [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
33
|
|
|
@@ -56,4 +71,4 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
56
71
|
|
|
57
72
|
### [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
73
|
|
|
59
|
-
* **Release:** initial release candidate
|
|
74
|
+
* **Release:** initial release candidate
|
package/package.json
CHANGED
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useEffect, useState } from 'react';
|
|
5
|
-
import {
|
|
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 '
|
|
16
|
+
import { Icon } from '../Icon';
|
|
10
17
|
import { Locale as I18nLocale } from '@tuic/i18n';
|
|
11
|
-
import { TextButton } from '
|
|
18
|
+
import { TextButton } from '../TextButton';
|
|
12
19
|
import { differenceInMonths } from 'date-fns';
|
|
13
20
|
|
|
14
|
-
|
|
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,14 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
forwardRef,
|
|
3
3
|
ForwardRefRenderFunction,
|
|
4
|
-
HTMLAttributes,
|
|
4
|
+
// HTMLAttributes,
|
|
5
5
|
InputHTMLAttributes,
|
|
6
6
|
useEffect,
|
|
7
7
|
useImperativeHandle,
|
|
8
8
|
useRef,
|
|
9
9
|
} from 'react';
|
|
10
|
+
|
|
10
11
|
import { twJoin } from 'tailwind-merge';
|
|
11
|
-
import { FieldsetProps } from '../Fieldset';
|
|
12
|
+
// import { FieldsetProps } from '../Fieldset';
|
|
12
13
|
|
|
13
14
|
type ElementAttributes = Omit<
|
|
14
15
|
InputHTMLAttributes<HTMLInputElement>,
|
|
@@ -16,14 +17,15 @@ type ElementAttributes = Omit<
|
|
|
16
17
|
>;
|
|
17
18
|
|
|
18
19
|
export type InputFieldInputProps = ElementAttributes & {
|
|
19
|
-
fieldsetVariant?: FieldsetProps['variant'];
|
|
20
|
+
// fieldsetVariant?: FieldsetProps['variant'];
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
const InputFieldInputRenderFunction: ForwardRefRenderFunction<
|
|
23
24
|
HTMLInputElement,
|
|
24
25
|
InputFieldInputProps
|
|
25
26
|
> = (props, forwardedRef) => {
|
|
26
|
-
let { fieldsetVariant, ...attrs } = props;
|
|
27
|
+
// let { fieldsetVariant, ...attrs } = props;
|
|
28
|
+
let { ...attrs } = props;
|
|
27
29
|
let ref = useRef<HTMLInputElement>(null);
|
|
28
30
|
|
|
29
31
|
useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(
|