Skip to content

Commit

Permalink
chore(docs): update pdf-make version in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BayBreezy committed Dec 30, 2023
1 parent a6ac3d6 commit 361a30b
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 23 deletions.
3 changes: 1 addition & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@
"@nuxt-themes/docus": "^1.15.0",
"@nuxt/devtools": "^1.0.6",
"@nuxt/eslint-config": "^0.2.0",
"@nuxthq/ui": "^2.7.0",
"@types/node": "^20.10.6",
"eslint": "^8.56.0",
"nuxt": "^3.9.0",
"nuxt-pdfmake": "^0.0.14"
"nuxt-pdfmake": "^0.0.15"
}
}
37 changes: 30 additions & 7 deletions playground/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,50 @@
<div>
<UiNavbar sticky>
<UiContainer class="flex h-14 items-center justify-between">
<p class="font-semibold">Nuxt PDFMake</p>
<UiButton size="icon-sm" variant="ghost" @click="toggleMode">
<icon class="size-5" name="lucide:sun-medium" />
<p class="font-semibold">
Nuxt PDFMake
</p>
<UiButton
size="icon-sm"
variant="ghost"
@click="toggleMode"
>
<icon
class="size-5"
name="lucide:sun-medium"
/>
</UiButton>
</UiContainer>
</UiNavbar>
<UiContainer class="py-5">
<div>
<p class="text-lg font-medium">Open in new window</p>
<p class="text-lg font-medium">
Open in new window
</p>
<p class="mb-4 mt-1 text-muted-foreground">
Click the button below to open the pdf table in a new window
</p>
<UiButton size="sm" variant="outline" label="Print table" @click="exportData" />
<UiButton
size="sm"
variant="outline"
label="Print table"
@click="exportData"
/>
<UiDivider class="my-6" />
</div>
<div>
<p class="text-lg font-medium">Column example</p>
<p class="text-lg font-medium">
Column example
</p>
<p class="mb-4 mt-1 text-muted-foreground">
Here we use the composable to export a column example. The font was also updated
</p>
<UiButton size="sm" variant="outline" label="Print article" @click="exportComposable" />
<UiButton
size="sm"
variant="outline"
label="Print article"
@click="exportComposable"
/>
</div>
</UiContainer>
</div>
Expand Down
14 changes: 11 additions & 3 deletions playground/components/Ui/Avatar/Avatar.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
<template>
<AvatarRoot :as="as" :as-child="asChild" :class="styles({ class: props.class })">
<AvatarRoot
:as="as"
:as-child="asChild"
:class="styles({ class: props.class })"
>
<slot>
<slot name="image">
<UiAvatarImage
@loading-status-change="emits('loadingStatusChange', $event)"
v-if="src"
:src="src"
:alt="alt"
:class="imageClass"
@loading-status-change="emits('loadingStatusChange', $event)"
/>
</slot>
<slot name="fallback">
<UiAvatarFallback :delay-ms="delayMs" :class="fallbackClass" :fallback="fallback" />
<UiAvatarFallback
:delay-ms="delayMs"
:class="fallbackClass"
:fallback="fallback"
/>
</slot>
</slot>
</AvatarRoot>
Expand Down
5 changes: 4 additions & 1 deletion playground/components/Ui/Avatar/Image.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<AvatarImage v-bind="reactiveOmit(props, 'class')" :class="styles({ class: props.class })" />
<AvatarImage
v-bind="reactiveOmit(props, 'class')"
:class="styles({ class: props.class })"
/>
</template>

<script lang="ts" setup>
Expand Down
7 changes: 5 additions & 2 deletions playground/components/Ui/Container.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<Primitive :class="styles({ class: props.class })" v-bind="reactiveOmit(props, 'class')">
<slot></slot>
<Primitive
:class="styles({ class: props.class })"
v-bind="reactiveOmit(props, 'class')"
>
<slot />
</Primitive>
</template>

Expand Down
31 changes: 25 additions & 6 deletions playground/components/Ui/Divider.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,43 @@
<template>
<Primitive as="div" :class="base({ orientation, type, class: props.class })">
<Separator :orientation="orientation" :class="border({ orientation, type })" />
<Primitive
as="div"
:class="base({ orientation, type, class: props.class })"
>
<Separator
:orientation="orientation"
:class="border({ orientation, type })"
/>
<template v-if="label || icon || avatar || $slots.default">
<div :class="container({ orientation, type })">
<slot>
<slot name="label">
<span v-if="label" :class="labelClass({ orientation, type })">
<span
v-if="label"
:class="labelClass({ orientation, type })"
>
{{ label }}
</span>
</slot>
<slot name="icon">
<Icon v-if="icon" :name="icon" :class="iconClass({ orientation, type })" />
<Icon
v-if="icon"
:name="icon"
:class="iconClass({ orientation, type })"
/>
</slot>
<slot name="avatar">
<UiAvatar v-if="avatar" :src="avatar" />
<UiAvatar
v-if="avatar"
:src="avatar"
/>
</slot>
</slot>
</div>
</template>
<Separator :orientation="orientation" :class="border({ orientation, type })" />
<Separator
:orientation="orientation"
:class="border({ orientation, type })"
/>
</Primitive>
</template>

Expand Down
7 changes: 5 additions & 2 deletions playground/components/Ui/Navbar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<Primitive :class="styles({ sticky, class: props.class })" v-bind="reactiveOmit(props, 'class')">
<slot> </slot>
<Primitive
:class="styles({ sticky, class: props.class })"
v-bind="reactiveOmit(props, 'class')"
>
<slot />
</Primitive>
</template>

Expand Down

0 comments on commit 361a30b

Please sign in to comment.