Skip to content

Commit 8f3fa14

Browse files
committed
Fix: import missing components to parent components
1 parent c84ad92 commit 8f3fa14

File tree

32 files changed

+116
-73
lines changed

32 files changed

+116
-73
lines changed

src/components/ActionMenu/components/MenuGroup/MenuGroup.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import type {
3939
ActionListItemDescriptor,
4040
ActionListSection,
4141
} from '@/utilities/types';
42+
import { ActionList } from '@/components';
4243
import styles from '@polaris/components/ActionMenu/components/MenuGroup/MenuGroup.module.css';
4344
import { SecondaryAction } from '../SecondaryAction';
4445
@@ -62,7 +63,7 @@ export interface MenuGroupProps {
6263
/** Whether or not the menu is disable */
6364
disabled?: boolean;
6465
/** Collection of sectioned action items */
65-
sections?: readonly ActionListSection[];
66+
sections?: ActionListSection[];
6667
}
6768
6869
const props = defineProps<MenuGroupProps>();

src/components/ActionMenu/components/RollupActions/RollupActions.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Popover(
2424
<script setup lang="ts">
2525
import { ref } from 'vue';
2626
import type { ActionListItemDescriptor, ActionListSection } from '@/utilities/types';
27+
import { Popover, Button, ActionList } from '@/components';
2728
import MenuHorizontalIcon from '@icons/MenuHorizontalIcon.svg';
2829
import useI18n from '@/use/useI18n';
2930
import styles from '@polaris/components/ActionMenu/components/RollupActions/RollupActions.module.css';

src/components/ActionMenu/components/SecondaryAction/SecondaryAction.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { classNames } from '@/utilities/css';
3333
import { useHasSlot } from '@/use/useHasSlot';
3434
import type { VueNode } from '@/utilities/types';
3535
import type { ButtonProps } from '@/components/Button/types';
36+
import { Button, Tooltip } from '@/components';
3637
import styles from '@polaris/components/ActionMenu/components/SecondaryAction/SecondaryAction.module.css';
3738
3839
export interface SecondaryActionProps extends ButtonProps {

src/components/Banner/Banner.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { computed, ref, provide, getCurrentInstance } from 'vue';
2121
import { classNames } from '@/utilities/css';
2222
import type { VueNode } from '@/utilities/types';
2323
import styles from '@polaris/components/Banner/Banner.module.css';
24+
import BannerLayout from './components/BannerLayout.vue';
2425
import type { BannerProps } from './types';
2526
import useWithinContentContext from './context';
2627

src/components/Banner/components/BannerLayout.vue

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ template(v-else)
4747
import { computed, h, getCurrentInstance, resolveComponent } from 'vue';
4848
import styles from '@polaris/components/Banner/Banner.module.css';
4949
import useI18n from '@/use/useI18n';
50+
import { Text } from '@/components';
51+
import WithinContentContainerBanner from './WithinContentContainerBanner.vue';
52+
import InlineIconBanner from './InlineIconBanner.vue';
53+
import DefaultBanner from './DefaultBanner.vue';
5054
import type { VueNode } from '@/utilities/types';
5155
import { useHasSlot } from '@/use/useHasSlot';
5256
import XIcon from '@icons/XIcon.svg';
@@ -96,24 +100,24 @@ const sharedBannerProps = computed(() => {
96100
}
97101
});
98102
99-
const bannerTitle = computed(() =>
100-
props.title ? () => h(
103+
const bannerTitle = props.title
104+
? h(
101105
resolveComponent('Text'),
102106
{ variant: 'headingSm', as: 'h2', breakWord: true },
103107
() => props.title,
104-
) : null,
105-
);
108+
)
109+
: undefined;
106110
107-
const bannerIcon = computed(() =>
108-
!props.hideIcon ? () => h(
111+
const bannerIcon = !props.hideIcon
112+
? h(
109113
'span',
110114
{ class: styles[bannerColors.value.icon] },
111115
h(resolveComponent('Icon'), { source: props.icon || bannerAttributes[bannerTone.value].icon, }),
112-
) : null,
113-
);
116+
)
117+
: undefined;
114118
115-
const actionButtons = computed(() =>
116-
(props.action || props.secondaryAction) ? () => h(
119+
const actionButtons = (props.action || props.secondaryAction)
120+
? h(
117121
resolveComponent('ButtonGroup'),
118122
() => [
119123
props.action && h(resolveComponent('Button'),
@@ -125,13 +129,13 @@ const actionButtons = computed(() =>
125129
() => props.secondaryAction?.content,
126130
),
127131
],
128-
) : null,
129-
);
132+
)
133+
: undefined;
130134
131135
const hasDismiss = computed(() => Boolean(currentInstance?.vnode.props?.onDismiss));
132136
133-
const dismissButton = computed(() =>
134-
hasDismiss.value ? () => h(
137+
const dismissButton = hasDismiss.value
138+
? h(
135139
resolveComponent('Button'),
136140
{
137141
variant: 'tertiary',
@@ -143,6 +147,6 @@ const dismissButton = computed(() =>
143147
onClick: () => emits('dismiss'),
144148
accessibilityLabel: i18n.translate('Polaris.Banner.dismissButton'),
145149
},
146-
) : null,
147-
);
150+
)
151+
: undefined;
148152
</script>

src/components/Banner/components/DefaultBanner.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Box(width="100%")
88
:borderStartEndRadius="breakpoints.smUp ? '300' : undefined",
99
:borderEndStartRadius="!hasContent && breakpoints.smUp ? '300' : undefined",
1010
:borderEndEndRadius="!hasContent && breakpoints.smUp ? '300' : undefined",
11-
:padding="300",
11+
padding="300",
1212
)
1313
InlineStack(
1414
align="space-between",
1515
blockAlign="center",
16-
:gap="200",
16+
gap="200",
1717
:wrap="false",
1818
)
19-
InlineStack(:gap="100", :wrap="false")
19+
InlineStack(gap="100", :wrap="false")
2020
template(v-if="bannerIcon")
2121
component(:is="bannerIcon")
2222
template(v-if="bannerTitle")
@@ -26,9 +26,9 @@ Box(width="100%")
2626
Box(
2727
v-if="Boolean(hasContent)",
2828
:padding="{ xs: '300', md: '400'}",
29-
:paddingBlockStart="300",
29+
paddingBlockStart="300",
3030
)
31-
BlockStack(:gap="200")
31+
BlockStack(gap="200")
3232
slot
3333
template(v-if="actionButtons")
3434
component(:is="actionButtons")
@@ -37,6 +37,7 @@ Box(width="100%")
3737
<script setup lang="ts">
3838
import { computed } from 'vue';
3939
import type { VueNode } from '@/utilities/types';
40+
import { Box, BlockStack, InlineStack } from '@/components';
4041
import { useBreakpoints } from '@/use/useBreakpoints';
4142
import type { BannerLayoutProps } from '../types';
4243
@@ -47,10 +48,10 @@ type DefaultBannerSlots = {
4748
const slots = defineSlots<DefaultBannerSlots>();
4849
4950
const props = defineProps<BannerLayoutProps & {
50-
bannerIcon?: (_: VueNode) => any;
51-
bannerTitle?: (_: VueNode) => any;
52-
actionButtons?: (_: VueNode) => any;
53-
dismissButton?: (_: VueNode) => any;
51+
bannerIcon?: VueNode;
52+
bannerTitle?: VueNode;
53+
actionButtons?: VueNode;
54+
dismissButton?: VueNode;
5455
}>();
5556
5657
const breakpoints = useBreakpoints();

src/components/Banner/components/InlineIconBanner.vue

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Box(
33
width="100%",
44
borderRadius="300",
5-
:padding="300",
5+
padding="300",
66
)
77
InlineStack(
88
align="space-between",
@@ -11,19 +11,19 @@ Box(
1111
)
1212
Box(width="100%")
1313
InlineStack(
14-
:gap="200",
14+
gap="200",
1515
:wrap="false",
1616
:blockAlign="blockAlign",
1717
)
1818
div(v-if="bannerIcon", ref="iconNode")
1919
Box(
2020
borderRadius="200",
2121
:background="backgroundColor",
22-
:padding="100",
22+
padding="100",
2323
)
2424
component(:is="bannerIcon")
2525
Box(ref="contentNode", width="100%")
26-
BlockStack(:gap="200")
26+
BlockStack(gap="200")
2727
slot
2828
template(v-if="actionButtons")
2929
component(:is="actionButtons")
@@ -37,10 +37,11 @@ Box(
3737

3838
<script setup lang="ts">
3939
import { ref, watch, onMounted, onBeforeUnmount } from 'vue';
40-
import styles from '@polaris/components/Banner/Banner.module.css';
4140
import type { VueNode } from '@/utilities/types';
41+
import { Box, BlockStack, InlineStack } from '@/components';
4242
import type { BannerLayoutProps } from '../types';
4343
import type { InlineStackProps } from '../../InlineStack/types';
44+
import styles from '@polaris/components/Banner/Banner.module.css';
4445
4546
type BannerLayoutSlots = {
4647
default: (_: VueNode) => any;
@@ -49,9 +50,9 @@ type BannerLayoutSlots = {
4950
defineSlots<BannerLayoutSlots>();
5051
5152
defineProps<BannerLayoutProps & {
52-
bannerIcon?: (_: VueNode) => any;
53-
actionButtons?: (_: VueNode) => any;
54-
dismissButton?: (_: VueNode) => any;
53+
bannerIcon?: VueNode;
54+
actionButtons?: VueNode;
55+
dismissButton?: VueNode;
5556
}>();
5657
5758
const blockAlign = ref<InlineStackProps['blockAlign']>('center');

src/components/Banner/components/WithinContentContainerBanner.vue

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ Box(
33
width="100%",
44
borderRadius="200",
55
:background="backgroundColor",
6-
:padding="200",
6+
padding="200",
77
:color="textColor",
88
)
99
InlineStack(
1010
align="space-between",
1111
blockAlign="start",
1212
:wrap="false",
13-
:gap="200",
13+
gap="200",
1414
)
15-
InlineStack(:gap="150", :wrap="false")
15+
InlineStack(gap="150", :wrap="false")
1616
template(v-if="bannerIcon")
1717
component(:is="bannerIcon")
1818
Box(width="100%")
19-
BlockStack(:gap="200")
20-
BlockStack(:gap="50")
19+
BlockStack(gap="200")
20+
BlockStack(gap="050")
2121
template(v-if="bannerTitle")
2222
component(:is="bannerTitle")
2323
slot
@@ -28,6 +28,7 @@ Box(
2828
</template>
2929

3030
<script setup lang="ts">
31+
import { Box, InlineStack, BlockStack } from '@/components';
3132
import type { VueNode } from '@/utilities/types';
3233
import type { BannerLayoutProps } from '../types';
3334
@@ -38,9 +39,9 @@ type BannerWithinContentContainerSlots = {
3839
defineSlots<BannerWithinContentContainerSlots>();
3940
4041
defineProps<BannerLayoutProps & {
41-
bannerTitle?: (_: VueNode) => any;
42-
bannerIcon?: (_: VueNode) => any;
43-
actionButtons?: (_: VueNode) => any;
44-
dismissButton?: (_: VueNode) => any;
42+
bannerTitle?: VueNode;
43+
bannerIcon?: VueNode;
44+
actionButtons?: VueNode;
45+
dismissButton?: VueNode;
4546
}>();
4647
</script>

src/components/Breadcrumbs/Breadcrumbs.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Button(
1212
<script setup lang="ts">
1313
import { computed } from 'vue';
1414
import ArrowLeftIcon from '@icons/ArrowLeftIcon.svg';
15+
import { Button } from '@/components';
1516
import type { CallbackAction, LinkAction } from '@/utilities/types';
1617
import { handleMouseUpByBlurring } from '@/utilities/focus';
1718

src/components/Button/Button.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import useI18n from '@/use/useI18n';
3939
import { useHasSlot } from '@/use/useHasSlot';
4040
import { useBreakpoints } from '@/use/useBreakpoints';
4141
import type { ButtonProps } from './types';
42-
import { Spinner, Icon } from '@/components';
42+
import { Spinner, Icon, Text } from '@/components';
4343
import { UnstyledButton } from '../UnstyledButton';
4444
import SelectIcon from '@icons/SelectIcon.svg';
4545
import ChevronDownIcon from '@icons/ChevronDownIcon.svg';

0 commit comments

Comments
 (0)