@tui-cruises/mein-schiff-web-react-component-library 2.2.11 → 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 +4 -23
- package/icons/icons/index.ts +1 -1
- package/icons/pictograms/index.ts +1 -0
- package/package.json +9 -9
- package/src/components/core/Accordion/utils.tsx +18 -7
- package/src/components/core/BirthdateField/BirthdateField.tsx +1 -1
- package/src/components/core/Button/Button.tsx +6 -10
- package/src/components/core/Calendar/Calendar.tsx +16 -17
- package/src/components/core/FormLabel/FormLabel.tsx +5 -10
- package/src/components/core/Pagination/Pagination.tsx +2 -2
- package/src/components/core/Select/Select.tsx +1 -1
- package/src/components/core/Tag/Tag.tsx +1 -1
- package/src/components/core/TextButton/TextButton.tsx +6 -11
- package/src/components/shared/NextFontMeinSchiffSansPro/NextFontMeinSchiffSansPro.tsx +1 -1
- package/src/components/shared/UniversalCarousel/helpers.ts +1 -1
- package/src/helpers/slot.tsx +4 -2
- package/src/hooks/use-intersection-observer.ts +1 -1
- package/icons/icons/speed.tsx +0 -20
- package/public/videos/placeholder.mp4 +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,33 +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
|
-
|
|
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
7
|
|
|
8
|
-
###
|
|
9
|
-
|
|
10
|
-
* **Button:** align button text to center (pull request [#9](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/issues/9)) ([d25791d](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/d25791dbb0e75eb099418ae716eaa6854835b084))
|
|
11
|
-
* **Calendar:** use of wrong type causes build failures ([#8](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/issues/8)) ([afdbd3d](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/afdbd3da42d4dcc364fdb13b66b1d7f35ad46a94))
|
|
12
|
-
* **Icon:** add missing 'speed' icon (pull request [#10](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/issues/10)) ([f490e3c](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/f490e3c3b9ca6f02f56323f73e0753c5e7f60d52))
|
|
13
|
-
|
|
14
|
-
### [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)
|
|
15
|
-
|
|
16
|
-
### [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)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Bug Fixes
|
|
20
|
-
|
|
21
|
-
* **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))
|
|
22
|
-
* **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))
|
|
23
|
-
* **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))
|
|
24
|
-
* typefix ([b7fccaf](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/b7fccaf80e990db4d68b42411c1ce57a6356ad05))
|
|
25
|
-
|
|
26
|
-
### [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)
|
|
27
|
-
|
|
8
|
+
### Features
|
|
28
9
|
|
|
29
|
-
|
|
10
|
+
* next15 prep ([46b3477](https://bitbucket.org/yours_truly/tuic-mein-schiff-web-react-component-library/commit/46b3477fda31e4bb8b29a12da0a544e620cdbc11))
|
|
30
11
|
|
|
31
|
-
|
|
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)
|
|
32
13
|
|
|
33
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)
|
|
34
15
|
|
package/icons/icons/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import dynamic from 'next/dynamic';
|
|
2
3
|
|
|
3
4
|
export const dynamicComponents = {
|
|
@@ -113,7 +114,6 @@ export const dynamicComponents = {
|
|
|
113
114
|
'snow-flake': dynamic(() => import('./snow-flake'), { ssr: false }),
|
|
114
115
|
snow: dynamic(() => import('./snow'), { ssr: false }),
|
|
115
116
|
sofa: dynamic(() => import('./sofa'), { ssr: false }),
|
|
116
|
-
speed: dynamic(() => import('./speed'), { ssr: false }),
|
|
117
117
|
'star-dashed': dynamic(() => import('./star-dashed'), { ssr: false }),
|
|
118
118
|
'star-filled': dynamic(() => import('./star-filled'), { ssr: false }),
|
|
119
119
|
'star-half-dashed': dynamic(() => import('./star-half-dashed'), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tui-cruises/mein-schiff-web-react-component-library",
|
|
3
|
-
"version": "
|
|
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",
|
|
@@ -52,10 +51,11 @@
|
|
|
52
51
|
"@radix-ui/react-tabs": "^1.0.4",
|
|
53
52
|
"@radix-ui/react-toast": "^1.1.5",
|
|
54
53
|
"@radix-ui/react-tooltip": "^1.1.2",
|
|
55
|
-
"@tui-cruises/mein-schiff-web-tailwind-config": "^2.0.
|
|
54
|
+
"@tui-cruises/mein-schiff-web-tailwind-config": "^2.0.16",
|
|
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": "^
|
|
69
|
-
"react": "^
|
|
68
|
+
"next": "^15.5.2",
|
|
69
|
+
"react": "^19.1.1",
|
|
70
70
|
"react-country-flag": "^3.1.0",
|
|
71
|
-
"react-day-picker": "^
|
|
72
|
-
"react-dom": "^
|
|
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": "^
|
|
101
|
-
"@types/react-is": "
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
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
|
-
|
|
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:
|
|
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
|
|
|
@@ -79,7 +77,7 @@ const ButtonRenderFunction: ForwardRefRenderFunction<
|
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
const buttonClassNames = twMerge(
|
|
82
|
-
'relative inline-flex appearance-none items-center justify-center gap-2 rounded-md border-none px-7 py-3.5 text-
|
|
80
|
+
'relative inline-flex appearance-none items-center justify-center gap-2 rounded-md border-none px-7 py-3.5 text-lg font-semibold !leading-normal transition-all md:text-base',
|
|
83
81
|
hasFullWidthOnMobile && 'w-full sm:w-auto',
|
|
84
82
|
|
|
85
83
|
// Variants
|
|
@@ -190,6 +188,4 @@ const ButtonRenderFunction: ForwardRefRenderFunction<
|
|
|
190
188
|
);
|
|
191
189
|
};
|
|
192
190
|
|
|
193
|
-
export const Button =
|
|
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
|
-
|
|
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<
|
|
22
|
-
localeCode?:
|
|
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:
|
|
34
|
+
const DEFAULT_LOCALE: string = 'de';
|
|
36
35
|
|
|
37
36
|
/**
|
|
38
37
|
* Calendar integration
|
|
@@ -280,18 +279,18 @@ function Calendar({
|
|
|
280
279
|
day_hidden: 'invisible',
|
|
281
280
|
...classNames,
|
|
282
281
|
}}
|
|
283
|
-
components={{
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
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
|
-
|
|
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:
|
|
17
|
-
|
|
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 =
|
|
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:
|
|
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:
|
|
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
|
|
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
|
-
|
|
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
|
|
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 =
|
|
108
|
-
TextButtonRenderFunction,
|
|
109
|
-
) as typeof TextButtonRenderFunction;
|
|
104
|
+
export const TextButton = TextButtonRenderFunction
|
|
@@ -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
|
|
package/src/helpers/slot.tsx
CHANGED
|
@@ -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(
|
|
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
|
|
package/icons/icons/speed.tsx
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { SVGProps } from 'react';
|
|
2
|
-
const SvgSpeed = (props: SVGProps<SVGSVGElement>) => (
|
|
3
|
-
<svg
|
|
4
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
-
width="1em"
|
|
6
|
-
height="1em"
|
|
7
|
-
fill="none"
|
|
8
|
-
viewBox="0 0 24 24"
|
|
9
|
-
color="currentColor"
|
|
10
|
-
{...props}
|
|
11
|
-
>
|
|
12
|
-
<path
|
|
13
|
-
fill="currentColor"
|
|
14
|
-
fillRule="evenodd"
|
|
15
|
-
d="M7.69 4.75A.75.75 0 0 1 8.44 4h5.11l4.6 4.6H23l-5.775 7.219a.75.75 0 1 1-1.171-.937l3.825-4.782h-7.44a.75.75 0 0 1 0-1.5h3.59l-3.1-3.1h-4.49a.75.75 0 0 1-.75-.75M5.8 9.35a.75.75 0 0 1 .75-.75h3.6a.75.75 0 0 1 0 1.5h-3.6a.75.75 0 0 1-.75-.75m-2.4 3.178a.75.75 0 0 1 .75-.75h4.8a.75.75 0 0 1 0 1.5h-4.8a.75.75 0 0 1-.75-.75m19.473 3.936a.75.75 0 0 1-.257 1.03C19.636 19.281 18.266 20 16.23 20c-1.211 0-1.853-.642-2.31-1.099l-.02-.02c-.442-.443-.7-.681-1.27-.681-.674 0-1.421.349-2.059.774a8 8 0 0 0-.998.795l-.011.01-.001.001A.75.75 0 0 1 8.5 18.72l.53.53-.53-.53.001-.002.002-.002.006-.006.02-.02.07-.066c.06-.055.145-.133.253-.225.213-.183.519-.428.887-.673.713-.475 1.766-1.026 2.891-1.026 1.212 0 1.853.642 2.31 1.099l.02.02c.443.443.7.681 1.27.681 1.564 0 2.596-.482 5.615-2.293a.75.75 0 0 1 1.028.257M1 15.75a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 0 1.5h-6a.75.75 0 0 1-.75-.75"
|
|
16
|
-
clipRule="evenodd"
|
|
17
|
-
/>
|
|
18
|
-
</svg>
|
|
19
|
-
);
|
|
20
|
-
export default SvgSpeed;
|
|
Binary file
|