Skip to content

Commit 4a24e4a

Browse files
Merge pull request #139 from michaelcozzolino/refactor/components-api-tables
refactor(docs): Improve Api tables and add missing snapshots
2 parents fb10a4d + 213bc45 commit 4a24e4a

File tree

84 files changed

+50
-11
lines changed

Some content is hidden

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

84 files changed

+50
-11
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<template>
2+
<FoLink v-if="declarations[0] !== undefined"
3+
color="primary"
4+
class="font-bold"
5+
:to="declarations[0].file"
6+
underline-effect="hover-animated"
7+
>
8+
{{ name }}
9+
</FoLink>
10+
11+
<span v-else
12+
class="text-primary"
13+
>
14+
{{ name }}
15+
</span>
16+
</template>
17+
18+
<script setup lang="ts">
19+
import type { Declaration } from 'vue-component-meta';
20+
import { FoLink } from 'flyonui-vue';
21+
22+
interface Props {
23+
name: string;
24+
declarations: Declaration[];
25+
}
26+
27+
defineProps<Props>();
28+
</script>

packages/docs/Api/UI/PropsApi.vue

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
>
1010
<template #head>
1111
<FoTableRow class="text-center text-primary normal-case italic bg-base-300/20">
12-
<FoTableHeader :colspan="4">
12+
<FoTableHeader :colspan="5">
1313
{{ componentName }}
1414
</FoTableHeader>
1515
</FoTableRow>
@@ -19,6 +19,7 @@
1919
<FoTableHeader>Description</FoTableHeader>
2020
<FoTableHeader>Type</FoTableHeader>
2121
<FoTableHeader>Values</FoTableHeader>
22+
<FoTableHeader>Required</FoTableHeader>
2223
</FoTableRow>
2324
</template>
2425

@@ -27,21 +28,27 @@
2728
:key="prop.name"
2829
class="text-center"
2930
>
30-
<FoTableColumn class="font-mono font-semibold text-accent">
31-
{{ prop.name }}
31+
<FoTableColumn class="font-mono font-semibold text-base-content">
32+
<LinkableApiName :name="prop.name"
33+
:declarations="prop.declarations"
34+
/>
3235
</FoTableColumn>
3336

34-
<FoTableColumn class="italic text-info whitespace-break-spaces!">
37+
<FoTableColumn class="italic text-base-content/70 whitespace-break-spaces!">
3538
{{ prop.description ?? '-' }}
3639
</FoTableColumn>
3740

38-
<FoTableColumn class="font-mono font-semibold text-warning whitespace-break-spaces!">
41+
<FoTableColumn class="font-mono font-semibold text-base-content/80 whitespace-break-spaces!">
3942
{{ prop.type }}
4043
</FoTableColumn>
4144

42-
<FoTableColumn class="text-wrap! font-mono font-semibold text-success">
45+
<FoTableColumn class="text-wrap! font-mono font-semibold text-base-content/80">
4346
{{ getValues(prop.schema) }}
4447
</FoTableColumn>
48+
49+
<FoTableColumn class="font-mono font-semibold text-error uppercase">
50+
{{ prop.required }}
51+
</FoTableColumn>
4552
</FoTableRow>
4653
</template>
4754
</FoTable>
@@ -51,6 +58,7 @@
5158
import type { Api } from '@/Api/Types/Api.ts';
5259
5360
import type { PropertyMeta, PropertyMetaSchema } from 'vue-component-meta';
61+
import LinkableApiName from '@/Api/UI/LinkableApiName.vue';
5462
import { useArrayFilter } from '@vueuse/core';
5563
import { FoTable, FoTableColumn, FoTableHeader, FoTableRow } from 'flyonui-vue';
5664

packages/docs/Api/UI/SlotsApi.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<FoTable v-if="api.length"
33
:id="`${componentName}-slots`"
4-
class="vp-raw rounded-lg my-4 max-w-xl"
4+
class="vp-raw rounded-lg my-4"
55
is-bordered
66
is-responsive
77
is-striped="rows"
@@ -25,11 +25,13 @@
2525
:key="slot.name"
2626
class="text-center"
2727
>
28-
<FoTableColumn class="font-mono font-semibold text-accent">
29-
{{ slot.name }}
28+
<FoTableColumn class="font-mono font-semibold text-base-content">
29+
<LinkableApiName :name="slot.name"
30+
:declarations="slot.declarations"
31+
/>
3032
</FoTableColumn>
3133

32-
<FoTableColumn class="italic text-info">
34+
<FoTableColumn class="italic text-base-content/70">
3335
{{ slot.description ?? '-' }}
3436
</FoTableColumn>
3537
</FoTableRow>
@@ -41,6 +43,7 @@
4143
import type { Api } from '@/Api/Types/Api.ts';
4244
import type { SlotMeta } from 'vue-component-meta';
4345
46+
import LinkableApiName from '@/Api/UI/LinkableApiName.vue';
4447
import { FoTable, FoTableColumn, FoTableHeader, FoTableRow } from 'flyonui-vue';
4548
4649
defineProps<Api<SlotMeta>>();

packages/docs/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default defineConfig({
1515
// In the GitHub action the docs are built before the execution of the tests, in local they might not be.
1616
command: process.env.CI ? previewCommand : `${workspaceCommand} build && ${previewCommand}`,
1717
url: baseURL,
18-
timeout: 120 * 1000,
18+
timeout: 600 * 1000,
1919
reuseExistingServer: !process.env.CI,
2020
},
2121
projects: [
36.7 KB
10.3 KB
61.7 KB
6.14 KB
16.2 KB
11.4 KB

0 commit comments

Comments
 (0)