Skip to content

Commit

Permalink
chore: broken docs deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jan 20, 2025
1 parent 30dba2e commit 3fe5e84
Show file tree
Hide file tree
Showing 13 changed files with 577 additions and 539 deletions.
7 changes: 0 additions & 7 deletions docs/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ export default defineAppConfig({
expand: true,
duration: 5000,
},
theme: {
radius: 0.25,
},
ui: {
icons: {
caution: 'i-carbon-warning-alt',
Expand Down Expand Up @@ -37,10 +34,6 @@ export default defineAppConfig({
minus: 'i-carbon-subtract',
search: 'i-carbon-search',
},
colors: {
primary: 'green',
gray: 'slate',
},
},
uiPro: {
prose: {
Expand Down
94 changes: 0 additions & 94 deletions docs/app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,97 +22,3 @@ provide('modules', modules)
<Footer />
</UApp>
</template>

<style>
@import "tailwindcss";
@import "@nuxt/ui-pro";
@theme {
--font-family-sans: 'Hubot Sans', sans-serif;
--font-family-mono: 'Fira Code', monospace;
--color-green-50: #EFFDF5;
--color-green-100: #D9FBE8;
--color-green-200: #B3F5D1;
--color-green-300: #75EDAE;
--color-green-400: #00DC82;
--color-green-500: #00C16A;
--color-green-600: #00A155;
--color-green-700: #007F45;
--color-green-800: #016538;
--color-green-900: #0A5331;
--color-green-950: #052E16;
}
:root {
--container-width: 90rem;
}
body {
-webkit-font-smoothing: antialiased;
}
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
p {
text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
text-wrap: balance;
}
#root, #__nuxt {
isolation: isolate;
}
html .light .shiki span {
color: var(--shiki-light);
background: var(--shiki-light-bg);
font-style: var(--shiki-light-font-style);
font-weight: var(--shiki-light-font-weight);
text-decoration: var(--shiki-light-text-decoration);
}
html.light .shiki span {
color: var(--shiki-light);
background: var(--shiki-light-bg);
font-style: var(--shiki-light-font-style);
font-weight: var(--shiki-light-font-weight);
text-decoration: var(--shiki-light-text-decoration);
}
html .default .shiki span {
color: var(--shiki-default);
background: var(--shiki-default-bg);
font-style: var(--shiki-default-font-style);
font-weight: var(--shiki-default-font-weight);
text-decoration: var(--shiki-default-text-decoration);
}
html .shiki span {
color: var(--shiki-default);
background: var(--shiki-default-bg);
font-style: var(--shiki-default-font-style);
font-weight: var(--shiki-default-font-weight);
text-decoration: var(--shiki-default-text-decoration);
}
html .dark .shiki span {
color: var(--shiki-dark);
background: var(--shiki-dark-bg);
font-style: var(--shiki-dark-font-style);
font-weight: var(--shiki-dark-font-weight);
text-decoration: var(--shiki-dark-text-decoration);
}
html.dark .shiki span {
color: var(--shiki-dark);
background: var(--shiki-dark-bg);
font-style: var(--shiki-dark-font-style);
font-weight: var(--shiki-dark-font-weight);
text-decoration: var(--shiki-dark-text-decoration);
}
</style>
85 changes: 43 additions & 42 deletions docs/app/components/ui/Breadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
/* eslint-disable */
<script lang="ts">
import type { AvatarProps, LinkProps } from '#ui/types'
import type { DynamicSlots, PartialString } from '#ui/types/utils'
import { tv } from 'tailwind-variants'
import type { AppConfig } from '@nuxt/schema'
import _appConfig from '#build/app.config'
import theme from '#build/ui/breadcrumb'
import { tv } from 'tailwind-variants'
</script>
import type { AvatarProps, LinkProps } from '#ui/types'
import type { DynamicSlots, PartialString } from '#ui/types/utils'
<script setup lang="ts" generic="T extends BreadcrumbItem">
import UAvatar from '#ui/components/Avatar.vue'
import UIcon from '#ui/components/Icon.vue'
import ULink from '#ui/components/Link.vue'
import ULinkBase from '#ui/components/LinkBase.vue'
import { pickLinkProps } from '#ui/utils/link'
import { Primitive } from 'radix-vue'
const appConfig = _appConfig as AppConfig & { ui: { breadcrumb: Partial<typeof theme> } }
const breadcrumb = tv({ extend: tv(theme), ...(appConfig.ui?.breadcrumb || {}) })
export interface BreadcrumbItem extends Omit<LinkProps, 'raw' | 'custom'> {
label?: string
Expand Down Expand Up @@ -46,53 +41,59 @@ export type BreadcrumbSlots<T extends { slot?: string }> = {
'item-leading': SlotProps<T>
'item-label': SlotProps<T>
'item-trailing': SlotProps<T>
'separator': (props?: {}) => any
'separator'(props?: {}): any
} & DynamicSlots<T, SlotProps<T>>
const props = defineProps<BreadcrumbProps<T>>()
</script>

const slots = defineSlots<BreadcrumbSlots<T>>()
<script setup lang="ts" generic="T extends BreadcrumbItem">
import { Primitive } from 'radix-vue'
import { useAppConfig } from '#imports'
import UIcon from '#ui/components/Icon.vue'
import UAvatar from '#ui/components/Avatar.vue'
import ULinkBase from '#ui/components/LinkBase.vue'
import ULink from '#ui/components/Link.vue'
import { pickLinkProps } from '#ui/utils/link'
const appConfig = _appConfig as AppConfig & { ui: { breadcrumb: Partial<typeof theme> } }
const props = defineProps<BreadcrumbProps<T>>()
const slots = defineSlots<BreadcrumbSlots<T>>()
const breadcrumb = tv({ extend: tv(theme), ...(appConfig.ui?.breadcrumb || {}) })
const appConfig = useAppConfig()
// eslint-disable-next-line vue/no-dupe-keys
const ui = breadcrumb()
</script>

<template>
<Primitive :as="as" aria-label="breadcrumb" :class="ui.root({ class: [props.class, props.ui?.root] })">
<ol :class="ui.list({ class: props.ui?.list })">
<div>
items: {{ items }}
</div>
<template v-for="(item, index) in items" :key="index">
<li :class="ui.item({ class: props.ui?.item })">
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
<ULinkBase v-bind="slotProps" as="span" :aria-current="active && (index === items!.length - 1) ? 'page' : undefined" :class="ui.link({ class: [props.ui?.link, item.class], active: index === items!.length - 1, disabled: !!item.disabled, to: !!item.to })">
<slot :name="item.slot || 'item'" :item="item" :index="index">
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="index === items!.length - 1" :index="index">
<UAvatar v-if="item.avatar" :size="((props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: props.ui?.linkLeadingAvatar, active: index === items!.length - 1 })" />
<UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon, active: index === items!.length - 1 })" />
</slot>
<li :class="ui.item({ class: props.ui?.item })">
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
<ULinkBase v-bind="slotProps" as="span" :aria-current="active && (index === items!.length - 1) ? 'page' : undefined" :class="ui.link({ class: [props.ui?.link, item.class], active: index === items!.length - 1, disabled: !!item.disabled, to: !!item.to })">
<slot :name="item.slot || 'item'" :item="item" :index="index">
<slot :name="item.slot ? `${item.slot}-leading`: 'item-leading'" :item="item" :active="index === items!.length - 1" :index="index">
<UAvatar v-if="item.avatar" :size="((props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: props.ui?.linkLeadingAvatar, active: index === items!.length - 1 })" />
<UIcon v-else-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: props.ui?.linkLeadingIcon, active: index === items!.length - 1 })" />
</slot>

<span v-if="item.label || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: props.ui?.linkLabel })">
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="index === items!.length - 1" :index="index">
{{ item.label }}
</slot>
</span>
<span v-if="item.label || !!slots[item.slot ? `${item.slot}-label`: 'item-label']" :class="ui.linkLabel({ class: props.ui?.linkLabel })">
<slot :name="item.slot ? `${item.slot}-label`: 'item-label'" :item="item" :active="index === items!.length - 1" :index="index">
{{ item.label }}
</slot>
</span>

<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="index === items!.length - 1" :index="index" />
</slot>
</ULinkBase>
</ULink>
</li>
<slot :name="item.slot ? `${item.slot}-trailing`: 'item-trailing'" :item="item" :active="index === items!.length - 1" :index="index" />
</slot>
</ULinkBase>
</ULink>
</li>

<li v-if="index < items!.length - 1" role="presentation" :class="ui.separator({ class: props.ui?.separator })">
<slot name="separator">
<UIcon :name="separatorIcon || appConfig.ui.icons.chevronRight" :class="ui.separatorIcon({ class: props.ui?.separatorIcon })" />
</slot>
</li>
<li v-if="index < items!.length - 1" role="presentation" :class="ui.separator({ class: props.ui?.separator })">
<slot name="separator">
<UIcon :name="separatorIcon || appConfig.ui.icons.chevronRight" :class="ui.separatorIcon({ class: props.ui?.separatorIcon })" />
</slot>
</li>
</template>
</ol>
</Primitive>
Expand Down
Loading

0 comments on commit 3fe5e84

Please sign in to comment.