@xy-planning-network/trees 0.11.0 → 0.11.1-dev

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.11.0",
3
+ "version": "0.11.1-dev",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -54,7 +54,7 @@
54
54
  "unplugin-vue-components": "^0.27.4",
55
55
  "unplugin-vue-markdown": "^0.25.2",
56
56
  "vite": "^5.4.10",
57
- "vue-tsc": "^2.1.8"
57
+ "vue-tsc": "^2.1.10"
58
58
  },
59
59
  "dependencies": {
60
60
  "@floating-ui/vue": "^1.0.1",
package/src/index.css CHANGED
@@ -77,6 +77,18 @@
77
77
  @apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-sm text-white bg-xy-blue-600 hover:bg-xy-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-xy-blue-600 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
78
78
  }
79
79
 
80
+ .xy-btn-alt-sm {
81
+ @apply inline-flex justify-center items-center px-2.5 py-1.5 border border-transparent text-xs font-display font-semibold rounded-3xl shadow-sm text-xy-black bg-xy-green-200 hover:bg-xy-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-green-100 disabled:bg-xy-green-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
82
+ }
83
+
84
+ .xy-btn-alt {
85
+ @apply inline-flex justify-center items-center px-4 py-2 border border-transparent text-sm font-display font-semibold rounded-3xl shadow-sm text-xy-black bg-xy-green-200 hover:bg-xy-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-green-100 disabled:bg-xy-green-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
86
+ }
87
+
88
+ .xy-btn-alt-lg {
89
+ @apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-sm text-xy-black bg-xy-green-200 hover:bg-xy-green-300 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-green-100 disabled:bg-xy-green-200 disabled:opacity-50 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
90
+ }
91
+
80
92
  /* NOTE(spk): including .xy-btn-red alias for backwards compatibility */
81
93
  .xy-btn-danger-sm,
82
94
  .xy-btn-red-sm {
@@ -105,6 +117,18 @@
105
117
  @apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-transparent hover:bg-neutral-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-transparent disabled:text-neutral-600 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
106
118
  }
107
119
 
120
+ .xy-btn-neutral-inverse-sm {
121
+ @apply inline-flex justify-center items-center px-2.5 py-1.5 border border-transparent text-xs font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-white hover:bg-white/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-white/90 disabled:text-neutral-700 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
122
+ }
123
+
124
+ .xy-btn-neutral-inverse {
125
+ @apply inline-flex justify-center items-center px-4 py-2 border border-transparent text-sm font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-white hover:bg-white/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-white/90 disabled:disabled:text-neutral-700 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
126
+ }
127
+
128
+ .xy-btn-neutral-inverse-lg {
129
+ @apply inline-flex justify-center items-center px-5 py-2.5 border border-transparent text-base font-display font-semibold rounded-3xl shadow-none text-neutral-800 bg-white hover:bg-white/90 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:bg-white/90 disabled:disabled:text-neutral-700 disabled:cursor-not-allowed transition-colors ease-linear duration-300;
130
+ }
131
+
108
132
  /* NOTE(spk): always consider the relative box-sizing between buttons with solid backgrounds and full borders vs secondary styles as they will commonly be laid out next to each other */
109
133
  /* NOTE(spk): there's no way to round a ring or outline in a focus state without rounding the entire button. Avoid this as it causes odd shapes on the bottom border and using content hacks aren't worth the trouble */
110
134
  .xy-btn-secondary-sm {
@@ -155,11 +179,6 @@
155
179
  @apply inline-flex justify-center items-center py-2.5 border-b-2 border-b-red-700 text-base font-display font-semibold shadow-none text-neutral-800 hover:text-red-700 hover:border-b-transparent focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:text-neutral-800 disabled:border-b-red-700 disabled:opacity-70 disabled:cursor-not-allowed transition-colors ease-linear duration-150;
156
180
  }
157
181
 
158
- /* Deprecated */
159
- .xy-btn-white {
160
- @apply inline-flex justify-center items-center px-4 py-2 border border-xy-blue shadow-sm text-sm font-semibold rounded-3xl text-xy-blue bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500 disabled:opacity-50 disabled:cursor-not-allowed;
161
- }
162
-
163
182
  /* Header classes */
164
183
  .h1 {
165
184
  @apply text-3xl leading-9 font-semibold;
@@ -9,6 +9,7 @@ import {
9
9
  emailPattern,
10
10
  looseToNumber,
11
11
  phonePattern,
12
+ urlPattern,
12
13
  } from "@/composables/forms"
13
14
  import type { TextLikeInput } from "@/composables/forms"
14
15
  import { computed, useTemplateRef } from "vue"
@@ -61,6 +62,10 @@ const typeAttributes = computed(() => {
61
62
  return {
62
63
  pattern: phonePattern,
63
64
  }
65
+ case "url":
66
+ return {
67
+ pattern: urlPattern,
68
+ }
64
69
  default:
65
70
  return {}
66
71
  }
@@ -0,0 +1,97 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * IconCircle
4
+ * A utility component for wrapping a Heroicon in a circle.
5
+ *
6
+ * Usage:
7
+ * import CircleIcon from "@/components/shared/CircleIcon.vue"
8
+ * import { SpeakerphoneIcon } from "@heroicons/vue/outline"
9
+ * <template>
10
+ * <CircleIcon
11
+ * :icon="SpeakerphoneIcon"
12
+ * icon-color="text-white"
13
+ * bg-color="bg-xy-green"
14
+ * />
15
+ * </template>
16
+ */
17
+
18
+ import { computed } from "vue"
19
+ import type { Component, FunctionalComponent, RenderFunction } from "vue"
20
+
21
+ // TODO: themed icons?
22
+
23
+ const props = withDefaults(
24
+ defineProps<{
25
+ bgColor?: `bg-${string}`
26
+ iconColor?: `text-${string}`
27
+ icon: FunctionalComponent | Component | RenderFunction
28
+ indicator?: string | number | boolean
29
+ size?: "xs" | "sm" | "base" | "lg" | "xl"
30
+ type?: "circle" | "square" // TODO: squircle?
31
+ }>(),
32
+ {
33
+ bgColor: "bg-transparent",
34
+ iconColor: "text-xy-black",
35
+ indicator: false,
36
+ size: "base",
37
+ type: "square",
38
+ }
39
+ )
40
+
41
+ const size = computed(() => {
42
+ const sizes = {
43
+ xs: { bg: "w-6 h-6", icon: "w-4 h-4" },
44
+ sm: { bg: "w-7 h-7", icon: "w-5 h-5" },
45
+ base: { bg: "w-10 h-10", icon: "w-6 h-6" },
46
+ lg: { bg: "w-12 h-12", icon: "w-6 h-6" },
47
+ xl: { bg: "w-14 h-14", icon: "w-6 h-6" },
48
+ }
49
+
50
+ return sizes[props.size]
51
+ })
52
+
53
+ const indicatorStr = computed(() => {
54
+ if (!props.indicator) {
55
+ return ""
56
+ }
57
+
58
+ return ["string", "number"].includes(typeof props.indicator)
59
+ ? props.indicator.toString()
60
+ : ""
61
+ })
62
+ </script>
63
+
64
+ <template>
65
+ <div
66
+ aria-hidden="true"
67
+ :class="[
68
+ 'aspect-square leading-none relative',
69
+ type === 'circle' ? 'rounded-full' : 'rounded-md',
70
+ bgColor,
71
+ size.bg,
72
+ ]"
73
+ >
74
+ <div class="flex flex-col h-full w-full items-center justify-center">
75
+ <div
76
+ :class="[size.icon]"
77
+ class="flex flex-col items-center justify-center"
78
+ >
79
+ <component :is="icon" :class="iconColor" />
80
+ <div v-if="$slots['default']" class="sr-only">
81
+ <slot />
82
+ </div>
83
+ </div>
84
+ </div>
85
+
86
+ <!--TODO(spk): position edge cases based on content length-->
87
+ <div
88
+ v-if="props.indicator"
89
+ :class="[
90
+ 'absolute top-0 right-0 block bg-xy-green text-xy-black text-xs/3 font-bold translate-x-1/4 -translate-y-1/4',
91
+ indicatorStr ? 'p-1 rounded-xy' : 'h-3 w-3 rounded-full',
92
+ ]"
93
+ >
94
+ {{ indicatorStr }}
95
+ </div>
96
+ </div>
97
+ </template>
@@ -5,23 +5,20 @@ import {
5
5
  Dialog,
6
6
  DialogOverlay,
7
7
  Menu,
8
- MenuButton,
9
- MenuItem,
10
- MenuItems,
11
8
  TransitionChild,
12
9
  TransitionRoot,
13
10
  } from "@headlessui/vue"
14
11
  import { MenuAlt2Icon, XIcon } from "@heroicons/vue/outline"
15
- import { CogIcon } from "@heroicons/vue/solid"
16
- import type { NavItem } from "@/composables/nav"
12
+ import type { NavItem, UserMenuItem } from "@/composables/nav"
17
13
  import { ref } from "vue"
14
+ import UserMenu from "@/lib-components/layout/UserMenu.vue"
18
15
 
19
16
  const props = withDefaults(
20
17
  defineProps<{
21
18
  activeUrl?: string
22
19
  iconUrl: string
23
20
  navigation: NavItem[]
24
- userNavigation: NavItem[]
21
+ userNavigation: UserMenuItem[]
25
22
  }>(),
26
23
  {
27
24
  activeUrl: "",
@@ -205,41 +202,7 @@ const isActive = (url: string): boolean => {
205
202
  <div class="ml-4 flex items-center lg:ml-6">
206
203
  <!-- Profile dropdown -->
207
204
  <Menu as="div" class="ml-3 relative">
208
- <div>
209
- <MenuButton
210
- class="max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"
211
- >
212
- <span class="sr-only">Open user menu</span>
213
- <CogIcon class="h-8 w-8" fill="currentColor" />
214
- </MenuButton>
215
- </div>
216
- <transition
217
- enter-active-class="transition ease-out duration-100"
218
- enter-from-class="transform opacity-0 scale-95"
219
- enter-to-class="transform opacity-100 scale-100"
220
- leave-active-class="transition ease-in duration-75"
221
- leave-from-class="transform opacity-100 scale-100"
222
- leave-to-class="transform opacity-0 scale-95"
223
- >
224
- <MenuItems
225
- class="origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
226
- >
227
- <MenuItem
228
- v-for="item in userNavigation"
229
- :key="item.name"
230
- v-slot="{ active }"
231
- >
232
- <a
233
- :href="item.url"
234
- :class="[
235
- active ? 'bg-gray-100' : '',
236
- 'block px-4 py-2 text-sm text-gray-700 font-semibold',
237
- ]"
238
- >{{ item.name }}</a
239
- >
240
- </MenuItem>
241
- </MenuItems>
242
- </transition>
205
+ <UserMenu :menu="userNavigation" />
243
206
  </Menu>
244
207
  </div>
245
208
  </div>
@@ -0,0 +1,87 @@
1
+ <script setup lang="ts">
2
+ import { UserMenuItem } from "@/composables/nav"
3
+ import { AppIcon } from "@/lib-components"
4
+ import TooltipWrapper from "@/lib-components/overlays/TooltipWrapper.vue"
5
+ import { computed } from "vue"
6
+
7
+ const props = withDefaults(defineProps<{ menu?: UserMenuItem[] }>(), {
8
+ menu: () => [],
9
+ })
10
+
11
+ const items = computed(() => {
12
+ return props.menu.map((item) => {
13
+ const isPopover = item.action != "url"
14
+
15
+ return {
16
+ ...item,
17
+ isPopover: isPopover,
18
+ }
19
+ })
20
+ })
21
+ </script>
22
+
23
+ <template>
24
+ <!--TODO: focus rings? -->
25
+ <div v-if="items.length > 0" class="flex items-center justify-center gap-3.5">
26
+ <template v-for="(item, key) in items" :key="key">
27
+ <div v-if="item.action === 'url'">
28
+ <TooltipWrapper position="bottom-end" :tooltip="item.name">
29
+ <a :href="item.url" target="" class="block">
30
+ <AppIcon
31
+ bg-color="bg-transparent hover:bg-black/20"
32
+ icon-color="text-neutral-200"
33
+ :icon="item.icon"
34
+ :indicator="item.indicator"
35
+ size="base"
36
+ type="square"
37
+ >{{ item.name }}</AppIcon
38
+ >
39
+ </a>
40
+ </TooltipWrapper>
41
+ </div>
42
+
43
+ <div v-else-if="item.isPopover" class="leading-none">
44
+ <Popover position="bottom-end">
45
+ <template #button>
46
+ <TooltipWrapper position="bottom-end" :tooltip="item.name">
47
+ <AppIcon
48
+ bg-color="bg-transparent hover:bg-black/20"
49
+ icon-color="text-neutral-200"
50
+ :icon="item.icon"
51
+ :indicator="item.indicator"
52
+ size="base"
53
+ >{{ item.name }}</AppIcon
54
+ >
55
+ </TooltipWrapper>
56
+ </template>
57
+
58
+ <template #default>
59
+ <PopoverContent>
60
+ <ul v-if="item.action === 'nav'" class="flex flex-col text-sm/6">
61
+ <li v-for="(nav, navKey) in item.navigation" :key="navKey">
62
+ <a
63
+ :href="nav.url"
64
+ class="block relative rounded-lg p-4 hover:bg-gray-50"
65
+ >
66
+ <div class="font-semibold text-gray-900">
67
+ {{ nav.name }}
68
+ </div>
69
+ <div v-if="nav.description" class="mt-0.5 text-gray-600">
70
+ {{ nav.description }}
71
+ </div>
72
+ </a>
73
+ </li>
74
+ </ul>
75
+
76
+ <component
77
+ :is="item.component"
78
+ v-if="item.action === 'flyout'"
79
+ v-bind="item.props"
80
+ />
81
+ </PopoverContent>
82
+ </template>
83
+ </Popover>
84
+ </div>
85
+ </template>
86
+ </div>
87
+ </template>
@@ -0,0 +1,73 @@
1
+ <script lang="ts" setup>
2
+ import { computed, useTemplateRef } from "vue"
3
+ import {
4
+ autoPlacement,
5
+ autoUpdate,
6
+ offset,
7
+ shift,
8
+ useFloating,
9
+ type Placement,
10
+ } from "@floating-ui/vue"
11
+
12
+ // props
13
+ const props = withDefaults(
14
+ defineProps<{
15
+ as?: string
16
+ position?: Placement | "auto"
17
+ tooltip: string
18
+ }>(),
19
+ {
20
+ as: "div",
21
+ position: "auto",
22
+ }
23
+ )
24
+
25
+ // NOTE(spk): explicitly typing as useTemplateRef is unable to infer the template type.
26
+ // https://vuejs.org/guide/typescript/composition-api.html#typing-template-refs
27
+ const triggerRef = useTemplateRef<HTMLElement>("trigger")
28
+ const wrapperRef = useTemplateRef<HTMLElement>("wrapper")
29
+ const middleware = computed(() => {
30
+ const middleware = [offset(5), shift()]
31
+ if (props.position === "auto") {
32
+ middleware.push(autoPlacement())
33
+ }
34
+
35
+ return middleware
36
+ })
37
+
38
+ /**
39
+ * floating-ui's placement property does not support a direct "auto"
40
+ * mode. Passing undefined is expected when auto position is used.
41
+ */
42
+ const placement = computed(() => {
43
+ if (props.position === "auto") {
44
+ return undefined
45
+ }
46
+
47
+ return props.position
48
+ })
49
+
50
+ const { floatingStyles } = useFloating(triggerRef, wrapperRef, {
51
+ middleware: middleware,
52
+ placement: placement,
53
+ strategy: "fixed",
54
+ whileElementsMounted: autoUpdate,
55
+ })
56
+ </script>
57
+
58
+ <template>
59
+ <component :is="as" ref="trigger" class="group">
60
+ <slot></slot>
61
+ <div
62
+ ref="wrapper"
63
+ class="hidden group-hover:block z-[5]"
64
+ :style="floatingStyles"
65
+ >
66
+ <div
67
+ class="max-w-xs bg-xy-black rounded-md px-3 py-1 drop-shadow text-sm text-white leading-snug font-semibold"
68
+ >
69
+ {{ tooltip }}
70
+ </div>
71
+ </div>
72
+ </component>
73
+ </template>
@@ -110,6 +110,19 @@ export declare const emailPattern: string;
110
110
  * used with input type="tel" in the pattern attribute for html5 validation
111
111
  */
112
112
  export declare const phonePattern: string;
113
+ /**
114
+ * url validation regex pattern
115
+ * used with input type="url" in the pattern attribute for html5
116
+ *
117
+ * The pattern is conservative and focuses on ensuring the protocol is valid
118
+ * and the remainder of the url does not include empty spaces. If additional protocols
119
+ * need to be supported, they can be added to the first group (?:https|http|ftp).
120
+ *
121
+ * Reference: https://regex101.com/r/P5dlas/3
122
+ *
123
+ * NOTE(spk): not all JavaScript regular expression characters are not supported in input patterns.
124
+ */
125
+ export declare const urlPattern: string;
113
126
  /**
114
127
  * This is used for the .number modifier in v-model
115
128
  */
@@ -1,7 +1,28 @@
1
- import { Component, FunctionalComponent, MaybeRef, Ref, RenderFunction } from "vue";
1
+ import { type Component, type FunctionalComponent, type MaybeRef, type Ref, type RenderFunction } from "vue";
2
+ interface UserMenuItemBase {
3
+ indicator?: boolean | string | number;
4
+ icon: Component | RenderFunction;
5
+ name: string;
6
+ }
7
+ export interface UserMenuItemUrl extends UserMenuItemBase {
8
+ action: "url";
9
+ url: string;
10
+ }
11
+ export interface UserMenuItemNav extends UserMenuItemBase {
12
+ action: "nav";
13
+ navigation: NavItem[];
14
+ }
15
+ export interface UserMenuItemFlyout<T extends Component> extends UserMenuItemBase {
16
+ action: "flyout";
17
+ component: T;
18
+ props: Record<string, any>;
19
+ }
20
+ export type UserMenuItem = UserMenuItemUrl | UserMenuItemNav | UserMenuItemFlyout<Component>;
2
21
  export interface NavItem {
22
+ badge?: boolean | string | number;
3
23
  icon?: Component | RenderFunction;
4
24
  name: string;
25
+ description?: string;
5
26
  openInTab?: boolean;
6
27
  url: string;
7
28
  }
@@ -159,3 +180,4 @@ export type URLParams<T> = {
159
180
  * @return Ref<T>
160
181
  */
161
182
  export declare const useUrlSearchParams: <T>(initial: URLParams<T>) => [URLParams<T>] extends [Ref<any, any>] ? import("@vue/shared").IfAny<Ref<any, any> & URLParams<T>, Ref<Ref<any, any> & URLParams<T>, Ref<any, any> & URLParams<T>>, Ref<any, any> & URLParams<T>> : Ref<import("vue").UnwrapRef<URLParams<T>>, URLParams<T> | import("vue").UnwrapRef<URLParams<T>>>;
183
+ export {};
package/types/entry.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Plugin } from "vue";
2
2
  import BaseAPI, { isHttpCancel, isHttpError, setBaseAPIDefaults } from "./api/base";
3
3
  import type { HttpPromise, HttpError, QueryParams, ReqOptions, ReqPayload, TrailsPromise, TrailsPromisePaged, TrailsResp, TrailsRespPaged } from "./api/client";
4
- import { emailPattern, looseToNumber, phonePattern, textInputTypes, useInputField } from "./composables/forms";
4
+ import { emailPattern, looseToNumber, phonePattern, urlPattern, textInputTypes, useInputField } from "./composables/forms";
5
5
  import { debounce as debounceFn, debounceLeading } from "./helpers/Debounce";
6
6
  import { throttle as throttleFn } from "./helpers/Throttle";
7
7
  declare const install: Exclude<Plugin["install"], undefined>;
@@ -11,5 +11,5 @@ export * from "./lib-components/index";
11
11
  export { BaseAPI, isHttpCancel, isHttpError, setBaseAPIDefaults };
12
12
  export type { HttpPromise, HttpError, QueryParams, ReqOptions, ReqPayload, TrailsPromise, TrailsPromisePaged, TrailsResp, TrailsRespPaged, };
13
13
  export type * from "./composables/forms";
14
- export { emailPattern, looseToNumber, phonePattern, textInputTypes, useInputField, };
14
+ export { emailPattern, looseToNumber, phonePattern, urlPattern, textInputTypes, useInputField, };
15
15
  export { debounceFn, debounceLeading, throttleFn };
@@ -13,7 +13,7 @@ declare const _default: <T extends InputOption>(__VLS_props: {
13
13
  active: boolean;
14
14
  checked: boolean;
15
15
  disabled: boolean;
16
- option: import("vue").Reactive<T>;
16
+ option: T;
17
17
  }): any;
18
18
  };
19
19
  attrs: any;
@@ -35,7 +35,7 @@ declare const _default: <T extends InputOption>(__VLS_props: {
35
35
  active: boolean;
36
36
  checked: boolean;
37
37
  disabled: boolean;
38
- option: import("vue").Reactive<T>;
38
+ option: T;
39
39
  }): any;
40
40
  };
41
41
  emit: (evt: "update:modelValue", value: string | number | null | undefined) => void;
@@ -59,7 +59,7 @@ declare const _default: <T extends InputOption>(__VLS_props: {
59
59
  active: boolean;
60
60
  checked: boolean;
61
61
  disabled: boolean;
62
- option: import("vue").Reactive<T>;
62
+ option: T;
63
63
  }): any;
64
64
  };
65
65
  emit: (evt: "update:modelValue", value: string | number | null | undefined) => void;
@@ -5,6 +5,7 @@ import { default as DateFilter } from "./layout/DateFilter.vue";
5
5
  import { default as DetailList } from "./lists/DetailList.vue";
6
6
  import { default as DownloadCell } from "./lists/DownloadCell.vue";
7
7
  import { default as Flash } from "./overlays/Flash.vue";
8
+ import { default as AppIcon } from "./indicators/AppIcon.vue";
8
9
  import { default as InlineAlert } from "./indicators/InlineAlert.vue";
9
10
  import { default as Modal } from "./overlays/Modal.vue";
10
11
  import { default as SidebarLayout } from "./layout/SidebarLayout.vue";
@@ -38,7 +39,7 @@ import { default as RadioCards } from "./forms/RadioCards.vue";
38
39
  import { default as Select } from "./forms/Select.vue";
39
40
  import { default as TextArea } from "./forms/TextArea.vue";
40
41
  import { default as YesOrNoRadio } from "./forms/YesOrNoRadio.vue";
41
- export { ActionsDropdown, Cards, ContentModal, DateFilter, DetailList, DownloadCell, Flash, InlineAlert, Modal, SidebarLayout, Slideover, StackedLayout, Popover, PopoverContent, PopoverPosition, // Type export
42
+ export { ActionsDropdown, Cards, ContentModal, DateFilter, DetailList, DownloadCell, Flash, AppIcon, InlineAlert, Modal, SidebarLayout, Slideover, StackedLayout, Popover, PopoverContent, PopoverPosition, // Type export
42
43
  Paginator, Spinner, DataTable, Steps, DynamicTable, Tabs, Toggle, Tooltip, BaseInput, Checkbox, DateRangePicker, DateTime, InputError, InputHelp, InputLabel, FieldsetLegend, MultiCheckboxes, Radio, RadioCards, Select, TextArea, YesOrNoRadio, XYSpinner, ProgressCircles, ProgressCirclesLabeled, };
43
44
  /**
44
45
  * declare global component types for App.use(Trees)
@@ -51,6 +52,7 @@ export interface TreesComponents {
51
52
  DetailList: typeof DetailList;
52
53
  DownloadCell: typeof DownloadCell;
53
54
  Flash: typeof Flash;
55
+ AppIcon: typeof AppIcon;
54
56
  Modal: typeof Modal;
55
57
  SidebarLayout: typeof SidebarLayout;
56
58
  Slideover: typeof Slideover;
@@ -0,0 +1,24 @@
1
+ import type { Component, FunctionalComponent, RenderFunction } from "vue";
2
+ type __VLS_Props = {
3
+ bgColor?: `bg-${string}`;
4
+ iconColor?: `text-${string}`;
5
+ icon: FunctionalComponent | Component | RenderFunction;
6
+ indicator?: string | number | boolean;
7
+ size?: "xs" | "sm" | "base" | "lg" | "xl";
8
+ type?: "circle" | "square";
9
+ };
10
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ type: "circle" | "square";
12
+ size: "base" | "xs" | "sm" | "lg" | "xl";
13
+ bgColor: `bg-${string}`;
14
+ iconColor: `text-${string}`;
15
+ indicator: string | number | boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, HTMLDivElement>, {
17
+ default?(_: {}): any;
18
+ }>;
19
+ export default _default;
20
+ type __VLS_WithTemplateSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -1,9 +1,9 @@
1
- import type { NavItem } from "../../composables/nav";
1
+ import type { NavItem, UserMenuItem } from "../../composables/nav";
2
2
  type __VLS_Props = {
3
3
  activeUrl?: string;
4
4
  iconUrl: string;
5
5
  navigation: NavItem[];
6
- userNavigation: NavItem[];
6
+ userNavigation: UserMenuItem[];
7
7
  };
8
8
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
9
  activeUrl: string;
@@ -0,0 +1,8 @@
1
+ import { UserMenuItem } from "../../composables/nav";
2
+ type __VLS_Props = {
3
+ menu?: UserMenuItem[];
4
+ };
5
+ declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
6
+ menu: UserMenuItem[];
7
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { type Placement } from "@floating-ui/vue";
2
+ type __VLS_Props = {
3
+ as?: string;
4
+ position?: Placement | "auto";
5
+ tooltip: string;
6
+ };
7
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ as: string;
9
+ position: Placement | "auto";
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
11
+ default?(_: {}): any;
12
+ }>;
13
+ export default _default;
14
+ type __VLS_WithTemplateSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };