@eslamdevui/ui 3.2.0-beta.2 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nuxt/ui/alert.ts +0 -5
- package/.nuxt/ui/badge.ts +0 -5
- package/.nuxt/ui/button-group.ts +0 -13
- package/.nuxt/ui/button.ts +0 -5
- package/.nuxt/ui/carousel.ts +0 -5
- package/.nuxt/ui/content-surround.ts +0 -5
- package/.nuxt/ui/dashboard-navbar.ts +0 -5
- package/.nuxt/ui/dashboard-sidebar-collapse.ts +0 -5
- package/.nuxt/ui/dashboard-sidebar-toggle.ts +0 -5
- package/.nuxt/ui/dashboard-sidebar.ts +0 -10
- package/.nuxt/ui/index.ts +1 -48
- package/.nuxt/ui/input-menu.ts +0 -9
- package/.nuxt/ui/input-number.ts +0 -5
- package/.nuxt/ui/input-tags.ts +0 -9
- package/.nuxt/ui/input.ts +0 -9
- package/.nuxt/ui/select-menu.ts +0 -9
- package/.nuxt/ui/select.ts +0 -9
- package/.nuxt/ui/textarea.ts +0 -9
- package/.nuxt/ui/toast.ts +0 -5
- package/LICENSE.md +9 -9
- package/README.md +147 -147
- package/cli/commands/make/component.mjs +95 -95
- package/cli/commands/make/index.mjs +14 -14
- package/cli/commands/make/locale.mjs +64 -64
- package/cli/index.mjs +15 -15
- package/cli/package.json +13 -13
- package/cli/templates.mjs +236 -236
- package/cli/utils.mjs +31 -31
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Accordion.vue +36 -36
- package/dist/runtime/components/Alert.vue +46 -46
- package/dist/runtime/components/App.vue +10 -10
- package/dist/runtime/components/Avatar.vue +27 -27
- package/dist/runtime/components/AvatarGroup.vue +4 -4
- package/dist/runtime/components/Badge.vue +16 -16
- package/dist/runtime/components/Breadcrumb.vue +32 -32
- package/dist/runtime/components/Button.vue +28 -28
- package/dist/runtime/components/ButtonGroup.vue +3 -3
- package/dist/runtime/components/Calendar.vue +74 -74
- package/dist/runtime/components/Card.vue +13 -13
- package/dist/runtime/components/Carousel.vue +58 -58
- package/dist/runtime/components/ChatMessage.vue +35 -35
- package/dist/runtime/components/ChatMessages.vue +55 -55
- package/dist/runtime/components/ChatPrompt.vue +26 -26
- package/dist/runtime/components/ChatPromptSubmit.vue +10 -10
- package/dist/runtime/components/Checkbox.vue +33 -33
- package/dist/runtime/components/CheckboxGroup.vue +32 -32
- package/dist/runtime/components/Chip.vue +11 -11
- package/dist/runtime/components/Collapsible.vue +9 -9
- package/dist/runtime/components/ColorPicker.vue +30 -30
- package/dist/runtime/components/CommandPalette.vue +117 -117
- package/dist/runtime/components/Container.vue +3 -3
- package/dist/runtime/components/ContextMenu.vue +22 -22
- package/dist/runtime/components/ContextMenuContent.vue +105 -105
- package/dist/runtime/components/DashboardGroup.vue +3 -3
- package/dist/runtime/components/DashboardNavbar.vue +40 -40
- package/dist/runtime/components/DashboardPanel.vue +27 -27
- package/dist/runtime/components/DashboardResizeHandle.vue +7 -7
- package/dist/runtime/components/DashboardSearch.vue +20 -20
- package/dist/runtime/components/DashboardSearchButton.vue +43 -43
- package/dist/runtime/components/DashboardSidebar.vue +74 -74
- package/dist/runtime/components/DashboardSidebarCollapse.vue +7 -7
- package/dist/runtime/components/DashboardSidebarToggle.vue +7 -7
- package/dist/runtime/components/Drawer.vue +55 -55
- package/dist/runtime/components/DropdownMenu.vue +24 -24
- package/dist/runtime/components/DropdownMenuContent.vue +107 -107
- package/dist/runtime/components/Error.vue +22 -22
- package/dist/runtime/components/Form.vue +8 -8
- package/dist/runtime/components/FormField.vue +37 -37
- package/dist/runtime/components/Icon.vue +1 -1
- package/dist/runtime/components/Input.vue +34 -34
- package/dist/runtime/components/InputMenu.vue +163 -163
- package/dist/runtime/components/InputNumber.vue +49 -49
- package/dist/runtime/components/InputTags.vue +55 -55
- package/dist/runtime/components/Kbd.vue +5 -5
- package/dist/runtime/components/Link.vue +14 -14
- package/dist/runtime/components/LinkBase.vue +8 -8
- package/dist/runtime/components/Modal.vue +69 -69
- package/dist/runtime/components/NavigationMenu.vue +166 -166
- package/dist/runtime/components/OverlayProvider.vue +9 -9
- package/dist/runtime/components/Pagination.vue +47 -47
- package/dist/runtime/components/PinInput.vue +20 -20
- package/dist/runtime/components/Popover.vue +17 -17
- package/dist/runtime/components/Progress.vue +19 -19
- package/dist/runtime/components/RadioGroup.vue +43 -43
- package/dist/runtime/components/Select.vue +96 -96
- package/dist/runtime/components/SelectMenu.vue +130 -130
- package/dist/runtime/components/Separator.vue +15 -15
- package/dist/runtime/components/Skeleton.vue +10 -10
- package/dist/runtime/components/Slideover.vue +76 -76
- package/dist/runtime/components/Slider.vue +27 -27
- package/dist/runtime/components/Stepper.vue +51 -51
- package/dist/runtime/components/Switch.vue +33 -33
- package/dist/runtime/components/Table.vue +77 -77
- package/dist/runtime/components/Tabs.vue +37 -37
- package/dist/runtime/components/Textarea.vue +33 -33
- package/dist/runtime/components/Timeline.vue +38 -38
- package/dist/runtime/components/Toast.vue +69 -69
- package/dist/runtime/components/Toaster.vue +28 -28
- package/dist/runtime/components/Tooltip.vue +19 -19
- package/dist/runtime/components/Tree.vue +60 -60
- package/dist/runtime/components/color-mode/ColorModeAvatar.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeButton.vue +16 -16
- package/dist/runtime/components/color-mode/ColorModeImage.vue +2 -2
- package/dist/runtime/components/color-mode/ColorModeSelect.vue +19 -19
- package/dist/runtime/components/color-mode/ColorModeSwitch.vue +19 -19
- package/dist/runtime/components/content/ContentNavigation.vue +109 -109
- package/dist/runtime/components/content/ContentSearch.vue +25 -25
- package/dist/runtime/components/content/ContentSearchButton.vue +38 -38
- package/dist/runtime/components/content/ContentSearchButton.vue.d.ts +12 -12
- package/dist/runtime/components/content/ContentSurround.vue +29 -29
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +59 -59
- package/dist/runtime/components/content/ContentToc.vue +68 -68
- package/dist/runtime/components/content/ContentToc.vue.d.ts +88 -88
- package/dist/runtime/components/locale/LocaleSelect.vue +20 -20
- package/dist/runtime/components/prose/A.vue +3 -3
- package/dist/runtime/components/prose/Accordion.vue +5 -5
- package/dist/runtime/components/prose/AccordionItem.vue +5 -5
- package/dist/runtime/components/prose/Badge.vue +3 -3
- package/dist/runtime/components/prose/Blockquote.vue +3 -3
- package/dist/runtime/components/prose/Callout.vue +27 -27
- package/dist/runtime/components/prose/Card.vue +43 -43
- package/dist/runtime/components/prose/CardGroup.vue +3 -3
- package/dist/runtime/components/prose/Code.vue +3 -3
- package/dist/runtime/components/prose/CodeCollapse.vue +16 -16
- package/dist/runtime/components/prose/CodeGroup.vue +15 -15
- package/dist/runtime/components/prose/CodeIcon.vue +1 -1
- package/dist/runtime/components/prose/CodePreview.vue +9 -9
- package/dist/runtime/components/prose/CodeTree.vue +61 -61
- package/dist/runtime/components/prose/Collapsible.vue +15 -15
- package/dist/runtime/components/prose/Em.vue +1 -1
- package/dist/runtime/components/prose/Field.vue +23 -23
- package/dist/runtime/components/prose/FieldGroup.vue +3 -3
- package/dist/runtime/components/prose/H1.vue +6 -6
- package/dist/runtime/components/prose/H2.vue +10 -10
- package/dist/runtime/components/prose/H3.vue +10 -10
- package/dist/runtime/components/prose/H4.vue +6 -6
- package/dist/runtime/components/prose/Hr.vue +1 -1
- package/dist/runtime/components/prose/Icon.vue +1 -1
- package/dist/runtime/components/prose/Img.vue +8 -8
- package/dist/runtime/components/prose/Kbd.vue +1 -1
- package/dist/runtime/components/prose/Li.vue +3 -3
- package/dist/runtime/components/prose/Ol.vue +3 -3
- package/dist/runtime/components/prose/P.vue +3 -3
- package/dist/runtime/components/prose/Pre.vue +20 -20
- package/dist/runtime/components/prose/Script.vue +3 -3
- package/dist/runtime/components/prose/Steps.vue +3 -3
- package/dist/runtime/components/prose/Strong.vue +3 -3
- package/dist/runtime/components/prose/Table.vue +5 -5
- package/dist/runtime/components/prose/Tabs.vue +14 -14
- package/dist/runtime/components/prose/TabsItem.vue +5 -5
- package/dist/runtime/components/prose/Tbody.vue +3 -3
- package/dist/runtime/components/prose/Td.vue +3 -3
- package/dist/runtime/components/prose/Th.vue +3 -3
- package/dist/runtime/components/prose/Thead.vue +3 -3
- package/dist/runtime/components/prose/Tr.vue +3 -3
- package/dist/runtime/components/prose/Ul.vue +3 -3
- package/dist/runtime/components/prose/callout/Caution.vue +3 -3
- package/dist/runtime/components/prose/callout/Note.vue +3 -3
- package/dist/runtime/components/prose/callout/Tip.vue +3 -3
- package/dist/runtime/components/prose/callout/Warning.vue +3 -3
- package/dist/runtime/inertia/components/Link.vue +12 -12
- package/dist/runtime/inertia/components/LinkBase.vue +15 -15
- package/dist/runtime/types/app.config.d.ts +6 -6
- package/dist/runtime/vue/components/Icon.vue +1 -1
- package/dist/runtime/vue/components/Link.vue +31 -31
- package/dist/runtime/vue/components/color-mode/ColorModeButton.vue +7 -7
- package/dist/runtime/vue/components/color-mode/ColorModeSelect.vue +7 -7
- package/dist/runtime/vue/components/color-mode/ColorModeSwitch.vue +7 -7
- package/package.json +1 -1
- package/vue-plugin.d.ts +5 -5
- package/.nuxt/ui/content/content-navigation.ts +0 -339
- package/.nuxt/ui/content/content-search-button.ts +0 -6
- package/.nuxt/ui/content/content-search.ts +0 -6
- package/.nuxt/ui/content/content-surround.ts +0 -39
- package/.nuxt/ui/content/content-toc.ts +0 -150
- package/.nuxt/ui/content/index.ts +0 -5
- package/.nuxt/ui/error.ts +0 -9
- package/.nuxt/ui/prose/a.ts +0 -6
- package/.nuxt/ui/prose/accordion-item.ts +0 -3
- package/.nuxt/ui/prose/accordion.ts +0 -6
- package/.nuxt/ui/prose/badge.ts +0 -3
- package/.nuxt/ui/prose/blockquote.ts +0 -3
- package/.nuxt/ui/prose/callout.ts +0 -129
- package/.nuxt/ui/prose/card-group.ts +0 -3
- package/.nuxt/ui/prose/card.ts +0 -119
- package/.nuxt/ui/prose/code-collapse.ts +0 -19
- package/.nuxt/ui/prose/code-group.ts +0 -13
- package/.nuxt/ui/prose/code-icon.ts +0 -66
- package/.nuxt/ui/prose/code-preview.ts +0 -14
- package/.nuxt/ui/prose/code-tree.ts +0 -28
- package/.nuxt/ui/prose/code.ts +0 -27
- package/.nuxt/ui/prose/collapsible.ts +0 -12
- package/.nuxt/ui/prose/em.ts +0 -3
- package/.nuxt/ui/prose/field-group.ts +0 -3
- package/.nuxt/ui/prose/field.ts +0 -11
- package/.nuxt/ui/prose/h1.ts +0 -6
- package/.nuxt/ui/prose/h2.ts +0 -14
- package/.nuxt/ui/prose/h3.ts +0 -14
- package/.nuxt/ui/prose/h4.ts +0 -6
- package/.nuxt/ui/prose/hr.ts +0 -3
- package/.nuxt/ui/prose/icon.ts +0 -3
- package/.nuxt/ui/prose/img.ts +0 -3
- package/.nuxt/ui/prose/index.ts +0 -41
- package/.nuxt/ui/prose/kbd.ts +0 -3
- package/.nuxt/ui/prose/li.ts +0 -3
- package/.nuxt/ui/prose/ol.ts +0 -3
- package/.nuxt/ui/prose/p.ts +0 -3
- package/.nuxt/ui/prose/pre.ts +0 -17
- package/.nuxt/ui/prose/steps.ts +0 -19
- package/.nuxt/ui/prose/strong.ts +0 -3
- package/.nuxt/ui/prose/table.ts +0 -6
- package/.nuxt/ui/prose/tabs-item.ts +0 -3
- package/.nuxt/ui/prose/tabs.ts +0 -5
- package/.nuxt/ui/prose/tbody.ts +0 -3
- package/.nuxt/ui/prose/td.ts +0 -3
- package/.nuxt/ui/prose/th.ts +0 -3
- package/.nuxt/ui/prose/thead.ts +0 -3
- package/.nuxt/ui/prose/tr.ts +0 -3
- package/.nuxt/ui/prose/ul.ts +0 -3
|
@@ -75,72 +75,72 @@ nuxtApp.hooks.hook("page:transition:finish", () => {
|
|
|
75
75
|
</script>
|
|
76
76
|
|
|
77
77
|
<template>
|
|
78
|
-
<!-- eslint-disable-next-line vue/no-template-shadow -->
|
|
79
|
-
<DefineListTemplate v-slot="{ links, level }">
|
|
80
|
-
<ul :class="level > 0 ? ui.listWithChildren({ class: props.ui?.listWithChildren }) : ui.list({ class: props.ui?.list })">
|
|
81
|
-
<li v-for="(link, index) in links" :key="index" :class="link.children && link.children.length > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, link.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, link.ui?.item] })">
|
|
82
|
-
<a :href="`#${link.id}`" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active: activeHeadings.includes(link.id) })" @click.prevent="scrollToHeading(link.id)">
|
|
83
|
-
<slot name="link" :link="link">
|
|
84
|
-
<span :class="ui.linkText({ class: [props.ui?.linkText, link.ui?.linkText] })">
|
|
85
|
-
{{ link.text }}
|
|
86
|
-
</span>
|
|
87
|
-
</slot>
|
|
88
|
-
</a>
|
|
89
|
-
|
|
90
|
-
<ReuseListTemplate v-if="link.children?.length" :links="link.children" :level="level + 1" />
|
|
91
|
-
</li>
|
|
92
|
-
</ul>
|
|
93
|
-
</DefineListTemplate>
|
|
94
|
-
|
|
95
|
-
<DefineTriggerTemplate v-slot="{ open }">
|
|
96
|
-
<slot name="leading" :open="open" />
|
|
97
|
-
|
|
98
|
-
<span :class="ui.title({ class: props.ui?.title })">
|
|
99
|
-
<slot :open="open">{{ title || t("contentToc.title") }}</slot>
|
|
100
|
-
</span>
|
|
101
|
-
|
|
102
|
-
<span :class="ui.trailing({ class: props.ui?.trailing })">
|
|
103
|
-
<slot name="trailing" :open="open">
|
|
104
|
-
<UIcon :name="trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
105
|
-
</slot>
|
|
106
|
-
</span>
|
|
107
|
-
</DefineTriggerTemplate>
|
|
108
|
-
|
|
109
|
-
<CollapsibleRoot v-slot="{ open }" v-bind="rootProps" :default-open="defaultOpen" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
110
|
-
<div :class="ui.container({ class: props.ui?.container })">
|
|
111
|
-
<div v-if="!!slots.top" :class="ui.top({ class: props.ui?.top })">
|
|
112
|
-
<slot name="top" :links="links" />
|
|
113
|
-
</div>
|
|
114
|
-
|
|
115
|
-
<template v-if="links?.length">
|
|
116
|
-
<CollapsibleTrigger :class="ui.trigger({ class: 'lg:hidden' })">
|
|
117
|
-
<ReuseTriggerTemplate :open="open" />
|
|
118
|
-
</CollapsibleTrigger>
|
|
119
|
-
|
|
120
|
-
<CollapsibleContent :class="ui.content({ class: [props.ui?.content, 'lg:hidden'] })">
|
|
121
|
-
<div v-if="highlight" :class="ui.indicator({ class: props.ui?.indicator })" :style="indicatorStyle" />
|
|
122
|
-
|
|
123
|
-
<slot name="content" :links="links">
|
|
124
|
-
<ReuseListTemplate :links="links" :level="0" />
|
|
125
|
-
</slot>
|
|
126
|
-
</CollapsibleContent>
|
|
127
|
-
|
|
128
|
-
<p :class="ui.trigger({ class: 'hidden lg:flex' })">
|
|
129
|
-
<ReuseTriggerTemplate :open="open" />
|
|
130
|
-
</p>
|
|
131
|
-
|
|
132
|
-
<div :class="ui.content({ class: [props.ui?.content, 'hidden lg:flex'] })">
|
|
133
|
-
<div v-if="highlight" :class="ui.indicator({ class: props.ui?.indicator })" :style="indicatorStyle" />
|
|
134
|
-
|
|
135
|
-
<slot name="content" :links="links">
|
|
136
|
-
<ReuseListTemplate :links="links" :level="0" />
|
|
137
|
-
</slot>
|
|
138
|
-
</div>
|
|
139
|
-
</template>
|
|
140
|
-
|
|
141
|
-
<div v-if="!!slots.bottom" :class="ui.bottom({ class: props.ui?.bottom, body: !!slots.top || !!links?.length })">
|
|
142
|
-
<slot name="bottom" :links="links" />
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</CollapsibleRoot>
|
|
78
|
+
<!-- eslint-disable-next-line vue/no-template-shadow -->
|
|
79
|
+
<DefineListTemplate v-slot="{ links, level }">
|
|
80
|
+
<ul :class="level > 0 ? ui.listWithChildren({ class: props.ui?.listWithChildren }) : ui.list({ class: props.ui?.list })">
|
|
81
|
+
<li v-for="(link, index) in links" :key="index" :class="link.children && link.children.length > 0 ? ui.itemWithChildren({ class: [props.ui?.itemWithChildren, link.ui?.itemWithChildren] }) : ui.item({ class: [props.ui?.item, link.ui?.item] })">
|
|
82
|
+
<a :href="`#${link.id}`" :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], active: activeHeadings.includes(link.id) })" @click.prevent="scrollToHeading(link.id)">
|
|
83
|
+
<slot name="link" :link="link">
|
|
84
|
+
<span :class="ui.linkText({ class: [props.ui?.linkText, link.ui?.linkText] })">
|
|
85
|
+
{{ link.text }}
|
|
86
|
+
</span>
|
|
87
|
+
</slot>
|
|
88
|
+
</a>
|
|
89
|
+
|
|
90
|
+
<ReuseListTemplate v-if="link.children?.length" :links="link.children" :level="level + 1" />
|
|
91
|
+
</li>
|
|
92
|
+
</ul>
|
|
93
|
+
</DefineListTemplate>
|
|
94
|
+
|
|
95
|
+
<DefineTriggerTemplate v-slot="{ open }">
|
|
96
|
+
<slot name="leading" :open="open" />
|
|
97
|
+
|
|
98
|
+
<span :class="ui.title({ class: props.ui?.title })">
|
|
99
|
+
<slot :open="open">{{ title || t("contentToc.title") }}</slot>
|
|
100
|
+
</span>
|
|
101
|
+
|
|
102
|
+
<span :class="ui.trailing({ class: props.ui?.trailing })">
|
|
103
|
+
<slot name="trailing" :open="open">
|
|
104
|
+
<UIcon :name="trailingIcon || appConfig.ui.icons.chevronDown" :class="ui.trailingIcon({ class: props.ui?.trailingIcon })" />
|
|
105
|
+
</slot>
|
|
106
|
+
</span>
|
|
107
|
+
</DefineTriggerTemplate>
|
|
108
|
+
|
|
109
|
+
<CollapsibleRoot v-slot="{ open }" v-bind="rootProps" :default-open="defaultOpen" :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
110
|
+
<div :class="ui.container({ class: props.ui?.container })">
|
|
111
|
+
<div v-if="!!slots.top" :class="ui.top({ class: props.ui?.top })">
|
|
112
|
+
<slot name="top" :links="links" />
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<template v-if="links?.length">
|
|
116
|
+
<CollapsibleTrigger :class="ui.trigger({ class: 'lg:hidden' })">
|
|
117
|
+
<ReuseTriggerTemplate :open="open" />
|
|
118
|
+
</CollapsibleTrigger>
|
|
119
|
+
|
|
120
|
+
<CollapsibleContent :class="ui.content({ class: [props.ui?.content, 'lg:hidden'] })">
|
|
121
|
+
<div v-if="highlight" :class="ui.indicator({ class: props.ui?.indicator })" :style="indicatorStyle" />
|
|
122
|
+
|
|
123
|
+
<slot name="content" :links="links">
|
|
124
|
+
<ReuseListTemplate :links="links" :level="0" />
|
|
125
|
+
</slot>
|
|
126
|
+
</CollapsibleContent>
|
|
127
|
+
|
|
128
|
+
<p :class="ui.trigger({ class: 'hidden lg:flex' })">
|
|
129
|
+
<ReuseTriggerTemplate :open="open" />
|
|
130
|
+
</p>
|
|
131
|
+
|
|
132
|
+
<div :class="ui.content({ class: [props.ui?.content, 'hidden lg:flex'] })">
|
|
133
|
+
<div v-if="highlight" :class="ui.indicator({ class: props.ui?.indicator })" :style="indicatorStyle" />
|
|
134
|
+
|
|
135
|
+
<slot name="content" :links="links">
|
|
136
|
+
<ReuseListTemplate :links="links" :level="0" />
|
|
137
|
+
</slot>
|
|
138
|
+
</div>
|
|
139
|
+
</template>
|
|
140
|
+
|
|
141
|
+
<div v-if="!!slots.bottom" :class="ui.bottom({ class: props.ui?.bottom, body: !!slots.top || !!links?.length })">
|
|
142
|
+
<slot name="bottom" :links="links" />
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</CollapsibleRoot>
|
|
146
146
|
</template>
|
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
import type { CollapsibleRootProps, CollapsibleRootEmits } from 'reka-ui'
|
|
2
|
-
import type { TocLink } from '@nuxt/content'
|
|
3
|
-
import type { AppConfig } from '@nuxt/schema'
|
|
4
|
-
import type { ComponentConfig } from '@nuxt/ui'
|
|
5
|
-
import type theme from '#build/ui-pro/content/content-toc'
|
|
6
|
-
|
|
7
|
-
type ContentToc = ComponentConfig<typeof theme, AppConfig, 'contentToc', 'uiPro'>
|
|
8
|
-
export type ContentTocLink = TocLink & {
|
|
9
|
-
class?: any
|
|
10
|
-
ui?: Pick<ContentToc['slots'], 'item' | 'itemWithChildren' | 'link' | 'linkText'>
|
|
11
|
-
}
|
|
12
|
-
export interface ContentTocProps<T extends ContentTocLink = ContentTocLink> extends Pick<CollapsibleRootProps, 'defaultOpen' | 'open'> {
|
|
13
|
-
/**
|
|
14
|
-
* The element or component this component should render as.
|
|
15
|
-
* @defaultValue 'nav'
|
|
16
|
-
*/
|
|
17
|
-
as?: any
|
|
18
|
-
/**
|
|
19
|
-
* The icon displayed to collapse the content.
|
|
20
|
-
* @defaultValue appConfig.ui.icons.chevronDown
|
|
21
|
-
* @IconifyIcon
|
|
22
|
-
*/
|
|
23
|
-
trailingIcon?: string
|
|
24
|
-
/**
|
|
25
|
-
* The title of the table of contents.
|
|
26
|
-
* @defaultValue t('contentToc.title')
|
|
27
|
-
*/
|
|
28
|
-
title?: string
|
|
29
|
-
/**
|
|
30
|
-
* @defaultValue 'primary'
|
|
31
|
-
*/
|
|
32
|
-
color?: ContentToc['variants']['color']
|
|
33
|
-
/**
|
|
34
|
-
* Display a line next to the active link.
|
|
35
|
-
* @defaultValue false
|
|
36
|
-
*/
|
|
37
|
-
highlight?: boolean
|
|
38
|
-
/**
|
|
39
|
-
* @defaultValue 'primary'
|
|
40
|
-
*/
|
|
41
|
-
highlightColor?: ContentToc['variants']['highlightColor']
|
|
42
|
-
links?: T[]
|
|
43
|
-
class?: any
|
|
44
|
-
ui?: ContentToc['slots']
|
|
45
|
-
}
|
|
46
|
-
export type ContentTocEmits = CollapsibleRootEmits & {
|
|
47
|
-
move: [id: string]
|
|
48
|
-
}
|
|
49
|
-
type SlotProps<T> = (props: {
|
|
50
|
-
link: T
|
|
51
|
-
}) => any
|
|
52
|
-
export interface ContentTocSlots<T extends ContentTocLink = ContentTocLink> {
|
|
53
|
-
leading(props: {
|
|
54
|
-
open: boolean
|
|
55
|
-
}): any
|
|
56
|
-
default(props: {
|
|
57
|
-
open: boolean
|
|
58
|
-
}): any
|
|
59
|
-
trailing(props: {
|
|
60
|
-
open: boolean
|
|
61
|
-
}): any
|
|
62
|
-
content(props: {
|
|
63
|
-
links: T[]
|
|
64
|
-
}): any
|
|
65
|
-
link: SlotProps<T>
|
|
66
|
-
top(props: {
|
|
67
|
-
links?: T[]
|
|
68
|
-
}): any
|
|
69
|
-
bottom(props: {
|
|
70
|
-
links?: T[]
|
|
71
|
-
}): any
|
|
72
|
-
}
|
|
73
|
-
declare const _default: <T extends ContentTocLink>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, 'attrs' | 'emit' | 'slots'>>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
|
|
74
|
-
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
75
|
-
readonly 'onUpdate:open'?: ((value: boolean) => any) | undefined
|
|
76
|
-
readonly 'onMove'?: ((id: string) => any) | undefined
|
|
77
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, 'onUpdate:open' | 'onMove'> & ContentTocProps<T> & Partial<{}>> & import('vue').PublicProps
|
|
78
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void
|
|
79
|
-
attrs: any
|
|
80
|
-
slots: ContentTocSlots<T>
|
|
81
|
-
emit: ((evt: 'update:open', value: boolean) => void) & ((evt: 'move', id: string) => void)
|
|
82
|
-
}>) => import('vue').VNode & {
|
|
83
|
-
__ctx?: Awaited<typeof __VLS_setup>
|
|
84
|
-
}
|
|
85
|
-
export default _default
|
|
86
|
-
type __VLS_PrettifyLocal<T> = {
|
|
87
|
-
[K in keyof T]: T[K];
|
|
88
|
-
} & {}
|
|
1
|
+
import type { CollapsibleRootProps, CollapsibleRootEmits } from 'reka-ui'
|
|
2
|
+
import type { TocLink } from '@nuxt/content'
|
|
3
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
4
|
+
import type { ComponentConfig } from '@nuxt/ui'
|
|
5
|
+
import type theme from '#build/ui-pro/content/content-toc'
|
|
6
|
+
|
|
7
|
+
type ContentToc = ComponentConfig<typeof theme, AppConfig, 'contentToc', 'uiPro'>
|
|
8
|
+
export type ContentTocLink = TocLink & {
|
|
9
|
+
class?: any
|
|
10
|
+
ui?: Pick<ContentToc['slots'], 'item' | 'itemWithChildren' | 'link' | 'linkText'>
|
|
11
|
+
}
|
|
12
|
+
export interface ContentTocProps<T extends ContentTocLink = ContentTocLink> extends Pick<CollapsibleRootProps, 'defaultOpen' | 'open'> {
|
|
13
|
+
/**
|
|
14
|
+
* The element or component this component should render as.
|
|
15
|
+
* @defaultValue 'nav'
|
|
16
|
+
*/
|
|
17
|
+
as?: any
|
|
18
|
+
/**
|
|
19
|
+
* The icon displayed to collapse the content.
|
|
20
|
+
* @defaultValue appConfig.ui.icons.chevronDown
|
|
21
|
+
* @IconifyIcon
|
|
22
|
+
*/
|
|
23
|
+
trailingIcon?: string
|
|
24
|
+
/**
|
|
25
|
+
* The title of the table of contents.
|
|
26
|
+
* @defaultValue t('contentToc.title')
|
|
27
|
+
*/
|
|
28
|
+
title?: string
|
|
29
|
+
/**
|
|
30
|
+
* @defaultValue 'primary'
|
|
31
|
+
*/
|
|
32
|
+
color?: ContentToc['variants']['color']
|
|
33
|
+
/**
|
|
34
|
+
* Display a line next to the active link.
|
|
35
|
+
* @defaultValue false
|
|
36
|
+
*/
|
|
37
|
+
highlight?: boolean
|
|
38
|
+
/**
|
|
39
|
+
* @defaultValue 'primary'
|
|
40
|
+
*/
|
|
41
|
+
highlightColor?: ContentToc['variants']['highlightColor']
|
|
42
|
+
links?: T[]
|
|
43
|
+
class?: any
|
|
44
|
+
ui?: ContentToc['slots']
|
|
45
|
+
}
|
|
46
|
+
export type ContentTocEmits = CollapsibleRootEmits & {
|
|
47
|
+
move: [id: string]
|
|
48
|
+
}
|
|
49
|
+
type SlotProps<T> = (props: {
|
|
50
|
+
link: T
|
|
51
|
+
}) => any
|
|
52
|
+
export interface ContentTocSlots<T extends ContentTocLink = ContentTocLink> {
|
|
53
|
+
leading(props: {
|
|
54
|
+
open: boolean
|
|
55
|
+
}): any
|
|
56
|
+
default(props: {
|
|
57
|
+
open: boolean
|
|
58
|
+
}): any
|
|
59
|
+
trailing(props: {
|
|
60
|
+
open: boolean
|
|
61
|
+
}): any
|
|
62
|
+
content(props: {
|
|
63
|
+
links: T[]
|
|
64
|
+
}): any
|
|
65
|
+
link: SlotProps<T>
|
|
66
|
+
top(props: {
|
|
67
|
+
links?: T[]
|
|
68
|
+
}): any
|
|
69
|
+
bottom(props: {
|
|
70
|
+
links?: T[]
|
|
71
|
+
}): any
|
|
72
|
+
}
|
|
73
|
+
declare const _default: <T extends ContentTocLink>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>['props'], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, 'attrs' | 'emit' | 'slots'>>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>['expose'], __VLS_setup?: Promise<{
|
|
74
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
75
|
+
readonly 'onUpdate:open'?: ((value: boolean) => any) | undefined
|
|
76
|
+
readonly 'onMove'?: ((id: string) => any) | undefined
|
|
77
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, 'onUpdate:open' | 'onMove'> & ContentTocProps<T> & Partial<{}>> & import('vue').PublicProps
|
|
78
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void
|
|
79
|
+
attrs: any
|
|
80
|
+
slots: ContentTocSlots<T>
|
|
81
|
+
emit: ((evt: 'update:open', value: boolean) => void) & ((evt: 'move', id: string) => void)
|
|
82
|
+
}>) => import('vue').VNode & {
|
|
83
|
+
__ctx?: Awaited<typeof __VLS_setup>
|
|
84
|
+
}
|
|
85
|
+
export default _default
|
|
86
|
+
type __VLS_PrettifyLocal<T> = {
|
|
87
|
+
[K in keyof T]: T[K];
|
|
88
|
+
} & {}
|
|
@@ -38,24 +38,24 @@ function getEmojiFlag(locale) {
|
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
40
|
<template>
|
|
41
|
-
<USelectMenu
|
|
42
|
-
v-model="modelValue"
|
|
43
|
-
:search-input="false"
|
|
44
|
-
value-key="code"
|
|
45
|
-
label-key="name"
|
|
46
|
-
:items="props.locales"
|
|
47
|
-
v-bind="$attrs"
|
|
48
|
-
>
|
|
49
|
-
<template #leading>
|
|
50
|
-
<span v-if="modelValue" class="size-5 text-center">
|
|
51
|
-
{{ getEmojiFlag(modelValue) }}
|
|
52
|
-
</span>
|
|
53
|
-
</template>
|
|
54
|
-
|
|
55
|
-
<template #item-leading="{ item }">
|
|
56
|
-
<span class="size-5 text-center">
|
|
57
|
-
{{ getEmojiFlag(item.code) }}
|
|
58
|
-
</span>
|
|
59
|
-
</template>
|
|
60
|
-
</USelectMenu>
|
|
41
|
+
<USelectMenu
|
|
42
|
+
v-model="modelValue"
|
|
43
|
+
:search-input="false"
|
|
44
|
+
value-key="code"
|
|
45
|
+
label-key="name"
|
|
46
|
+
:items="props.locales"
|
|
47
|
+
v-bind="$attrs"
|
|
48
|
+
>
|
|
49
|
+
<template #leading>
|
|
50
|
+
<span v-if="modelValue" class="size-5 text-center">
|
|
51
|
+
{{ getEmojiFlag(modelValue) }}
|
|
52
|
+
</span>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<template #item-leading="{ item }">
|
|
56
|
+
<span class="size-5 text-center">
|
|
57
|
+
{{ getEmojiFlag(item.code) }}
|
|
58
|
+
</span>
|
|
59
|
+
</template>
|
|
60
|
+
</USelectMenu>
|
|
61
61
|
</template>
|
|
@@ -18,7 +18,7 @@ defineSlots();
|
|
|
18
18
|
</script>
|
|
19
19
|
|
|
20
20
|
<template>
|
|
21
|
-
<ULink :href="href" :target="target" :class="ui({ class: props.class })" raw>
|
|
22
|
-
<slot />
|
|
23
|
-
</ULink>
|
|
21
|
+
<ULink :href="href" :target="target" :class="ui({ class: props.class })" raw>
|
|
22
|
+
<slot />
|
|
23
|
+
</ULink>
|
|
24
24
|
</template>
|
|
@@ -35,9 +35,9 @@ onBeforeUpdate(() => rerenderCount.value++);
|
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<template>
|
|
38
|
-
<UAccordion :type="type" :items="items" :unmount-on-hide="false" :class="props.class" :ui="transformUI(ui())">
|
|
39
|
-
<template #content="{ item }">
|
|
40
|
-
<component :is="item.component" />
|
|
41
|
-
</template>
|
|
42
|
-
</UAccordion>
|
|
38
|
+
<UAccordion :type="type" :items="items" :unmount-on-hide="false" :class="props.class" :ui="transformUI(ui())">
|
|
39
|
+
<template #content="{ item }">
|
|
40
|
+
<component :is="item.component" />
|
|
41
|
+
</template>
|
|
42
|
+
</UAccordion>
|
|
43
43
|
</template>
|
|
@@ -17,9 +17,9 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.accord
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<div :class="ui({ class: props.class })">
|
|
21
|
-
<slot>
|
|
22
|
-
{{ description }}
|
|
23
|
-
</slot>
|
|
24
|
-
</div>
|
|
20
|
+
<div :class="ui({ class: props.class })">
|
|
21
|
+
<slot>
|
|
22
|
+
{{ description }}
|
|
23
|
+
</slot>
|
|
24
|
+
</div>
|
|
25
25
|
</template>
|
|
@@ -15,7 +15,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.badge
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
<UBadge color="primary" variant="subtle" :class="ui({ class: props.class })">
|
|
19
|
-
<slot mdc-unwrap="p" />
|
|
20
|
-
</UBadge>
|
|
18
|
+
<UBadge color="primary" variant="subtle" :class="ui({ class: props.class })">
|
|
19
|
+
<slot mdc-unwrap="p" />
|
|
20
|
+
</UBadge>
|
|
21
21
|
</template>
|
|
@@ -15,7 +15,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.blockq
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
<blockquote :class="ui({ class: props.class })">
|
|
19
|
-
<slot />
|
|
20
|
-
</blockquote>
|
|
18
|
+
<blockquote :class="ui({ class: props.class })">
|
|
19
|
+
<slot />
|
|
20
|
+
</blockquote>
|
|
21
21
|
</template>
|
|
@@ -30,31 +30,31 @@ const target = computed(() => props.target || (!!props.to && typeof props.to ===
|
|
|
30
30
|
</script>
|
|
31
31
|
|
|
32
32
|
<template>
|
|
33
|
-
<div :class="ui.base({ class: props.class })">
|
|
34
|
-
<ULink
|
|
35
|
-
v-if="to"
|
|
36
|
-
v-bind="{ to, target, ...$attrs }"
|
|
37
|
-
class="focus:outline-none"
|
|
38
|
-
tabindex="-1"
|
|
39
|
-
raw
|
|
40
|
-
>
|
|
41
|
-
<span
|
|
42
|
-
class="absolute inset-0"
|
|
43
|
-
aria-hidden="true"
|
|
44
|
-
/>
|
|
45
|
-
</ULink>
|
|
46
|
-
|
|
47
|
-
<UIcon
|
|
48
|
-
v-if="icon"
|
|
49
|
-
:name="icon"
|
|
50
|
-
:class="ui.icon({ class: props.ui?.icon })"
|
|
51
|
-
/>
|
|
52
|
-
<UIcon
|
|
53
|
-
v-if="!!to && target === '_blank'"
|
|
54
|
-
:name="appConfig.ui.icons.external"
|
|
55
|
-
:class="ui.externalIcon({ class: props.ui?.externalIcon })"
|
|
56
|
-
/>
|
|
57
|
-
|
|
58
|
-
<slot mdc-unwrap="p" />
|
|
59
|
-
</div>
|
|
33
|
+
<div :class="ui.base({ class: props.class })">
|
|
34
|
+
<ULink
|
|
35
|
+
v-if="to"
|
|
36
|
+
v-bind="{ to, target, ...$attrs }"
|
|
37
|
+
class="focus:outline-none"
|
|
38
|
+
tabindex="-1"
|
|
39
|
+
raw
|
|
40
|
+
>
|
|
41
|
+
<span
|
|
42
|
+
class="absolute inset-0"
|
|
43
|
+
aria-hidden="true"
|
|
44
|
+
/>
|
|
45
|
+
</ULink>
|
|
46
|
+
|
|
47
|
+
<UIcon
|
|
48
|
+
v-if="icon"
|
|
49
|
+
:name="icon"
|
|
50
|
+
:class="ui.icon({ class: props.ui?.icon })"
|
|
51
|
+
/>
|
|
52
|
+
<UIcon
|
|
53
|
+
v-if="!!to && target === '_blank'"
|
|
54
|
+
:name="appConfig.ui.icons.external"
|
|
55
|
+
:class="ui.externalIcon({ class: props.ui?.externalIcon })"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<slot mdc-unwrap="p" />
|
|
59
|
+
</div>
|
|
60
60
|
</template>
|
|
@@ -37,47 +37,47 @@ const ui = computed(
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<template>
|
|
40
|
-
<div :class="ui.base({ class: props.class })">
|
|
41
|
-
<!-- Clickable Overlay -->
|
|
42
|
-
<ULink
|
|
43
|
-
v-if="to"
|
|
44
|
-
:to="to"
|
|
45
|
-
:target="target"
|
|
46
|
-
:aria-label="ariaLabel"
|
|
47
|
-
class="focus:outline-none"
|
|
48
|
-
tabindex="-1"
|
|
49
|
-
raw
|
|
50
|
-
v-bind="$attrs"
|
|
51
|
-
>
|
|
52
|
-
<span class="absolute inset-0" aria-hidden="true" />
|
|
53
|
-
</ULink>
|
|
54
|
-
|
|
55
|
-
<!-- Icon -->
|
|
56
|
-
<UIcon
|
|
57
|
-
v-if="icon"
|
|
58
|
-
:name="icon"
|
|
59
|
-
:class="ui.icon({ class: props.ui?.icon })"
|
|
60
|
-
/>
|
|
61
|
-
|
|
62
|
-
<!-- External Link Icon -->
|
|
63
|
-
<UIcon
|
|
64
|
-
v-if="to && target === '_blank'"
|
|
65
|
-
:name="appConfig.ui.icons.external"
|
|
66
|
-
:class="ui.externalIcon({ class: props.ui?.externalIcon })"
|
|
67
|
-
/>
|
|
68
|
-
|
|
69
|
-
<!-- Title -->
|
|
70
|
-
<p v-if="title || $slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
71
|
-
<slot name="title">
|
|
72
|
-
{{ title }}
|
|
73
|
-
</slot>
|
|
74
|
-
</p>
|
|
75
|
-
|
|
76
|
-
<!-- Description / Default Slot -->
|
|
77
|
-
<div v-if="$slots.default || description" :class="ui.description({ class: props.ui?.description })">
|
|
78
|
-
<slot>
|
|
79
|
-
{{ description }}
|
|
80
|
-
</slot>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
40
|
+
<div :class="ui.base({ class: props.class })">
|
|
41
|
+
<!-- Clickable Overlay -->
|
|
42
|
+
<ULink
|
|
43
|
+
v-if="to"
|
|
44
|
+
:to="to"
|
|
45
|
+
:target="target"
|
|
46
|
+
:aria-label="ariaLabel"
|
|
47
|
+
class="focus:outline-none"
|
|
48
|
+
tabindex="-1"
|
|
49
|
+
raw
|
|
50
|
+
v-bind="$attrs"
|
|
51
|
+
>
|
|
52
|
+
<span class="absolute inset-0" aria-hidden="true" />
|
|
53
|
+
</ULink>
|
|
54
|
+
|
|
55
|
+
<!-- Icon -->
|
|
56
|
+
<UIcon
|
|
57
|
+
v-if="icon"
|
|
58
|
+
:name="icon"
|
|
59
|
+
:class="ui.icon({ class: props.ui?.icon })"
|
|
60
|
+
/>
|
|
61
|
+
|
|
62
|
+
<!-- External Link Icon -->
|
|
63
|
+
<UIcon
|
|
64
|
+
v-if="to && target === '_blank'"
|
|
65
|
+
:name="appConfig.ui.icons.external"
|
|
66
|
+
:class="ui.externalIcon({ class: props.ui?.externalIcon })"
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
<!-- Title -->
|
|
70
|
+
<p v-if="title || $slots.title" :class="ui.title({ class: props.ui?.title })">
|
|
71
|
+
<slot name="title">
|
|
72
|
+
{{ title }}
|
|
73
|
+
</slot>
|
|
74
|
+
</p>
|
|
75
|
+
|
|
76
|
+
<!-- Description / Default Slot -->
|
|
77
|
+
<div v-if="$slots.default || description" :class="ui.description({ class: props.ui?.description })">
|
|
78
|
+
<slot>
|
|
79
|
+
{{ description }}
|
|
80
|
+
</slot>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
83
|
</template>
|
|
@@ -15,7 +15,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.cardGr
|
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
17
|
<template>
|
|
18
|
-
<div :class="ui({ class: props.class })">
|
|
19
|
-
<slot />
|
|
20
|
-
</div>
|
|
18
|
+
<div :class="ui({ class: props.class })">
|
|
19
|
+
<slot />
|
|
20
|
+
</div>
|
|
21
21
|
</template>
|
|
@@ -17,7 +17,7 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.code |
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<code :class="ui({ class: (props.class || '').split(',').join(' '), color: props.color })">
|
|
21
|
-
<slot />
|
|
22
|
-
</code>
|
|
20
|
+
<code :class="ui({ class: (props.class || '').split(',').join(' '), color: props.color })">
|
|
21
|
+
<slot />
|
|
22
|
+
</code>
|
|
23
23
|
</template>
|
|
@@ -25,20 +25,20 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.prose?.codeCo
|
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
|
-
<div :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
29
|
-
<slot />
|
|
30
|
-
|
|
31
|
-
<div :class="ui.footer({ class: props.ui?.footer })">
|
|
32
|
-
<UButton
|
|
33
|
-
:icon="icon || appConfig.ui.icons.chevronDown"
|
|
34
|
-
color="neutral"
|
|
35
|
-
variant="outline"
|
|
36
|
-
:data-state="open ? 'open' : 'closed'"
|
|
37
|
-
:label="`${open ? props.closeText || t('prose.codeCollapse.closeText') : props.openText || t('prose.codeCollapse.openText')} ${props.name || t('prose.codeCollapse.name')}`"
|
|
38
|
-
:class="ui.trigger({ class: props.ui?.trigger })"
|
|
39
|
-
:ui="{ leadingIcon: ui.triggerIcon({ class: props.ui?.triggerIcon }) }"
|
|
40
|
-
@click="open = !open"
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
28
|
+
<div :class="ui.root({ class: [props.ui?.root, props.class] })">
|
|
29
|
+
<slot />
|
|
30
|
+
|
|
31
|
+
<div :class="ui.footer({ class: props.ui?.footer })">
|
|
32
|
+
<UButton
|
|
33
|
+
:icon="icon || appConfig.ui.icons.chevronDown"
|
|
34
|
+
color="neutral"
|
|
35
|
+
variant="outline"
|
|
36
|
+
:data-state="open ? 'open' : 'closed'"
|
|
37
|
+
:label="`${open ? props.closeText || t('prose.codeCollapse.closeText') : props.openText || t('prose.codeCollapse.openText')} ${props.name || t('prose.codeCollapse.name')}`"
|
|
38
|
+
:class="ui.trigger({ class: props.ui?.trigger })"
|
|
39
|
+
:ui="{ leadingIcon: ui.triggerIcon({ class: props.ui?.triggerIcon }) }"
|
|
40
|
+
@click="open = !open"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
44
|
</template>
|