@tui-cruises/mein-schiff-web-react-component-library 2.1.0 → 2.2.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,14 +2,22 @@
|
|
|
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.
|
|
5
|
+
## [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
6
|
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **Tabs:** add `on` prop to control background context ([127dd83](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/127dd8319d205d6ec84c85c89e3b1959f3bfa9d7))
|
|
8
11
|
|
|
9
12
|
|
|
10
13
|
### Bug Fixes
|
|
11
14
|
|
|
12
|
-
* **
|
|
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))
|
|
16
|
+
|
|
17
|
+
### [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
|
+
|
|
19
|
+
* **Release:** replace local file dependencies with versions for npm pack ([eac75a6](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/eac75a6d83efec0906037fbc536f8bcca8ab2336))
|
|
20
|
+
|
|
13
21
|
|
|
14
22
|
### [2.0.3](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/compare/v2.0.2...v2.0.3) (2025-06-05)
|
|
15
23
|
|
|
@@ -46,4 +54,6 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
46
54
|
* **PasswordField:** focus border radius update ([1694e4b](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/1694e4b9f74aed973ef4e0315dcfc9bf428486bb))
|
|
47
55
|
* **pictograms:** remove yellow from badge pictograms per brand guidelines ([62f8655](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/62f8655f021fb7a47ed7d9881c89820c63605548))
|
|
48
56
|
|
|
49
|
-
### [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)
|
|
57
|
+
### [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
|
+
|
|
59
|
+
* **Release:** initial release candidate
|
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ export type FormLabelProps = LabelHTMLAttributes<HTMLLabelElement> & {
|
|
|
10
10
|
asChild?: boolean;
|
|
11
11
|
/** Indicates if the associated field is required. */
|
|
12
12
|
required?: boolean;
|
|
13
|
+
'data-invalid'?: boolean;
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
const FormLabelImplementation: ForwardRefRenderFunction<
|
|
@@ -25,7 +26,7 @@ const FormLabelImplementation: ForwardRefRenderFunction<
|
|
|
25
26
|
{...args}
|
|
26
27
|
ref={ref}
|
|
27
28
|
className={twJoin(
|
|
28
|
-
'block cursor-pointer text-base font-semibold text-marine-high-emphasis',
|
|
29
|
+
'block cursor-pointer text-base font-semibold text-marine-high-emphasis data-[invalid]:text-error-100',
|
|
29
30
|
className,
|
|
30
31
|
)}
|
|
31
32
|
>
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
ComponentProps,
|
|
6
|
+
createContext,
|
|
7
|
+
FC,
|
|
8
|
+
forwardRef,
|
|
9
|
+
useContext,
|
|
10
|
+
} from 'react';
|
|
5
11
|
import { IconButton } from '../IconButton';
|
|
6
12
|
import {
|
|
7
13
|
CarouselInterface,
|
|
@@ -11,7 +17,24 @@ import {
|
|
|
11
17
|
import { twJoin } from 'tailwind-merge';
|
|
12
18
|
import { Pictogram, PictogramName } from '../Pictogram';
|
|
13
19
|
|
|
14
|
-
|
|
20
|
+
type TabsContextType = {
|
|
21
|
+
on?: 'white' | 'gray';
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const TabsContext = createContext<TabsContextType>({});
|
|
25
|
+
|
|
26
|
+
type TabsProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {
|
|
27
|
+
on?: 'white' | 'gray';
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const Tabs = forwardRef<React.ElementRef<typeof TabsPrimitive.Root>, TabsProps>(
|
|
31
|
+
({ on = 'white', ...props }, ref) => (
|
|
32
|
+
<TabsContext.Provider value={{ on }}>
|
|
33
|
+
<TabsPrimitive.Root {...props} ref={ref} />
|
|
34
|
+
</TabsContext.Provider>
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
15
38
|
|
|
16
39
|
const TabsContent = TabsPrimitive.Content;
|
|
17
40
|
|
|
@@ -21,6 +44,7 @@ type Props = React.ComponentPropsWithoutRef<typeof TabsPrimitive.List> & {
|
|
|
21
44
|
|
|
22
45
|
const TabsList = forwardRef<React.ElementRef<typeof TabsPrimitive.List>, Props>(
|
|
23
46
|
({ className, centerTabItems, ...props }, ref) => {
|
|
47
|
+
const { on } = useContext(TabsContext);
|
|
24
48
|
return (
|
|
25
49
|
<TabsPrimitive.List
|
|
26
50
|
className="relative flex items-center justify-between gap-1"
|
|
@@ -47,7 +71,9 @@ const TabsList = forwardRef<React.ElementRef<typeof TabsPrimitive.List>, Props>(
|
|
|
47
71
|
<>
|
|
48
72
|
<div
|
|
49
73
|
className={twJoin(
|
|
50
|
-
|
|
74
|
+
`pointer-events-none absolute left-0 top-1/2 flex h-full -translate-y-1/2 items-center bg-gradient-to-r from-50% pr-4`,
|
|
75
|
+
on === 'white' && 'from-white',
|
|
76
|
+
on === 'gray' && 'from-gray',
|
|
51
77
|
visibleIndexes[0] === 0 && 'hidden',
|
|
52
78
|
)}
|
|
53
79
|
>
|
|
@@ -64,7 +90,9 @@ const TabsList = forwardRef<React.ElementRef<typeof TabsPrimitive.List>, Props>(
|
|
|
64
90
|
|
|
65
91
|
<div
|
|
66
92
|
className={twJoin(
|
|
67
|
-
|
|
93
|
+
`pointer-events-none absolute right-0 top-1/2 flex h-full -translate-y-1/2 items-center bg-gradient-to-l from-50% pl-4`,
|
|
94
|
+
on === 'white' && 'from-white',
|
|
95
|
+
on === 'gray' && 'from-gray',
|
|
68
96
|
visibleIndexes.includes(lastIndex) && 'hidden',
|
|
69
97
|
)}
|
|
70
98
|
>
|
|
Binary file
|