Skip to content

Commit 3b54023

Browse files
committed
Fix: rollup build errors
1 parent ec371d5 commit 3b54023

File tree

11 files changed

+23
-26
lines changed

11 files changed

+23
-26
lines changed

src/components/Popover/components/PopoverOverlay/PopoverOverlay.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@ import {
4848
} from 'vue-property-decorator';
4949
import { classNames } from 'polaris-react/src/utilities/css';
5050
import { durationFast } from '@shopify/polaris-tokens';
51-
import type { PreferredAlignment, PreferredPosition } from '../../../PositionedOverlay';
5251
import {
5352
PopoverCloseSource, PopoverAutofocusTarget, nodeContainsDescendant, TransitionStatus,
5453
} from '../../utils';
5554
import { findFirstFocusableNode } from '@/utilities/focus';
56-
import { PositionedOverlay } from '../../../PositionedOverlay';
55+
import { PositionedOverlay, PreferredAlignment, PreferredPosition } from '@/components/PositionedOverlay';
5756
import { Pane } from '../Pane';
5857
import styles from '@/classes/Popover.json';
5958
import { EventListener } from '@/components/EventListener';
@@ -209,13 +208,9 @@ export default class PopoverOverlay extends Vue {
209208
const focusableChild = findFirstFocusableNode(this.contentNode);
210209
211210
if (focusableChild && autofocusTarget === 'first-node') {
212-
focusableChild.focus({
213-
preventScroll: process.env.NODE_ENV === 'development',
214-
});
211+
focusableChild.focus();
215212
} else {
216-
this.contentNode.focus({
217-
preventScroll: process.env.NODE_ENV === 'development',
218-
});
213+
this.contentNode.focus();
219214
}
220215
});
221216
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export * from './PopoverOverlay.vue';
21
export { default as PopoverOverlay } from './PopoverOverlay.vue';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
export * from './PopoverOverlay';
2+
export * from './Pane';
3+
export * from './Section';

src/components/Popover/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
export { default as Popover } from './Popover.vue';
2-
export * from './components';
3-
export * from './utils';
2+
export { Pane, PopoverOverlay, Section } from './components';

src/components/PositionedOverlay/PositionedOverlay.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ import {
3030
import { getRectForNode, Rect } from '@/utilities/geometry';
3131
import styles from '@/classes/PositionedOverlay.json';
3232
import popoverStyles from '@/classes/Popover.json';
33-
import { PopoverAutofocusTarget } from '../Popover/index';
33+
import { PopoverAutofocusTarget } from '../Popover/utils';
3434
import { isDocument, getMarginsForNode, getZIndexForLayerFromNode } from './utils';
35-
import { Scrollable, EventListener } from '@/components';
35+
import { EventListener } from '../EventListener';
36+
import { forNode } from '../Scrollable/utils';
3637
3738
const OBSERVER_CONFIG = {
3839
childList: true,
@@ -44,7 +45,6 @@ type Positioning = 'above' | 'below';
4445
4546
@Component({
4647
components: {
47-
Scrollable,
4848
EventListener,
4949
},
5050
})
@@ -245,7 +245,7 @@ export default class PositionedOverlay extends Vue {
245245
}
246246
247247
mounted(): void {
248-
this.scrollableContainer = Scrollable.forNode(this.activator);
248+
this.scrollableContainer = forNode(this.activator);
249249
if (this.scrollableContainer && !this.fixed) {
250250
this.scrollableContainer.addEventListener('scroll', this.handleMeasurement);
251251
}

src/components/Scrollable/Scrollable.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { classNames } from 'polaris-react/src/utilities/css';
2222
import { scrollable } from 'polaris-react/src/components/shared';
2323
import { StickyManager } from '@/utilities/sticky-manager';
2424
import styles from '@/classes/Scrollable.json';
25-
import { ScrollTo } from './components';
2625
import type { ScrollToPositionFn } from './utils';
2726
2827
function prevent(evt: Event) {
@@ -46,13 +45,6 @@ const LOW_RES_BUFFER = 2;
4645
4746
@Component
4847
export default class Scrollable extends Vue {
49-
static ScrollTo = ScrollTo;
50-
51-
static forNode(node: HTMLElement): HTMLElement | Document {
52-
const closestElement = node.closest(scrollable.selector);
53-
return closestElement instanceof HTMLElement ? closestElement : document;
54-
}
55-
5648
@Provide() 'stickyManager' = new StickyManager();
5749
5850
@Provide() 'scrollToPosition': ScrollToPositionFn;

src/components/Scrollable/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
export { default as Scrollable } from './Scrollable.vue';
2+
export * from './components';

src/components/Scrollable/utils.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
import { scrollable } from 'polaris-react/src/components/shared';
2+
13
export type ScrollToPositionFn = (scrollY: number) => void;
4+
5+
export function forNode(node: HTMLElement): HTMLElement | Document {
6+
const closestElement = node.closest(scrollable.selector);
7+
return closestElement instanceof HTMLElement ? closestElement : document;
8+
}

src/components/TextField/TextField.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ import CircleCancelMinor from '@shopify/polaris-icons/dist/svg/CircleCancelMinor
106106
import { classNames, variationName } from 'polaris-react/src/utilities/css';
107107
import type { Error, Action } from 'types/type';
108108
import { useUniqueId } from '@/utilities/unique-id';
109-
import { Connected, Icon, Labelled } from '@/components';
110109
import { VisuallyHidden } from '../VisuallyHidden';
110+
import { Connected } from '../Connected';
111+
import { Icon } from '../Icon';
112+
import { Labelled } from '../Labelled';
111113
import { helpTextID, labelID } from '../Labelled/utils';
112114
import { Resizer, Spinner } from './components';
113115
import styles from '@/classes/TextField.json';

src/components/TextField/components/Resizer/Resizer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ div(
2424
import Vue from 'vue';
2525
import { Component, Prop, Ref } from 'vue-property-decorator';
2626
import styles from '@/classes/TextField.json';
27-
import { EventListener } from '@/components';
27+
import { EventListener } from '@/components/EventListener';
2828
2929
const ENTITIES_TO_REPLACE = {
3030
'&': '&',

0 commit comments

Comments
 (0)