@eslamdevui/ui 3.2.2 → 3.3.1

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.
Files changed (29) hide show
  1. package/.nuxt/ui/dashboard-toolbar.ts +7 -0
  2. package/.nuxt/ui/index.ts +2 -47
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +37 -29
  5. package/dist/runtime/components/DashboardSidebarToggle.vue +6 -12
  6. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +10 -5
  7. package/dist/runtime/components/DashboardToolbar.vue +32 -0
  8. package/dist/runtime/components/DashboardToolbar.vue.d.ts +25 -0
  9. package/dist/runtime/components/PricingTable.vue +60 -13
  10. package/dist/runtime/components/Tabs.vue +15 -14
  11. package/dist/runtime/components/content/ContentSearch.vue +69 -60
  12. package/dist/runtime/components/content/ContentSearch.vue.d.ts +5 -1
  13. package/dist/runtime/components/content/ContentSurround.vue +11 -9
  14. package/dist/runtime/composables/useAvatarGroup.js +1 -1
  15. package/dist/runtime/composables/useBreakpoint.d.ts +11 -0
  16. package/dist/runtime/composables/useBreakpoint.js +53 -0
  17. package/dist/runtime/composables/useButtonGroup.js +1 -1
  18. package/dist/runtime/composables/useFormField.js +6 -6
  19. package/dist/runtime/composables/useLocale.js +1 -1
  20. package/dist/runtime/composables/usePortal.js +1 -1
  21. package/dist/runtime/composables/useQuerySection.d.ts +14 -0
  22. package/dist/runtime/composables/useQuerySection.js +44 -0
  23. package/dist/runtime/plugins/colors.js +3 -3
  24. package/dist/runtime/types/index.d.ts +1 -0
  25. package/dist/runtime/types/index.js +1 -0
  26. package/dist/shared/{ui.DErCA3YU.mjs → ui.i6pGHFq6.mjs} +9 -6
  27. package/dist/unplugin.mjs +7 -7
  28. package/dist/vite.mjs +1 -1
  29. package/package.json +20 -35
@@ -0,0 +1,7 @@
1
+ export default {
2
+ "slots": {
3
+ "root": "shrink-0 flex items-center justify-between border-b border-default px-4 sm:px-6 gap-1.5 overflow-x-auto min-h-[49px]",
4
+ "left": "flex items-center gap-1.5",
5
+ "right": "flex items-center gap-1.5"
6
+ }
7
+ }
package/.nuxt/ui/index.ts CHANGED
@@ -42,6 +42,7 @@ export { default as dashboardSearchButton } from './dashboard-search-button'
42
42
  export { default as dashboardSidebar } from './dashboard-sidebar'
43
43
  export { default as dashboardSidebarCollapse } from './dashboard-sidebar-collapse'
44
44
  export { default as dashboardSidebarToggle } from './dashboard-sidebar-toggle'
45
+ export { default as dashboardToolbar } from './dashboard-toolbar'
45
46
  export { default as drawer } from './drawer'
46
47
  export { default as dropdownMenu } from './dropdown-menu'
47
48
  export { default as error } from './error'
@@ -100,50 +101,4 @@ export { default as toast } from './toast'
100
101
  export { default as toaster } from './toaster'
101
102
  export { default as tooltip } from './tooltip'
102
103
  export { default as tree } from './tree'
103
- export { default as user } from './user'
104
- export { default as contentNavigation } from './content/content-navigation'
105
- export { default as contentSearch } from './content/content-search'
106
- export { default as contentSearchButton } from './content/content-search-button'
107
- export { default as contentSurround } from './content/content-surround'
108
- export { default as contentToc } from './content/content-toc'
109
- export { default as a } from './prose/a'
110
- export { default as accordion } from './prose/accordion'
111
- export { default as accordionItem } from './prose/accordion-item'
112
- export { default as badge } from './prose/badge'
113
- export { default as blockquote } from './prose/blockquote'
114
- export { default as callout } from './prose/callout'
115
- export { default as card } from './prose/card'
116
- export { default as cardGroup } from './prose/card-group'
117
- export { default as code } from './prose/code'
118
- export { default as codeCollapse } from './prose/code-collapse'
119
- export { default as codeGroup } from './prose/code-group'
120
- export { default as codeIcon } from './prose/code-icon'
121
- export { default as codePreview } from './prose/code-preview'
122
- export { default as codeTree } from './prose/code-tree'
123
- export { default as collapsible } from './prose/collapsible'
124
- export { default as em } from './prose/em'
125
- export { default as field } from './prose/field'
126
- export { default as fieldGroup } from './prose/field-group'
127
- export { default as h1 } from './prose/h1'
128
- export { default as h2 } from './prose/h2'
129
- export { default as h3 } from './prose/h3'
130
- export { default as h4 } from './prose/h4'
131
- export { default as hr } from './prose/hr'
132
- export { default as icon } from './prose/icon'
133
- export { default as img } from './prose/img'
134
- export { default as kbd } from './prose/kbd'
135
- export { default as li } from './prose/li'
136
- export { default as ol } from './prose/ol'
137
- export { default as p } from './prose/p'
138
- export { default as pre } from './prose/pre'
139
- export { default as steps } from './prose/steps'
140
- export { default as strong } from './prose/strong'
141
- export { default as table } from './prose/table'
142
- export { default as tabs } from './prose/tabs'
143
- export { default as tabsItem } from './prose/tabs-item'
144
- export { default as tbody } from './prose/tbody'
145
- export { default as td } from './prose/td'
146
- export { default as th } from './prose/th'
147
- export { default as thead } from './prose/thead'
148
- export { default as tr } from './prose/tr'
149
- export { default as ul } from './prose/ul'
104
+ export { default as user } from './user'
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslamdevui/ui",
3
- "version": "3.2.2",
3
+ "version": "3.3.1",
4
4
  "docs": "https://ui.nuxt.com/getting-started/installation/nuxt",
5
5
  "configKey": "ui",
6
6
  "compatibility": {
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { defu } from 'defu';
2
1
  import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, hasNuxtModule, addComponentsDir, addImportsDir, installModule } from '@nuxt/kit';
3
- import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.DErCA3YU.mjs';
2
+ import { defu } from 'defu';
3
+ import { d as defaultOptions, r as resolveColors, a as getDefaultUiConfig, b as addTemplates } from './shared/ui.i6pGHFq6.mjs';
4
4
  import '../dist/runtime/utils/index.js';
5
5
  import 'node:url';
6
6
  import 'scule';
@@ -8,8 +8,40 @@ import 'tailwindcss/colors';
8
8
  import 'knitwork';
9
9
 
10
10
  const name = "@eslamdevui/ui";
11
- const version = "3.2.2";
11
+ const version = "3.3.1";
12
12
 
13
+ function generateProseComponentMap(components) {
14
+ return components.reduce((map, component) => {
15
+ const pascalCase = component.split("-").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join("");
16
+ map[component] = `Prose${pascalCase}`;
17
+ return map;
18
+ }, {});
19
+ }
20
+ const proseComponents = [
21
+ "accordion",
22
+ "accordion-item",
23
+ "badge",
24
+ "callout",
25
+ "card",
26
+ "card-group",
27
+ "caution",
28
+ "code-collapse",
29
+ "code-group",
30
+ "code-icon",
31
+ "code-preview",
32
+ "code-tree",
33
+ "collapsible",
34
+ "field",
35
+ "field-group",
36
+ "icon",
37
+ "kbd",
38
+ "note",
39
+ "steps",
40
+ "tabs",
41
+ "tabs-item",
42
+ "tip",
43
+ "warning"
44
+ ];
13
45
  const module = defineNuxtModule({
14
46
  meta: {
15
47
  name,
@@ -67,7 +99,7 @@ const module = defineNuxtModule({
67
99
  }
68
100
  addPlugin({ src: resolve("./runtime/plugins/colors") });
69
101
  if (hasNuxtModule("@nuxtjs/mdc") || options.mdc || hasNuxtModule("@nuxt/content") || options.content) {
70
- nuxt.options.mdc = defu(options.mdc, {
102
+ nuxt.options.mdc = defu(nuxt.options.mdc, {
71
103
  highlight: {
72
104
  theme: {
73
105
  light: "material-theme-lighter",
@@ -76,31 +108,7 @@ const module = defineNuxtModule({
76
108
  }
77
109
  },
78
110
  components: {
79
- map: {
80
- "accordion": "ProseAccordion",
81
- "accordion-item": "ProseAccordionItem",
82
- "badge": "ProseBadge",
83
- "callout": "ProseCallout",
84
- "card": "ProseCard",
85
- "card-group": "ProseCardGroup",
86
- "caution": "ProseCaution",
87
- "code-collapse": "ProseCodeCollapse",
88
- "code-group": "ProseCodeGroup",
89
- "code-icon": "ProseCodeIcon",
90
- "code-preview": "ProseCodePreview",
91
- "code-tree": "ProseCodeTree",
92
- "collapsible": "ProseCollapsible",
93
- "field": "ProseField",
94
- "field-group": "ProseFieldGroup",
95
- "icon": "ProseIcon",
96
- "kbd": "ProseKbd",
97
- "note": "ProseNote",
98
- "steps": "ProseSteps",
99
- "tabs": "ProseTabs",
100
- "tabs-item": "ProseTabsItem",
101
- "tip": "ProseTip",
102
- "warning": "ProseWarning"
103
- }
111
+ map: generateProseComponentMap(proseComponents)
104
112
  }
105
113
  });
106
114
  }
@@ -11,22 +11,16 @@ import { useLocalePro } from "../composables/useLocalePro";
11
11
  import { useDashboard } from "../utils/dashboard";
12
12
  import { tv } from "../utils/tv";
13
13
  const props = defineProps({
14
- side: { type: String, required: false },
15
- color: { type: null, required: false },
16
- variant: { type: null, required: false },
14
+ side: { type: String, required: false, default: "left" },
15
+ color: { type: null, required: false, default: "neutral" },
16
+ variant: { type: null, required: false, default: "ghost" },
17
17
  class: { type: null, required: false }
18
18
  });
19
- const rootProps = useForwardProps(reactivePick(props, "color", "variant", "size", "as", "disabled", "ui"));
19
+ const rootProps = useForwardProps(reactivePick(props, "color", "variant", "size"));
20
20
  const { t } = useLocalePro();
21
21
  const appConfig = useAppConfig();
22
22
  const { sidebarOpen, toggleSidebar } = useDashboard();
23
- const ui = computed(() => {
24
- const baseTheme = typeof theme === "string" ? { base: theme } : theme;
25
- return tv({
26
- extend: tv(baseTheme),
27
- ...appConfig.ui?.dashboardSidebarToggle
28
- });
29
- });
23
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSidebarToggle || {} }));
30
24
  </script>
31
25
 
32
26
  <template>
@@ -34,7 +28,7 @@ const ui = computed(() => {
34
28
  v-bind="rootProps"
35
29
  :aria-label="sidebarOpen ? t('dashboardSidebarToggle.close') : t('dashboardSidebarToggle.open')"
36
30
  :icon="sidebarOpen ? appConfig.ui.icons.close : appConfig.ui.icons.menu"
37
- :class="typeof ui === 'function' ? ui({ class: props.class, side: props.side }) : ui"
31
+ :class="ui({ class: props.class, side: props.side })"
38
32
  @click="toggleSidebar"
39
33
  />
40
34
  </template>
@@ -1,7 +1,8 @@
1
- import type { ButtonProps } from '../types';
2
- export interface DashboardSidebarToggleProps extends
3
- /** @vue-ignore */
4
- Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'ui'> {
1
+ import type { ButtonProps, ComponentConfig } from '../types';
2
+ import theme from '#build/ui/dashboard-sidebar-toggle';
3
+ import type { AppConfig } from '@nuxt/schema';
4
+ export type DashboardSidebarToggle = ComponentConfig<typeof theme, AppConfig, 'dashboardSidebarToggle'>;
5
+ export interface DashboardSidebarToggleProps extends /** @vue-ignore */ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'ui'> {
5
6
  side?: 'left' | 'right';
6
7
  /**
7
8
  * @defaultValue 'neutral'
@@ -13,5 +14,9 @@ Pick<ButtonProps, 'as' | 'size' | 'disabled' | 'ui'> {
13
14
  variant?: ButtonProps['variant'];
14
15
  class?: any;
15
16
  }
16
- declare const _default: import("vue").DefineComponent<DashboardSidebarToggleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarToggleProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: import("vue").DefineComponent<DashboardSidebarToggleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardSidebarToggleProps> & Readonly<{}>, {
18
+ color: "error" | "info" | "primary" | "secondary" | "success" | "warning" | "neutral";
19
+ variant: "link" | "solid" | "outline" | "soft" | "subtle" | "ghost";
20
+ side: "left" | "right";
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
22
  export default _default;
@@ -0,0 +1,32 @@
1
+ <script>
2
+ import theme from "#build/ui/dashboard-toolbar";
3
+ </script>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { Primitive } from "reka-ui";
8
+ import { useAppConfig } from "#imports";
9
+ import { tv } from "../utils/tv";
10
+ const props = defineProps({
11
+ as: { type: null, required: false },
12
+ class: { type: null, required: false },
13
+ ui: { type: null, required: false }
14
+ });
15
+ defineSlots();
16
+ const appConfig = useAppConfig();
17
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardToolbar || {} })());
18
+ </script>
19
+
20
+ <template>
21
+ <Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })">
22
+ <slot>
23
+ <div :class="ui.left({ class: [props.ui?.left] })">
24
+ <slot name="left" />
25
+ </div>
26
+
27
+ <div :class="ui.right({ class: [props.ui?.right] })">
28
+ <slot name="right" />
29
+ </div>
30
+ </slot>
31
+ </Primitive>
32
+ </template>
@@ -0,0 +1,25 @@
1
+ import theme from '#build/ui/dashboard-toolbar';
2
+ import type { AppConfig } from '@nuxt/schema';
3
+ import type { ComponentConfig } from '../types';
4
+ type DashboardToolbar = ComponentConfig<typeof theme, AppConfig, 'dashboardToolbar'>;
5
+ export interface DashboardToolbarProps {
6
+ /**
7
+ * The element or component this component should render as.
8
+ * @defaultValue 'div'
9
+ */
10
+ as?: any;
11
+ class?: any;
12
+ ui?: DashboardToolbar['slots'];
13
+ }
14
+ export interface DashboardToolbarSlots {
15
+ default(props?: {}): any;
16
+ left(props?: {}): any;
17
+ right(props?: {}): any;
18
+ }
19
+ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<DashboardToolbarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<DashboardToolbarProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, DashboardToolbarSlots>;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -64,7 +64,10 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
64
64
  </slot>
65
65
  </div>
66
66
 
67
- <div v-if="tier.description || !!slots['tier-description'] || !!slots[`${tier.id}-description`]" :class="ui.tierDescription({ class: props.ui?.tierDescription })">
67
+ <div
68
+ v-if="tier.description || !!slots['tier-description'] || !!slots[`${tier.id}-description`]"
69
+ :class="ui.tierDescription({ class: props.ui?.tierDescription })"
70
+ >
68
71
  <slot :name="`${tier.id}-description`" :tier="tier">
69
72
  <slot name="tier-description" :tier="tier">
70
73
  {{ tier.description }}
@@ -72,8 +75,14 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
72
75
  </slot>
73
76
  </div>
74
77
 
75
- <div v-if="tier.discount || tier.price || !!slots['tier-discount'] || !!slots[`${tier.id}-discount`] || !!slots['tier-price'] || !!slots[`${tier.id}-price`] || tier.billingCycle || tier.billingPeriod || !!slots['tier-billing'] || !!slots[`${tier.id}-billing`]" :class="ui.tierPriceWrapper({ class: props.ui?.tierPriceWrapper })">
76
- <div v-if="tier.discount && tier.price || !!slots[`${tier.id}-discount`] || !!slots['tier-discount']" :class="ui.tierDiscount({ class: props.ui?.tierDiscount })">
78
+ <div
79
+ v-if="tier.discount || tier.price || !!slots['tier-discount'] || !!slots[`${tier.id}-discount`] || !!slots['tier-price'] || !!slots[`${tier.id}-price`] || tier.billingCycle || tier.billingPeriod || !!slots['tier-billing'] || !!slots[`${tier.id}-billing`]"
80
+ :class="ui.tierPriceWrapper({ class: props.ui?.tierPriceWrapper })"
81
+ >
82
+ <div
83
+ v-if="tier.discount && tier.price || !!slots[`${tier.id}-discount`] || !!slots['tier-discount']"
84
+ :class="ui.tierDiscount({ class: props.ui?.tierDiscount })"
85
+ >
77
86
  <slot :name="`${tier.id}-discount`" :tier="tier">
78
87
  <slot name="tier-discount" :tier="tier">
79
88
  {{ tier.price }}
@@ -81,7 +90,10 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
81
90
  </slot>
82
91
  </div>
83
92
 
84
- <div v-if="tier.discount || tier.price || !!slots[`${tier.id}-price`] || !!slots['tier-price']" :class="ui.tierPrice({ class: props.ui?.tierPrice })">
93
+ <div
94
+ v-if="tier.discount || tier.price || !!slots[`${tier.id}-price`] || !!slots['tier-price']"
95
+ :class="ui.tierPrice({ class: props.ui?.tierPrice })"
96
+ >
85
97
  <slot :name="`${tier.id}-price`" :tier="tier">
86
98
  <slot name="tier-price" :tier="tier">
87
99
  {{ tier.discount || tier.price }}
@@ -89,7 +101,10 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
89
101
  </slot>
90
102
  </div>
91
103
 
92
- <div v-if="tier.billingCycle || tier.billingPeriod || !!slots[`${tier.id}-billing`] || !!slots['tier-billing']" :class="ui.tierBilling({ class: props.ui?.tierBilling })">
104
+ <div
105
+ v-if="tier.billingCycle || tier.billingPeriod || !!slots[`${tier.id}-billing`] || !!slots['tier-billing']"
106
+ :class="ui.tierBilling({ class: props.ui?.tierBilling })"
107
+ >
93
108
  <slot :name="`${tier.id}-billing`" :tier="tier">
94
109
  <slot name="tier-billing" :tier="tier">
95
110
  <span :class="ui.tierBillingPeriod({ class: props.ui?.tierBillingPeriod })">
@@ -104,7 +119,10 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
104
119
  </div>
105
120
  </div>
106
121
 
107
- <div v-if="!!slots[`${tier.id}-button`] || !!slots['tier-button'] || tier.button" :class="ui.tierButton({ class: props.ui?.tierButton })">
122
+ <div
123
+ v-if="!!slots[`${tier.id}-button`] || !!slots['tier-button'] || tier.button"
124
+ :class="ui.tierButton({ class: props.ui?.tierButton })"
125
+ >
108
126
  <slot :name="`${tier.id}-button`" :tier="tier">
109
127
  <slot name="tier-button" :tier="tier">
110
128
  <UButton v-if="tier.button" block size="lg" v-bind="tier.button" />
@@ -117,7 +135,11 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
117
135
 
118
136
  <DefineFeatureTemplate v-slot="{ feature, tier }">
119
137
  <template v-if="feature.tiers?.[tier.id]">
120
- <UIcon v-if="typeof feature.tiers[tier.id] === 'boolean'" :name="appConfig.ui.icons.success" :class="ui.tierFeatureIcon({ class: props.ui?.tierFeatureIcon, active: true })" />
138
+ <UIcon
139
+ v-if="typeof feature.tiers[tier.id] === 'boolean'"
140
+ :name="appConfig.ui.icons.success"
141
+ :class="ui.tierFeatureIcon({ class: props.ui?.tierFeatureIcon, active: true })"
142
+ />
121
143
  <template v-else>
122
144
  {{ feature.tiers[tier.id] }}
123
145
  </template>
@@ -153,7 +175,10 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
153
175
  <template v-for="(section, sectionIndex) in sections" :key="sectionIndex">
154
176
  <tr :class="ui.tr({ class: props.ui?.tr, section: sectionIndex > 0 })">
155
177
  <th scope="row" :class="ui.th({ class: props.ui?.th })">
156
- <div v-if="section.title || !!slots['section-title'] || !!slots[`section-${formatSlotName(section)}-title`]" :class="ui.sectionTitle({ class: props.ui?.sectionTitle })">
178
+ <div
179
+ v-if="section.title || !!slots['section-title'] || !!slots[`section-${formatSlotName(section)}-title`]"
180
+ :class="ui.sectionTitle({ class: props.ui?.sectionTitle })"
181
+ >
157
182
  <slot :name="`section-${formatSlotName(section)}-title`" :section="section">
158
183
  <slot name="section-title" :section="section">
159
184
  {{ section.title }}
@@ -186,7 +211,12 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
186
211
  :class="ui.td({ class: props.ui?.td, highlight: tier.highlight })"
187
212
  >
188
213
  <div :class="ui.featureValue({ class: props.ui?.featureValue })">
189
- <slot :name="`feature-${formatSlotName(feature)}-value`" :feature="feature" :tier="tier" :section="section">
214
+ <slot
215
+ :name="`feature-${formatSlotName(feature)}-value`"
216
+ :feature="feature"
217
+ :tier="tier"
218
+ :section="section"
219
+ >
190
220
  <slot name="feature-value" :feature="feature" :tier="tier" :section="section">
191
221
  <ReuseFeatureTemplate :tier="tier" :feature="feature" />
192
222
  </slot>
@@ -199,10 +229,18 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
199
229
  </table>
200
230
 
201
231
  <ul :class="ui.list({ class: props.ui?.list })">
202
- <li v-for="(tier, index) in tiers" :key="index" :class="ui.item({ class: props.ui?.item, highlight: tier.highlight })">
232
+ <li
233
+ v-for="(tier, index) in tiers"
234
+ :key="index"
235
+ :class="ui.item({ class: props.ui?.item, highlight: tier.highlight })"
236
+ >
203
237
  <ReuseTierTemplate :tier="tier" />
204
238
 
205
- <div v-for="(section, sectionIndex) in sections" :key="`section-${sectionIndex}`" :class="ui.section({ class: props.ui?.section })">
239
+ <div
240
+ v-for="(section, sectionIndex) in sections"
241
+ :key="`section-${sectionIndex}`"
242
+ :class="ui.section({ class: props.ui?.section })"
243
+ >
206
244
  <div v-if="section.title" :class="ui.sectionTitle({ class: props.ui?.sectionTitle })">
207
245
  <slot :name="`section-${formatSlotName(section)}-title`" :section="section">
208
246
  <slot name="section-title" :section="section">
@@ -211,7 +249,11 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
211
249
  </slot>
212
250
  </div>
213
251
 
214
- <div v-for="(feature, featureIndex) in section.features" :key="`section-${sectionIndex}-feature-${featureIndex}`" :class="ui.feature({ class: props.ui?.feature })">
252
+ <div
253
+ v-for="(feature, featureIndex) in section.features"
254
+ :key="`section-${sectionIndex}-feature-${featureIndex}`"
255
+ :class="ui.feature({ class: props.ui?.feature })"
256
+ >
215
257
  <div :class="ui.featureTitle({ class: props.ui?.featureTitle })">
216
258
  <slot :name="`feature-${formatSlotName(feature)}-title`" :feature="feature" :section="section">
217
259
  <slot name="feature-title" :feature="feature" :section="section">
@@ -221,7 +263,12 @@ const [DefineFeatureTemplate, ReuseFeatureTemplate] = createReusableTemplate({
221
263
  </div>
222
264
 
223
265
  <div :class="ui.featureValue({ class: props.ui?.featureValue })">
224
- <slot :name="`feature-${formatSlotName(feature)}-value`" :feature="feature" :tier="tier" :section="section">
266
+ <slot
267
+ :name="`feature-${formatSlotName(feature)}-value`"
268
+ :feature="feature"
269
+ :tier="tier"
270
+ :section="section"
271
+ >
225
272
  <slot name="feature-value" :feature="feature" :tier="tier" :section="section">
226
273
  <ReuseFeatureTemplate :tier="tier" :feature="feature" />
227
274
  </slot>
@@ -50,21 +50,20 @@ defineExpose({
50
50
 
51
51
  <slot name="list-leading" />
52
52
 
53
- <TabsTrigger
54
- v-for="(item, index) of items"
55
- :key="index"
56
- :ref="(el) => triggersRef[index] = el"
57
- `
58
- :value="item.value || String(index)"
59
- :disabled="item.disabled"
60
- :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })"
61
- >
53
+ <TabsTrigger v-for="(item, index) of items" :key="index"
54
+ :ref="(el) => triggersRef[index] = el" ` :value="item.value || String(index)"
55
+ :disabled="item.disabled" :class="ui.trigger({ class: [props.ui?.trigger, item.ui?.trigger] })">
62
56
  <slot name="leading" :item="item" :index="index">
63
- <UIcon v-if="item.icon" :name="item.icon" :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item.ui?.leadingIcon] })" />
64
- <UAvatar v-else-if="item.avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="item.avatar" :class="ui.leadingAvatar({ class: [props.ui?.leadingAvatar, item.ui?.leadingAvatar] })" />
57
+ <UIcon v-if="item.icon" :name="item.icon"
58
+ :class="ui.leadingIcon({ class: [props.ui?.leadingIcon, item.ui?.leadingIcon] })" />
59
+ <UAvatar v-else-if="item.avatar"
60
+ :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()"
61
+ v-bind="item.avatar"
62
+ :class="ui.leadingAvatar({ class: [props.ui?.leadingAvatar, item.ui?.leadingAvatar] })" />
65
63
  </slot>
66
64
 
67
- <span v-if="get(item, props.labelKey) || !!slots.default" :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
65
+ <span v-if="get(item, props.labelKey) || !!slots.default"
66
+ :class="ui.label({ class: [props.ui?.label, item.ui?.label] })">
68
67
  <slot :item="item" :index="index">{{ get(item, props.labelKey) }}</slot>
69
68
  </span>
70
69
 
@@ -75,8 +74,10 @@ defineExpose({
75
74
  </TabsList>
76
75
 
77
76
  <template v-if="!!content">
78
- <TabsContent v-for="(item, index) of items" :key="index" :value="item.value || String(index)" :class="ui.content({ class: [props.ui?.content, item.ui?.content, item.class] })">
79
- <slot :name="item.slot || 'content'" :item="item" :index="index">
77
+ <TabsContent v-for="(item, index) of items || []" :key="index" :value="item.value || String(index)"
78
+ :class="ui.content({ class: [props.ui?.content, item.ui?.content, item.class] })">
79
+ <slot :name="item.slot || 'content'" :item="item"
80
+ :index="index">
80
81
  {{ item.content }}
81
82
  </slot>
82
83
  </TabsContent>
@@ -3,30 +3,15 @@ import theme from "#build/ui/content/content-search";
3
3
  </script>
4
4
 
5
5
  <script setup>
6
- import {
7
- computed,
8
- useTemplateRef
9
- } from "vue";
10
- import {
11
- useForwardProps,
12
- useAppConfig,
13
- useColorMode,
14
- defineShortcuts
15
- } from "#imports";
16
- import {
17
- reactivePick,
18
- defu
19
- } from "@vueuse/core";
20
- import {
21
- useContentSearch
22
- } from "../../composables/useContentSearch";
23
- import {
24
- useLocalePro
25
- } from "../../composables/useLocalePro";
26
- import {
27
- transformUI,
28
- omit
29
- } from "../../utils";
6
+ import { computed, useTemplateRef } from "vue";
7
+ import { useForwardProps } from "reka-ui";
8
+ import { defu } from "defu";
9
+ import { reactivePick } from "@vueuse/core";
10
+ import { omit } from "@nuxt/ui/utils";
11
+ import { useAppConfig, useColorMode, defineShortcuts } from "#imports";
12
+ import { useContentSearch } from "../../composables/useContentSearch";
13
+ import { useLocalePro } from "../../composables/useLocalePro";
14
+ import { transformUI } from "../../utils";
30
15
  import { tv } from "../../utils/tv";
31
16
  import UModal from "../Modal.vue";
32
17
  import UCommandPalette from "../CommandPalette.vue";
@@ -36,15 +21,15 @@ const props = defineProps({
36
21
  autofocus: { type: Boolean, required: false },
37
22
  loading: { type: Boolean, required: false },
38
23
  loadingIcon: { type: String, required: false },
39
- close: { type: [Boolean, Object], required: false },
24
+ close: { type: [Boolean, Object], required: false, default: true },
40
25
  closeIcon: { type: String, required: false },
41
- shortcut: { type: String, required: false },
26
+ shortcut: { type: String, required: false, default: "meta_k" },
42
27
  links: { type: Array, required: false },
43
28
  navigation: { type: Array, required: false },
44
29
  groups: { type: Array, required: false },
45
30
  files: { type: Array, required: false },
46
31
  fuse: { type: Object, required: false },
47
- colorMode: { type: Boolean, required: false },
32
+ colorMode: { type: Boolean, required: false, default: true },
48
33
  class: { type: null, required: false },
49
34
  ui: { type: void 0, required: false }
50
35
  });
@@ -87,9 +72,14 @@ function mapLinksItems(links) {
87
72
  ]);
88
73
  }
89
74
  function mapNavigationItems(children, parent) {
90
- return children.flatMap(
91
- (link) => link.children?.length ? mapNavigationItems(link.children, link) : props.files?.filter((file) => file.id === link.path || file.id.startsWith(`${link.path}#`))?.map((file) => mapFile(file, link, parent)) || []
92
- );
75
+ return children.flatMap((link) => {
76
+ if (link.children?.length) {
77
+ return mapNavigationItems(link.children, link);
78
+ }
79
+ return props.files?.filter(
80
+ (file) => file.id === link.path || file.id.startsWith(`${link.path}#`)
81
+ )?.map((file) => mapFile(file, link, parent)) || [];
82
+ });
93
83
  }
94
84
  function mapFile(file, link, parent) {
95
85
  const prefix = [...new Set([parent?.title, ...file.titles].filter(Boolean))].join(" > ");
@@ -102,54 +92,73 @@ function mapFile(file, link, parent) {
102
92
  level: file.level
103
93
  };
104
94
  }
105
- function postFilter(query, items) {
106
- return query ? items : items?.filter((item) => item.level === 1);
107
- }
108
- function onSelect(item) {
109
- if (!item.disabled) {
110
- open.value = false;
111
- searchTerm.value = "";
112
- }
113
- }
114
- defineShortcuts({
115
- [props.shortcut || "meta_k"]: {
116
- usingInput: true,
117
- handler: () => open.value = !open.value
118
- }
119
- });
120
95
  const groups = computed(() => {
121
- const result = [];
96
+ const groups2 = [];
122
97
  if (props.links?.length) {
123
- result.push({ id: "links", label: t("contentSearch.links"), items: mapLinksItems(props.links) });
98
+ groups2.push({ id: "links", label: t("contentSearch.links"), items: mapLinksItems(props.links) });
124
99
  }
125
100
  if (props.navigation?.length) {
126
- if (props.navigation.some((link) => link.children?.length)) {
127
- result.push(...props.navigation.map((group) => ({
101
+ if (props.navigation.some((link) => !!link.children?.length)) {
102
+ groups2.push(...props.navigation.map((group) => ({
128
103
  id: group.path,
129
104
  label: group.title,
130
- items: mapNavigationItems(group.children || []),
105
+ items: mapNavigationItems(group.children || [], group),
131
106
  postFilter
132
107
  })));
133
108
  } else {
134
- result.push({ id: "docs", items: mapNavigationItems(props.navigation), postFilter });
109
+ groups2.push({
110
+ id: "docs",
111
+ items: mapNavigationItems(props.navigation, { title: "", path: "", children: [] }),
112
+ postFilter
113
+ });
135
114
  }
136
115
  }
137
- if (props.groups?.length) result.push(...props.groups);
116
+ groups2.push(...props.groups || []);
138
117
  if (props.colorMode && !colorMode?.forced) {
139
- result.push({
118
+ groups2.push({
140
119
  id: "theme",
141
120
  label: t("contentSearch.theme"),
142
- items: ["system", "light", "dark"].map((mode) => ({
143
- label: t(`colorMode.${mode}`),
144
- icon: appConfig.ui.icons[mode],
145
- active: colorMode.preference === mode,
121
+ items: [{
122
+ label: t("colorMode.system"),
123
+ icon: appConfig.ui.icons.system,
124
+ active: colorMode.preference === "system",
125
+ onSelect: () => {
126
+ colorMode.preference = "system";
127
+ }
128
+ }, {
129
+ label: t("colorMode.light"),
130
+ icon: appConfig.ui.icons.light,
131
+ active: colorMode.preference === "light",
132
+ onSelect: () => {
133
+ colorMode.preference = "light";
134
+ }
135
+ }, {
136
+ label: t("colorMode.dark"),
137
+ icon: appConfig.ui.icons.dark,
138
+ active: colorMode.preference === "dark",
146
139
  onSelect: () => {
147
- colorMode.preference = mode;
140
+ colorMode.preference = "dark";
148
141
  }
149
- }))
142
+ }]
150
143
  });
151
144
  }
152
- return result;
145
+ return groups2;
146
+ });
147
+ function postFilter(query, items) {
148
+ return query ? items : items?.filter((item) => item.level === 1);
149
+ }
150
+ function onSelect(item) {
151
+ if (item.disabled) {
152
+ return;
153
+ }
154
+ open.value = false;
155
+ searchTerm.value = "";
156
+ }
157
+ defineShortcuts({
158
+ [props.shortcut || "meta_k"]: {
159
+ usingInput: true,
160
+ handler: () => open.value = !open.value
161
+ }
153
162
  });
154
163
  const commandPaletteRef = useTemplateRef("commandPaletteRef");
155
164
  defineExpose({ commandPaletteRef });
@@ -102,7 +102,11 @@ declare const _default: __VLS_WithSlots<import("vue").DefineComponent<ContentSea
102
102
  searchTerm?: string;
103
103
  }> & Readonly<{
104
104
  "onUpdate:searchTerm"?: ((value: string) => any) | undefined;
105
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ContentSearchSlots>;
105
+ }>, {
106
+ close: boolean | Partial<ButtonProps>;
107
+ colorMode: boolean;
108
+ shortcut: string;
109
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ContentSearchSlots>;
106
110
  export default _default;
107
111
  type __VLS_WithSlots<T, S> = T & {
108
112
  new (): {
@@ -18,23 +18,25 @@ const props = defineProps({
18
18
  });
19
19
  defineSlots();
20
20
  const appConfig = useAppConfig();
21
- const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate({
22
- props: {
23
- link: Object,
24
- icon: String,
25
- direction: String
26
- }
27
- });
21
+ const [DefineLinkTemplate, ReuseLinkTemplate] = createReusableTemplate();
28
22
  const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.contentSurround || {} })());
29
23
  </script>
30
24
 
31
25
  <template>
32
26
  <DefineLinkTemplate v-slot="{ link, icon, direction }">
33
- <ULink v-if="link" :to="link.path" raw :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], direction })">
27
+ <ULink
28
+ v-if="link"
29
+ :to="link.path"
30
+ raw
31
+ :class="ui.link({ class: [props.ui?.link, link.ui?.link, link.class], direction })"
32
+ >
34
33
  <slot name="link" :link="link">
35
34
  <div :class="ui.linkLeading({ class: [props.ui?.linkLeading, link.ui?.linkLeading] })">
36
35
  <slot name="link-leading" :link="link">
37
- <UIcon :name="link.icon || icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], direction })" />
36
+ <UIcon
37
+ :name="link.icon || icon"
38
+ :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, link.ui?.linkLeadingIcon], direction })"
39
+ />
38
40
  </slot>
39
41
  </div>
40
42
 
@@ -1,5 +1,5 @@
1
1
  import { inject, provide, computed } from "vue";
2
- export const avatarGroupInjectionKey = Symbol("nuxt-ui.avatar-group");
2
+ export const avatarGroupInjectionKey = Symbol("eslamdevui-ui.avatar-group");
3
3
  export function useAvatarGroup(props) {
4
4
  const avatarGroup = inject(avatarGroupInjectionKey, void 0);
5
5
  const size = computed(() => props.size ?? avatarGroup?.value.size);
@@ -0,0 +1,11 @@
1
+ export declare function useBreakpoint(): {
2
+ isSm: import("vue").ComputedRef<boolean>;
3
+ isMd: import("vue").ComputedRef<boolean>;
4
+ isLg: import("vue").ComputedRef<boolean>;
5
+ isXl: import("vue").ComputedRef<boolean>;
6
+ is2xl: import("vue").ComputedRef<boolean>;
7
+ isMobile: import("vue").ComputedRef<boolean>;
8
+ isTablet: import("vue").ComputedRef<boolean>;
9
+ isDesktop: import("vue").ComputedRef<boolean>;
10
+ current: import("vue").ComputedRef<"sm" | "md" | "lg" | "xl" | "2xl">;
11
+ };
@@ -0,0 +1,53 @@
1
+ import { useMediaQuery } from "@vueuse/core";
2
+ import { computed } from "vue";
3
+ import { useAppConfig } from "#imports";
4
+ const defaultBreakpoints = {
5
+ "sm": "640px",
6
+ "md": "768px",
7
+ "lg": "1024px",
8
+ "xl": "1280px",
9
+ "2xl": "1536px"
10
+ };
11
+ export function useBreakpoint() {
12
+ const config = useAppConfig();
13
+ const breakpoints = {
14
+ ...defaultBreakpoints,
15
+ ...config.ui?.breakpoints || {}
16
+ };
17
+ const queries = {
18
+ "sm": useMediaQuery(`(min-width: ${breakpoints.sm})`),
19
+ "md": useMediaQuery(`(min-width: ${breakpoints.md})`),
20
+ "lg": useMediaQuery(`(min-width: ${breakpoints.lg})`),
21
+ "xl": useMediaQuery(`(min-width: ${breakpoints.xl})`),
22
+ "2xl": useMediaQuery(`(min-width: ${breakpoints["2xl"]})`)
23
+ };
24
+ const current = computed(() => {
25
+ const order = ["2xl", "xl", "lg", "md", "sm"];
26
+ for (const key of order) {
27
+ if (queries[key].value) return key;
28
+ }
29
+ return "sm";
30
+ });
31
+ const isSm = queries.sm;
32
+ const isMd = queries.md;
33
+ const isLg = queries.lg;
34
+ const isXl = queries.xl;
35
+ const is2xl = queries["2xl"];
36
+ const isMobile = computed(() => !isMd.value);
37
+ const isTablet = computed(() => isMd.value && !isLg.value);
38
+ const isDesktop = computed(() => isLg.value);
39
+ return {
40
+ // individual breakpoints
41
+ isSm,
42
+ isMd,
43
+ isLg,
44
+ isXl,
45
+ is2xl,
46
+ // helpers
47
+ isMobile,
48
+ isTablet,
49
+ isDesktop,
50
+ // current active key
51
+ current
52
+ };
53
+ }
@@ -1,5 +1,5 @@
1
1
  import { inject, computed } from "vue";
2
- export const buttonGroupInjectionKey = Symbol("nuxt-ui.button-group");
2
+ export const buttonGroupInjectionKey = Symbol("eslamdevui-ui.button-group");
3
3
  export function useButtonGroup(props) {
4
4
  const buttonGroup = inject(buttonGroupInjectionKey, void 0);
5
5
  return {
@@ -1,11 +1,11 @@
1
1
  import { inject, computed, provide } from "vue";
2
2
  import { useDebounceFn } from "@vueuse/core";
3
- export const formOptionsInjectionKey = Symbol("nuxt-ui.form-options");
4
- export const formBusInjectionKey = Symbol("nuxt-ui.form-events");
5
- export const formFieldInjectionKey = Symbol("nuxt-ui.form-field");
6
- export const inputIdInjectionKey = Symbol("nuxt-ui.input-id");
7
- export const formInputsInjectionKey = Symbol("nuxt-ui.form-inputs");
8
- export const formLoadingInjectionKey = Symbol("nuxt-ui.form-loading");
3
+ export const formOptionsInjectionKey = Symbol("eslamdevui-ui.form-options");
4
+ export const formBusInjectionKey = Symbol("eslamdevui-ui.form-events");
5
+ export const formFieldInjectionKey = Symbol("eslamdevui-ui.form-field");
6
+ export const inputIdInjectionKey = Symbol("eslamdevui-ui.input-id");
7
+ export const formInputsInjectionKey = Symbol("eslamdevui-ui.form-inputs");
8
+ export const formLoadingInjectionKey = Symbol("eslamdevui-ui.form-loading");
9
9
  export function useFormField(props, opts) {
10
10
  const formOptions = inject(formOptionsInjectionKey, void 0);
11
11
  const formBus = inject(formBusInjectionKey, void 0);
@@ -2,7 +2,7 @@ import { computed, inject, toRef } from "vue";
2
2
  import { createSharedComposable } from "@vueuse/core";
3
3
  import { buildLocaleContext } from "../utils/locale.js";
4
4
  import en from "../locale/en.js";
5
- export const localeContextInjectionKey = Symbol.for("nuxt-ui.locale-context");
5
+ export const localeContextInjectionKey = Symbol.for("eslamdevui-ui.locale-context");
6
6
  const _useLocale = (localeOverrides) => {
7
7
  const locale = localeOverrides || toRef(inject(localeContextInjectionKey));
8
8
  return buildLocaleContext(computed(() => locale.value || en));
@@ -1,5 +1,5 @@
1
1
  import { inject, provide, computed } from "vue";
2
- export const portalTargetInjectionKey = Symbol("nuxt-ui.portal-target");
2
+ export const portalTargetInjectionKey = Symbol("eslamdevui-ui.portal-target");
3
3
  export function usePortal(portal) {
4
4
  const portalTarget = inject(portalTargetInjectionKey, void 0);
5
5
  const to = computed(() => {
@@ -0,0 +1,14 @@
1
+ type UseQuerySectionOptions = {
2
+ key?: string;
3
+ offset?: number;
4
+ behavior?: ScrollBehavior;
5
+ autoScroll?: boolean;
6
+ clearQuery?: boolean;
7
+ };
8
+ export declare const useQuerySection: (options?: UseQuerySectionOptions) => {
9
+ setSection: (section: string) => void;
10
+ getSection: () => string | null;
11
+ clearSection: () => void;
12
+ scrollToSection: (customId?: string) => void;
13
+ };
14
+ export {};
@@ -0,0 +1,44 @@
1
+ import { onMounted } from "vue";
2
+ import { useRouter, useRoute } from "vue-router";
3
+ export const useQuerySection = (options = {}) => {
4
+ const router = useRouter();
5
+ const route = useRoute();
6
+ const key = options.key || "section";
7
+ const offset = options.offset || 0;
8
+ const behavior = options.behavior || "smooth";
9
+ const getSection = () => {
10
+ return route.query[key] || null;
11
+ };
12
+ const setSection = (section) => {
13
+ router.replace({
14
+ query: {
15
+ ...route.query,
16
+ [key]: section
17
+ }
18
+ });
19
+ };
20
+ const clearSection = () => {
21
+ const query = { ...route.query };
22
+ delete query[key];
23
+ router.replace({ query });
24
+ };
25
+ const scrollToSection = (customId) => {
26
+ if (!import.meta.client) return;
27
+ const sectionId = customId || getSection();
28
+ if (!sectionId) return;
29
+ const el = document.getElementById(sectionId);
30
+ if (!el) return;
31
+ const top = el.getBoundingClientRect().top + window.scrollY - offset;
32
+ window.scrollTo({ top, behavior });
33
+ if (options.clearQuery) clearSection();
34
+ };
35
+ if (options.autoScroll && import.meta.client) {
36
+ onMounted(() => scrollToSection());
37
+ }
38
+ return {
39
+ setSection,
40
+ getSection,
41
+ clearSection,
42
+ scrollToSection
43
+ };
44
+ };
@@ -35,16 +35,16 @@ export default defineNuxtPlugin(() => {
35
35
  style: [{
36
36
  innerHTML: () => root.value,
37
37
  tagPriority: -2,
38
- id: "nuxt-ui-colors"
38
+ id: "eslamdevui-ui-colors"
39
39
  }]
40
40
  };
41
41
  if (import.meta.client && nuxtApp.isHydrating && !nuxtApp.payload.serverRendered) {
42
42
  const style = document.createElement("style");
43
43
  style.innerHTML = root.value;
44
- style.setAttribute("data-nuxt-ui-colors", "");
44
+ style.setAttribute("data-eslamdevui-ui-colors", "");
45
45
  document.head.appendChild(style);
46
46
  headData.script = [{
47
- innerHTML: "document.head.removeChild(document.querySelector('[data-nuxt-ui-colors]'))"
47
+ innerHTML: "document.head.removeChild(document.querySelector('[data-eslamdevui-ui-colors]'))"
48
48
  }];
49
49
  }
50
50
  useHead(headData);
@@ -43,6 +43,7 @@ export * from '../components/DashboardSearchButton.vue';
43
43
  export * from '../components/DashboardSidebar.vue';
44
44
  export * from '../components/DashboardSidebarCollapse.vue';
45
45
  export * from '../components/DashboardSidebarToggle.vue';
46
+ export * from '../components/DashboardToolbar.vue';
46
47
  export * from '../components/Drawer.vue';
47
48
  export * from '../components/DropdownMenu.vue';
48
49
  export * from '../components/Error.vue';
@@ -43,6 +43,7 @@ export * from "../components/DashboardSearchButton.vue";
43
43
  export * from "../components/DashboardSidebar.vue";
44
44
  export * from "../components/DashboardSidebarCollapse.vue";
45
45
  export * from "../components/DashboardSidebarToggle.vue";
46
+ export * from "../components/DashboardToolbar.vue";
46
47
  export * from "../components/Drawer.vue";
47
48
  export * from "../components/DropdownMenu.vue";
48
49
  export * from "../components/Error.vue";
@@ -2083,6 +2083,14 @@ const dashboardSidebarToggle = {
2083
2083
  }
2084
2084
  };
2085
2085
 
2086
+ const dashboardToolbar = {
2087
+ slots: {
2088
+ root: "shrink-0 flex items-center justify-between border-b border-default px-4 sm:px-6 gap-1.5 overflow-x-auto min-h-[49px]",
2089
+ left: "flex items-center gap-1.5",
2090
+ right: "flex items-center gap-1.5"
2091
+ }
2092
+ };
2093
+
2086
2094
  const drawer = (options) => ({
2087
2095
  slots: {
2088
2096
  overlay: "fixed inset-0 bg-elevated/75",
@@ -5738,6 +5746,7 @@ const theme = {
5738
5746
  dashboardSidebar: dashboardSidebar,
5739
5747
  dashboardSidebarCollapse: dashboardSidebarCollapse,
5740
5748
  dashboardSidebarToggle: dashboardSidebarToggle,
5749
+ dashboardToolbar: dashboardToolbar,
5741
5750
  drawer: drawer,
5742
5751
  dropdownMenu: dropdownMenu,
5743
5752
  error: error,
@@ -6494,12 +6503,6 @@ function getTemplates(options, uiConfig) {
6494
6503
  for (const component of Object.keys(theme)) {
6495
6504
  exports.push(`export { default as ${component} } from './${kebabCase(component)}'`);
6496
6505
  }
6497
- for (const component of Object.keys(contentTheme)) {
6498
- exports.push(`export { default as ${component} } from './content/${kebabCase(component)}'`);
6499
- }
6500
- for (const component of Object.keys(proseTheme)) {
6501
- exports.push(`export { default as ${component} } from './prose/${kebabCase(component)}'`);
6502
- }
6503
6506
  return exports.join("\n");
6504
6507
  }
6505
6508
  });
package/dist/unplugin.mjs CHANGED
@@ -3,7 +3,7 @@ import { join, normalize } from 'pathe';
3
3
  import { createUnplugin } from 'unplugin';
4
4
  import { defu } from 'defu';
5
5
  import tailwind from '@tailwindcss/vite';
6
- import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.DErCA3YU.mjs';
6
+ import { g as getTemplates, d as defaultOptions, r as resolveColors, a as getDefaultUiConfig } from './shared/ui.i6pGHFq6.mjs';
7
7
  import { globSync } from 'tinyglobby';
8
8
  import { genSafeVariableName } from 'knitwork';
9
9
  import MagicString from 'magic-string';
@@ -88,14 +88,14 @@ ${plugins.map((p) => ` app.use(${genSafeVariableName(p)})`).join("\n")}
88
88
 
89
89
  function AppConfigPlugin(options, appConfig) {
90
90
  return {
91
- name: "nuxt:ui:app-config",
91
+ name: "eslamdevui:ui:app-config",
92
92
  enforce: "pre",
93
93
  resolveId(id) {
94
94
  if (id === "#build/app.config") {
95
- return "virtual:nuxt-ui-app-config";
95
+ return "virtual:eslamdevui-ui-app-config";
96
96
  }
97
97
  },
98
- loadInclude: (id) => id === "virtual:nuxt-ui-app-config",
98
+ loadInclude: (id) => id === "virtual:eslamdevui-ui-app-config",
99
99
  load() {
100
100
  return `
101
101
  export default ${JSON.stringify(appConfig)}
@@ -149,7 +149,7 @@ function ComponentImportPlugin(options, meta) {
149
149
  * <UIcon> and <ULink> currently.
150
150
  */
151
151
  {
152
- name: "nuxt:ui:components",
152
+ name: "eslamdevui:ui:components",
153
153
  enforce: "pre",
154
154
  resolveId(id, importer) {
155
155
  if (!importer || !normalize(importer).includes(runtimeDir)) {
@@ -175,7 +175,7 @@ const RELATIVE_IMPORT_RE = /^\.{1,2}\//;
175
175
  function NuxtEnvironmentPlugin(options) {
176
176
  const stubPath = resolvePathSync(options.inertia ? "../runtime/inertia/stubs" : "../runtime/vue/stubs", { extensions: [".ts", ".mjs", ".js"], url: import.meta.url });
177
177
  return {
178
- name: "nuxt:ui",
178
+ name: "eslamdevui:ui",
179
179
  enforce: "pre",
180
180
  resolveId(id) {
181
181
  if (id === "#imports") {
@@ -223,7 +223,7 @@ const NuxtUIPlugin = createUnplugin((_options = {}, meta) => {
223
223
  TemplatePlugin(options, appConfig),
224
224
  AppConfigPlugin(options, appConfig),
225
225
  {
226
- name: "nuxt:ui:plugins-duplication-detection",
226
+ name: "eslamdevui:ui:plugins-duplication-detection",
227
227
  vite: {
228
228
  configResolved(config) {
229
229
  const plugins = config.plugins || [];
package/dist/vite.mjs CHANGED
@@ -4,7 +4,7 @@ import 'pathe';
4
4
  import 'unplugin';
5
5
  import 'defu';
6
6
  import '@tailwindcss/vite';
7
- import './shared/ui.DErCA3YU.mjs';
7
+ import './shared/ui.i6pGHFq6.mjs';
8
8
  import '../dist/runtime/utils/index.js';
9
9
  import 'scule';
10
10
  import '@nuxt/kit';
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@eslamdevui/ui",
3
3
  "description": "A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.",
4
- "version": "3.2.2",
5
- "packageManager": "pnpm@10.12.2",
4
+ "version": "3.3.1",
6
5
  "repository": {
7
6
  "type": "git",
8
7
  "url": "git+https://github.com/MohamedEslam04/ui.git"
@@ -96,24 +95,6 @@
96
95
  "cli",
97
96
  "vue-plugin.d.ts"
98
97
  ],
99
- "scripts": {
100
- "build": "nuxt-module-build build",
101
- "prepack": "pnpm build",
102
- "dev": "nuxt dev playground --uiDev",
103
- "dev:build": "nuxt build playground",
104
- "dev:vue": "vite playground-vue -- --uiDev",
105
- "dev:vue:build": "vite build playground-vue",
106
- "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground && vite build playground-vue",
107
- "docs": "nuxt dev docs --uiDev",
108
- "docs:build": "nuxt build docs",
109
- "lint": "eslint .",
110
- "lint:fix": "eslint . --fix",
111
- "typecheck": "vue-tsc --noEmit && nuxt typecheck playground && nuxt typecheck docs && cd playground-vue && vue-tsc --noEmit",
112
- "test": "vitest",
113
- "test:vue": "vitest -c vitest.vue.config.ts",
114
- "release": "release-it",
115
- "clean": "rm -rf dist .nuxt playground/.nuxt playground-vue/dist docs/.nuxt"
116
- },
117
98
  "dependencies": {
118
99
  "@ai-sdk/vue": "^1.2.12",
119
100
  "@iconify/vue": "^5.0.0",
@@ -222,19 +203,6 @@
222
203
  "unimport": "4.1.1",
223
204
  "unplugin": "^2.3.5"
224
205
  },
225
- "pnpm": {
226
- "onlyBuiltDependencies": [
227
- "better-sqlite3",
228
- "puppeteer",
229
- "sharp"
230
- ],
231
- "ignoredBuiltDependencies": [
232
- "@parcel/watcher",
233
- "esbuild",
234
- "vue-demi",
235
- "workerd"
236
- ]
237
- },
238
206
  "keywords": [
239
207
  "nuxt-ui",
240
208
  "nuxt",
@@ -250,5 +218,22 @@
250
218
  "tailwind",
251
219
  "framework",
252
220
  "ui-framework"
253
- ]
254
- }
221
+ ],
222
+ "scripts": {
223
+ "build": "nuxt-module-build build",
224
+ "dev": "nuxt dev playground --uiDev",
225
+ "dev:build": "nuxt build playground",
226
+ "dev:vue": "vite playground-vue -- --uiDev",
227
+ "dev:vue:build": "vite build playground-vue",
228
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground && vite build playground-vue",
229
+ "docs": "nuxt dev docs --uiDev",
230
+ "docs:build": "nuxt build docs",
231
+ "lint": "eslint .",
232
+ "lint:fix": "eslint . --fix",
233
+ "typecheck": "vue-tsc --noEmit && nuxt typecheck playground && nuxt typecheck docs && cd playground-vue && vue-tsc --noEmit",
234
+ "test": "vitest",
235
+ "test:vue": "vitest -c vitest.vue.config.ts",
236
+ "release": "release-it",
237
+ "clean": "rm -rf dist .nuxt playground/.nuxt playground-vue/dist docs/.nuxt"
238
+ }
239
+ }