Skip to content

Commit f542684

Browse files
committed
refactor: removed custom ComponentProps type helper and Props exports
1 parent b6456a9 commit f542684

File tree

240 files changed

+318
-295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+318
-295
lines changed

apps/docs/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@rollup/pluginutils": "^5.1.4",
2222
"@toycode/markdown-it-class": "^1.2.4",
2323
"@types/markdown-it": "^14.1.2",
24-
"@vitejs/plugin-vue": "^5.2.3",
24+
"@vitejs/plugin-vue": "^6.0.1",
2525
"@vue/compiler-sfc": "^3.5.13",
2626
"@vue/runtime-core": "^3.5.13",
2727
"@vue/shared": "^3.5.13",
@@ -33,9 +33,10 @@
3333
"ts-dedent": "^2.2.0",
3434
"tslib": "^2.8.1",
3535
"typescript": "^5.8.3",
36-
"vite": "^6.3.3",
36+
"vite": "^7.1.10",
37+
"vue-component-type-helpers": "^3.1.1",
3738
"vue-docgen-api": "^4.79.2",
38-
"vue-tsc": "^2.2.10"
39+
"vue-tsc": "^3.1.1"
3940
},
4041
"packageManager": "[email protected]+sha512.0e82714d1b5b43c74610193cb20734897c1d00de89d0e18420aebc5977fa13d780a9cb05734624e81ebd81cc876cd464794850641c48b9544326b5622ca29971"
4142
}

apps/docs/src/components/ComponentTitle.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
<script lang="ts" setup>
66
import { computed } from 'vue';
7-
import type { ComponentProps, PfTitle } from '@vue-patternfly/core';
7+
import type { PfTitle } from '@vue-patternfly/core';
8+
import type { ComponentProps } from 'vue-component-type-helpers';
89
910
interface Props extends /* @vue-ignore */ ComponentProps<typeof PfTitle> {
1011
name: string;

apps/docs/src/components/DocPage.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@
6767

6868
<script lang="ts" setup>
6969
import { onMounted } from 'vue';
70-
import type { ComponentProps, PfPageSection } from '@vue-patternfly/core';
70+
import type { PfPageSection } from '@vue-patternfly/core';
71+
import type { ComponentProps } from 'vue-component-type-helpers';
7172
import UpRightFromSquareIcon from '@vue-patternfly/icons/up-right-from-square-icon';
7273
import GithubIcon from '@vue-patternfly/icons/github-icon';
7374
74-
export interface Props extends /* @vue-ignore */ ComponentProps<typeof PfPageSection> {
75+
interface Props extends /* @vue-ignore */ ComponentProps<typeof PfPageSection> {
7576
title?: string;
7677
name?: string;
7778
docSection?: string;

apps/docs/src/store/alerts.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { defineStore } from 'pinia';
2-
import type { Props as AlertProps } from '@vue-patternfly/core/components/Alert/Alert.vue';
2+
import type PfAlert from '@vue-patternfly/core/components/Alert/Alert.vue';
3+
import type { ComponentProps } from 'vue-component-type-helpers';
4+
5+
type AlertProps = ComponentProps<typeof PfAlert>;
36

47
let globalId = 0;
58

apps/docs/src/stories/Components/Alert.story.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,8 @@
303303

304304
<script lang="ts" setup>
305305
import { computed, reactive, ref, type HTMLAttributes } from 'vue';
306-
import type { ComponentProps, PfAlert } from '@vue-patternfly/core';
306+
import type { PfAlert } from '@vue-patternfly/core';
307+
import type { ComponentProps } from 'vue-component-type-helpers';
307308
import UsersIcon from '@vue-patternfly/icons/users-icon';
308309
import BoxIcon from '@vue-patternfly/icons/box-icon';
309310
import DatabaseIcon from '@vue-patternfly/icons/database-icon';

apps/docs/src/stories/Components/Drawer.story.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484

8585
<script lang="ts" setup>
8686
import { ref, type Ref } from "vue";
87-
import type { ComponentProps, PfDrawer } from "@vue-patternfly/core";
87+
import type { PfDrawer } from "@vue-patternfly/core";
88+
import type { ComponentProps } from 'vue-component-type-helpers';
8889
8990
const expanded = ref(false);
9091
const position: Ref<ComponentProps<typeof PfDrawer>["position"]> = ref("end");

apps/docs/src/stories/Layouts/Flex-demo.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,12 @@ pre {
241241

242242
<script lang="ts" setup>
243243
import { ref, reactive, watch, type Ref } from "vue";
244-
import type { Props as FlexProps } from "@vue-patternfly/core/layouts/Flex/Flex.vue";
245-
import type { Props as FlexItemProps } from "@vue-patternfly/core/layouts/Flex/FlexItem.vue";
244+
import type PfFlex from "@vue-patternfly/core/layouts/Flex/Flex.vue";
245+
import type PfFlexItem from "@vue-patternfly/core/layouts/Flex/FlexItem.vue";
246+
import type { ComponentProps } from 'vue-component-type-helpers';
247+
248+
type FlexProps = ComponentProps<typeof PfFlex>;
249+
type FlexItemProps = ComponentProps<typeof PfFlexItem>;
246250
247251
interface FlexItem {
248252
align: FlexProps["align"];

packages/core/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
"@vue-patternfly/icons": "workspace:^"
4242
},
4343
"devDependencies": {
44-
"@types/node": "^22.14.1",
44+
"@types/node": "^24.7.2",
4545
"@types/web-bluetooth": "^0.0.21",
46-
"@vitejs/plugin-vue": "^5.2.3",
46+
"@vitejs/plugin-vue": "^6.0.1",
4747
"@vue/compiler-sfc": "^3.5.13",
4848
"@vueuse/core": "^13.1.0",
4949
"@vueuse/integrations": "^13.1.0",
@@ -56,10 +56,11 @@
5656
"rimraf": "^6.0.1",
5757
"tslib": "^2.8.1",
5858
"typescript": "^5.8.3",
59-
"vite": "^6.3.2",
59+
"vite": "^7.1.10",
6060
"vue": "^3.5.13",
61+
"vue-component-type-helpers": "^3.1.1",
6162
"vue-router": "^4.5.0",
62-
"vue-tsc": "^2.2.10"
63+
"vue-tsc": "^3.1.1"
6364
},
6465
"peerDependencies": {
6566
"@vueuse/core": "^13",

packages/core/src/components/Accordion/Accordion.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</template>
1212

1313
<script lang="ts">
14-
export interface Props extends OUIAProps, /* @vue-ignore */ HTMLAttributes {
14+
interface Props extends OUIAProps, /* @vue-ignore */ HTMLAttributes {
1515
/** Heading level to use */
1616
level?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | number;
1717
/** Flag to indicate whether use definition list or div */

packages/core/src/components/Accordion/AccordionItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ defineOptions({
5252
inheritAttrs: false,
5353
});
5454
55-
export interface Props extends OUIAProps, /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'aria-expanded'> {
55+
interface Props extends OUIAProps, /* @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'aria-expanded'> {
5656
title?: string;
5757
toggleComponent?: string;
5858
contentComponent?: string;

0 commit comments

Comments
 (0)