Skip to content

Commit 15a1a98

Browse files
committed
base: change all webcomponent base imports
1 parent fe5c7f8 commit 15a1a98

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed

packages/base/src/Device/EventProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import EventProviderWC from '@ui5/webcomponents-base/dist/EventProvider.js';
1+
import { EventProvider as EventProviderWC } from '@ui5/webcomponents-base';
22

33
export type RANGE_LEGACY_4_STEPS = 'Phone' | 'Tablet' | 'Desktop' | 'LargeDesktop';
44

packages/base/src/Device/Media.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import UI5MediaRange from '@ui5/webcomponents-base/dist/MediaRange.js';
1+
import { MediaRange as UI5MediaRange } from '@ui5/webcomponents-base';
22
import { MediaEventProvider, RANGE_LEGACY_4_STEPS, RangeInfo } from './EventProvider.js';
33

44
type RANGE_4_STEPS = 'S' | 'M' | 'L' | 'XL';

packages/base/src/Device/index.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { supportsTouch } from '@ui5/webcomponents-base/dist/Device.js';
1+
import { supportsTouch } from '@ui5/webcomponents-base';
22
import { IOrientation, IWindowSize, OrientationEventProvider, ResizeEventProvider } from './EventProvider.js';
33

44
const isSSR = () => typeof window === 'undefined';
@@ -163,7 +163,19 @@ const handleResizeEvent = () => {
163163
};
164164

165165
// re-export everything from the web components device
166-
export * from '@ui5/webcomponents-base/dist/Device.js';
166+
export {
167+
supportsTouch,
168+
isIE,
169+
isSafari,
170+
isChrome,
171+
isFirefox,
172+
isPhone,
173+
isTablet,
174+
isDesktop,
175+
isCombi,
176+
isIOS,
177+
isAndroid
178+
} from '@ui5/webcomponents-base';
167179
// export all media methods
168180
export { attachMediaHandler, detachMediaHandler, getCurrentRange } from './Media.js';
169181

packages/base/src/context/I18nContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import type I18nBundle from '@ui5/webcomponents-base/dist/i18nBundle.js';
3+
import { I18nBundle } from '@ui5/webcomponents-base';
44
import { createContext, useContext } from 'react';
55

66
export const I18nContext = createContext<{

packages/base/src/hooks/useCurrentTheme.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
22

3-
import { getTheme } from '@ui5/webcomponents-base/dist/config/Theme.js';
4-
import { attachThemeLoaded, detachThemeLoaded } from '@ui5/webcomponents-base/dist/Theming.js';
3+
import { attachThemeLoaded, detachThemeLoaded, getTheme } from '@ui5/webcomponents-base';
54
import { useEffect, useState } from 'react';
65

76
export function useCurrentTheme(): string {

packages/base/src/hooks/useI18nBundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import I18nBundle, { getI18nBundle } from '@ui5/webcomponents-base/dist/i18nBundle.js';
3+
import { I18nBundle, getI18nBundle } from '@ui5/webcomponents-base';
44
import { useRef } from 'react';
55
import { useI18nContext } from '../context/I18nContext.js';
66
import { useIsomorphicLayoutEffect } from '../hooks/index.js';

packages/base/src/hooks/useIsRTL.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import { getRTL } from '@ui5/webcomponents-base/dist/config/RTL.js';
3+
import { getRTL } from '@ui5/webcomponents-base';
44
import { RefObject, useRef, useState } from 'react';
55
import { useIsomorphicLayoutEffect } from '../hooks/index.js';
66

0 commit comments

Comments
 (0)