@resee-movies/nuxt-ux 0.0.3 → 0.1.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.
Files changed (48) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +77 -38
  3. package/dist/runtime/components/{UiButton.vue → Button.vue} +6 -4
  4. package/dist/runtime/components/{UiButton.vue.d.ts → Button.vue.d.ts} +6 -6
  5. package/dist/runtime/components/CloseButton.vue +14 -0
  6. package/dist/runtime/components/Dialog.vue +121 -0
  7. package/dist/runtime/components/Dialog.vue.d.ts +31 -0
  8. package/dist/runtime/components/Drawer.vue +91 -0
  9. package/dist/runtime/components/Drawer.vue.d.ts +23 -0
  10. package/dist/runtime/components/Icon.vue +24 -0
  11. package/dist/runtime/components/Icon.vue.d.ts +14 -0
  12. package/dist/runtime/components/{UiIconTextPair.vue → IconTextPair.vue} +3 -3
  13. package/dist/runtime/components/{UiIconTextPair.vue.d.ts → IconTextPair.vue.d.ts} +5 -5
  14. package/dist/runtime/components/Image.vue +149 -0
  15. package/dist/runtime/components/Image.vue.d.ts +59 -0
  16. package/dist/runtime/components/{UiLayoutPageColumn.vue.d.ts → LayoutPageColumn.vue.d.ts} +2 -2
  17. package/dist/runtime/components/{UiLayoutPageContainer.vue.d.ts → LayoutPageContainer.vue.d.ts} +2 -2
  18. package/dist/runtime/components/{UiLink.vue → Link.vue} +3 -2
  19. package/dist/runtime/components/{UiLink.vue.d.ts → Link.vue.d.ts} +4 -4
  20. package/dist/runtime/components/{UiLoadingIndicator.vue.d.ts → LoadingIndicator.vue.d.ts} +2 -2
  21. package/dist/runtime/components/{UiMessage.vue → Message.vue} +2 -1
  22. package/dist/runtime/components/{UiMessage.vue.d.ts → Message.vue.d.ts} +2 -2
  23. package/dist/runtime/components/{UiNotificationContainer.vue → NotificationContainer.vue} +1 -0
  24. package/dist/runtime/components/NotificationContainer.vue.d.ts +3 -0
  25. package/dist/runtime/components/{UiProgressBar.vue → ProgressBar.vue} +1 -0
  26. package/dist/runtime/components/{UiTag.vue → Tag.vue} +5 -2
  27. package/dist/runtime/composables/use-load-image.d.ts +23 -0
  28. package/dist/runtime/composables/use-load-image.js +109 -0
  29. package/dist/runtime/theme/css/brand/theme.css +1 -1
  30. package/dist/runtime/theme/css/brand/tooltip.css +1 -1
  31. package/dist/runtime/theme/css/brand/transition.css +1 -1
  32. package/dist/runtime/theme/css/brand/utilities.css +1 -1
  33. package/dist/runtime/types/index.d.ts +6 -0
  34. package/package.json +3 -2
  35. package/dist/runtime/components/UiIcon.vue +0 -23
  36. package/dist/runtime/components/UiIcon.vue.d.ts +0 -12
  37. /package/dist/runtime/components/{UiCard.vue → Card.vue} +0 -0
  38. /package/dist/runtime/components/{UiCard.vue.d.ts → Card.vue.d.ts} +0 -0
  39. /package/dist/runtime/components/{UiNotificationContainer.vue.d.ts → CloseButton.vue.d.ts} +0 -0
  40. /package/dist/runtime/components/{UiHeading.vue → Heading.vue} +0 -0
  41. /package/dist/runtime/components/{UiHeading.vue.d.ts → Heading.vue.d.ts} +0 -0
  42. /package/dist/runtime/components/{UiLayoutPageColumn.vue → LayoutPageColumn.vue} +0 -0
  43. /package/dist/runtime/components/{UiLayoutPageContainer.vue → LayoutPageContainer.vue} +0 -0
  44. /package/dist/runtime/components/{UiLoadingIndicator.vue → LoadingIndicator.vue} +0 -0
  45. /package/dist/runtime/components/{UiLorem.vue → Lorem.vue} +0 -0
  46. /package/dist/runtime/components/{UiLorem.vue.d.ts → Lorem.vue.d.ts} +0 -0
  47. /package/dist/runtime/components/{UiProgressBar.vue.d.ts → ProgressBar.vue.d.ts} +0 -0
  48. /package/dist/runtime/components/{UiTag.vue.d.ts → Tag.vue.d.ts} +0 -0
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@resee-movies/nuxt-ux",
3
3
  "configKey": "ux",
4
- "version": "0.0.3",
4
+ "version": "0.1.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.0"
package/dist/module.mjs CHANGED
@@ -1,11 +1,9 @@
1
- import { useNuxt, addTemplate, resolvePath, logger, installModule, addVitePlugin, defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addServerScanDir } from '@nuxt/kit';
1
+ import { useNuxt, addTemplate, resolvePath, logger, addVitePlugin, defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addServerScanDir } from '@nuxt/kit';
2
2
  import { toNonNullableArray } from '@resee-movies/utilities/arrays/to-non-nullable-array';
3
3
  import { readFile } from 'node:fs/promises';
4
4
  import { join } from 'node:path';
5
5
  import { existsSync } from 'node:fs';
6
6
  import { createRequire } from 'node:module';
7
- import NuxtFontsModule from '@nuxt/fonts';
8
- import NuxtPrimevueModule from '@primevue/nuxt-module';
9
7
 
10
8
  function resolveModuleDirectory(entry, ...packagePaths) {
11
9
  const packageName = entry.includes("/") ? entry.startsWith("@") ? entry.split("/").slice(0, 2).join("/") : entry.split("/")[0] : entry;
@@ -107,38 +105,60 @@ async function importCSS(nuxt = useNuxt(), options) {
107
105
  });
108
106
  }
109
107
 
110
- async function importModules(nuxt = useNuxt()) {
111
- await installModule(NuxtFontsModule, {
112
- families: [
113
- {
114
- name: "Archivo",
115
- provider: "google",
116
- styles: ["normal"],
117
- weights: [200, 300, 400, 500]
108
+ function importModules(nuxt) {
109
+ const NuxtFonts = {
110
+ defaults: {
111
+ families: [
112
+ {
113
+ name: "Archivo",
114
+ provider: "google",
115
+ styles: ["normal"],
116
+ weights: [200, 300, 400, 500]
117
+ }
118
+ ]
119
+ }
120
+ };
121
+ const primeOptions = nuxt.options.ux?.primevue;
122
+ const componentPrefix = primeOptions?.componentPrefix ?? "Prime";
123
+ const primeComponents = Array.from(
124
+ /* @__PURE__ */ new Set([
125
+ "Dialog",
126
+ "Drawer",
127
+ "Message",
128
+ "ProgressBar",
129
+ "ProgressSpinner",
130
+ "Tag",
131
+ "Toast",
132
+ ...primeOptions?.includeComponents ?? []
133
+ ])
134
+ );
135
+ const Primevue = {
136
+ defaults: {
137
+ autoImport: false,
138
+ loadStyles: false,
139
+ importPT: {
140
+ from: "#resee-movies-nuxt-ux-primevue-passthrough"
141
+ },
142
+ options: {
143
+ unstyled: true
144
+ },
145
+ composables: {
146
+ include: ["usePrimeVue", "useToast"]
147
+ },
148
+ directives: {
149
+ prefix: componentPrefix,
150
+ include: ["Tooltip"]
151
+ },
152
+ components: {
153
+ prefix: componentPrefix,
154
+ include: primeComponents
118
155
  }
119
- ]
120
- });
121
- await installModule(NuxtPrimevueModule, {
122
- autoImport: false,
123
- loadStyles: false,
124
- importPT: {
125
- from: "#resee-movies-nuxt-ux-primevue-passthrough"
126
- },
127
- options: {
128
- unstyled: true
129
- },
130
- composables: {
131
- include: ["useToast"]
132
- },
133
- directives: {
134
- prefix: "Prime",
135
- include: ["Tooltip"]
136
- },
137
- components: {
138
- prefix: "Prime",
139
- include: ["Message", "ProgressBar", "ProgressSpinner", "Tag", "Toast"]
140
156
  }
141
- }, nuxt);
157
+ };
158
+ return {
159
+ "@nuxt/fonts": NuxtFonts,
160
+ "@primevue/nuxt-module": Primevue
161
+ };
142
162
  }
143
163
 
144
164
  const Builder = "@nuxt/vite-builder";
@@ -169,32 +189,51 @@ async function importTailwind(nuxt = useNuxt()) {
169
189
  }
170
190
 
171
191
  const module = defineNuxtModule({
172
- defaults: {},
192
+ defaults: {
193
+ componentPrefix: "Ui"
194
+ },
173
195
  meta: {
174
196
  name: "@resee-movies/nuxt-ux",
175
197
  configKey: "ux"
176
198
  },
199
+ moduleDependencies: (nuxt) => importModules(nuxt),
177
200
  async setup(options, nuxt) {
178
201
  const resolver = createResolver(import.meta.url);
179
202
  const components = resolver.resolve("./runtime/components/");
180
203
  const composables = resolver.resolve("./runtime/composables/");
181
204
  const server = resolver.resolve("./runtime/server/");
182
205
  const stylesheet = resolver.resolve("./runtime/theme/css/styles.css");
183
- nuxt.options.alias["#resee-movies-nuxt-ux-primevue-passthrough"] = resolver.resolve("./runtime/theme/primevue/index.ts");
184
206
  const sources = options.tailwind?.sources?.slice() ?? [];
185
207
  const plugins = options.tailwind?.plugins?.slice() ?? [];
186
208
  const imports = options.tailwind?.plugins?.slice() ?? [];
187
209
  sources.push(components);
188
- plugins.push(resolveModuleDirectory("@egoist/tailwindcss-icons", "dist", "index.js"));
210
+ plugins.push(await resolvePath("@egoist/tailwindcss-icons"));
189
211
  imports.push(stylesheet);
190
- addComponentsDir({ path: components });
212
+ addComponentsDir({ path: components, prefix: options.componentPrefix });
191
213
  addImportsDir([composables]);
192
214
  addServerScanDir([server]);
193
215
  await importTailwind(nuxt);
194
- await importModules(nuxt);
195
216
  nuxt.hook("modules:done", async () => {
196
217
  await importCSS(nuxt, { sources, plugins, imports });
197
218
  });
219
+ let primePassthroughFilename = await resolver.resolvePath("./runtime/theme/primevue/index", {
220
+ extensions: ["ts", "js"]
221
+ });
222
+ if (options.primevue?.passthroughImport) {
223
+ const ownPassthroughFilename = primePassthroughFilename;
224
+ primePassthroughFilename = addTemplate({
225
+ filename: "resee-movies-nuxt-ux-primevue-passthrough.js",
226
+ write: true,
227
+ // language=js
228
+ getContents: () => `
229
+ import OwnPassthrough from '${ownPassthroughFilename}';
230
+ import ExtPassthrough from '${options.primevue?.passthroughImport}';
231
+
232
+ export default { ...OwnPassthrough, ...ExtPassthrough };
233
+ `
234
+ }).dst;
235
+ }
236
+ nuxt.options.alias["#resee-movies-nuxt-ux-primevue-passthrough"] = primePassthroughFilename;
198
237
  }
199
238
  });
200
239
 
@@ -16,10 +16,10 @@
16
16
  'icon-only': iconOnly
17
17
  }
18
18
  ]"
19
- v-primetooltip.top = "{ value: tooltipText, showDelay: 250 }"
20
- @click = "handleButtonClick"
19
+ v-prime-tooltip.top = "{ value: tooltipText, showDelay: 250 }"
20
+ @click = "handleButtonClick"
21
21
  >
22
- <UiIconTextPair
22
+ <IconTextPair
23
23
  :text = "props.text"
24
24
  :icon = "props.icon"
25
25
  :icon-size = "props.size"
@@ -29,7 +29,7 @@
29
29
  :loading = "showLoading"
30
30
  >
31
31
  <slot />
32
- </UiIconTextPair>
32
+ </IconTextPair>
33
33
  </Component>
34
34
  </template>
35
35
 
@@ -40,6 +40,8 @@ import { computed, ref, useSlots } from "vue";
40
40
  </script>
41
41
 
42
42
  <script setup>
43
+ import vPrimeTooltip from "primevue/tooltip";
44
+ import IconTextPair from "./IconTextPair.vue";
43
45
  defineEmits(["click"]);
44
46
  const props = defineProps({
45
47
  is: { type: null, required: false, default: "button" },
@@ -1,8 +1,8 @@
1
1
  import { type Component } from 'vue';
2
2
  import type { StyleStatusLevel } from '../types/index.js';
3
- import type { UiIconTextPairProps } from './UiIconTextPair.vue.js';
3
+ import type { IconTextPairProps } from './IconTextPair.vue.js';
4
4
  /**
5
- * UiButton component properties.
5
+ * Button component properties.
6
6
  *
7
7
  * A note about the `responsive` prop:
8
8
  *
@@ -13,7 +13,7 @@ import type { UiIconTextPairProps } from './UiIconTextPair.vue.js';
13
13
  * When "grow", causes the button to expand to the full width of its container, and
14
14
  * increase its font size when at the small breakpoint.
15
15
  */
16
- export type UiButtonProps = {
16
+ export type ButtonProps = {
17
17
  is?: string | Component;
18
18
  severity?: StyleStatusLevel | 'unset';
19
19
  bordered?: boolean;
@@ -25,10 +25,10 @@ export type UiButtonProps = {
25
25
  tooltip?: string;
26
26
  disabledTooltip?: string;
27
27
  onClick?: ((evt: Event) => void | Promise<void>) | ((evt: Event) => void | Promise<void>)[];
28
- } & UiIconTextPairProps;
29
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<UiButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
28
+ } & IconTextPairProps;
29
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
30
30
  click: (evt: Event) => any;
31
- }, string, import("vue").PublicProps, Readonly<UiButtonProps> & Readonly<{
31
+ }, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{
32
32
  onClick?: ((evt: Event) => any) | undefined;
33
33
  }>, {
34
34
  size: "sm" | "lg";
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <Button
3
+ :aria-label = "primevue.config.locale?.aria?.close"
4
+ :tooltip = "primevue.config.locale?.aria?.close"
5
+ :bordered = "false"
6
+ icon = "i-ph-x"
7
+ />
8
+ </template>
9
+
10
+ <script setup>
11
+ import { usePrimeVue } from "primevue/config";
12
+ import Button from "./Button.vue";
13
+ const primevue = usePrimeVue();
14
+ </script>
@@ -0,0 +1,121 @@
1
+ <template>
2
+ <PrimeDialog
3
+ :visible = "props.visible"
4
+ :modal = "props.modal"
5
+ :closable = "props.closable"
6
+ :draggable = "props.draggable"
7
+ :header = "props.showHeaderText ? props.header : void 0"
8
+ :show-header = "props.showHeader"
9
+ :aria-label = "props.showHeader && props.showHeaderText ? void 0 : props.header"
10
+ :footer = "props.footer"
11
+ :dismissable-mask = "props.dismissableMask"
12
+ :position = "props.position"
13
+ :class = "['dialog', dialogWidth]"
14
+ :content-class = "props.contentClass"
15
+ :pt = "passthroughProps"
16
+ :aria-labelledby = "dialogLabelledBy"
17
+ @update:visible = "(updatedValue) => emits('update:visible', updatedValue)"
18
+ >
19
+ <template #header>
20
+ <div class="title" :id="dialogLabelledBy">
21
+ <slot v-if="props.showHeaderText" name="title">
22
+ {{ props.header }}
23
+ </slot>
24
+ </div>
25
+ </template>
26
+
27
+ <template #closebutton="{ closeCallback }">
28
+ <CloseButton @click="closeCallback" />
29
+ </template>
30
+
31
+ <template #default>
32
+ <slot />
33
+ </template>
34
+ </PrimeDialog>
35
+ </template>
36
+
37
+ <script>
38
+
39
+ </script>
40
+
41
+ <script setup>
42
+ import { computed, useId, useAttrs } from "vue";
43
+ import PrimeDialog from "primevue/dialog";
44
+ import CloseButton from "./CloseButton.vue";
45
+ const props = defineProps({
46
+ size: { type: String, required: false, default: "md" },
47
+ showHeaderText: { type: Boolean, required: false, default: true },
48
+ header: { type: null, required: false },
49
+ footer: { type: null, required: false },
50
+ visible: { type: Boolean, required: false, skipCheck: true },
51
+ modal: { type: Boolean, required: false, skipCheck: true, default: true },
52
+ contentStyle: { type: null, required: false },
53
+ contentClass: { type: null, required: false, default: void 0 },
54
+ contentProps: { type: null, required: false },
55
+ closable: { type: Boolean, required: false, skipCheck: true, default: true },
56
+ dismissableMask: { type: Boolean, required: false, skipCheck: true, default: true },
57
+ closeOnEscape: { type: Boolean, required: false, skipCheck: true },
58
+ showHeader: { type: Boolean, required: false, skipCheck: true, default: true },
59
+ blockScroll: { type: Boolean, required: false, skipCheck: true },
60
+ baseZIndex: { type: null, required: false },
61
+ autoZIndex: { type: Boolean, required: false, skipCheck: true },
62
+ position: { type: null, required: false, default: void 0 },
63
+ maximizable: { type: Boolean, required: false, skipCheck: true },
64
+ breakpoints: { type: Object, required: false },
65
+ draggable: { type: Boolean, required: false, skipCheck: true, default: false },
66
+ keepInViewport: { type: Boolean, required: false, skipCheck: true },
67
+ minX: { type: null, required: false },
68
+ minY: { type: null, required: false },
69
+ appendTo: { type: null, required: false },
70
+ style: { type: null, required: false },
71
+ closeIcon: { type: null, required: false },
72
+ maximizeIcon: { type: null, required: false },
73
+ minimizeIcon: { type: null, required: false },
74
+ closeButtonProps: { type: null, required: false },
75
+ maximizeButtonProps: { type: null, required: false },
76
+ dt: { type: null, required: false },
77
+ pt: { type: null, required: false },
78
+ ptOptions: { type: Object, required: false },
79
+ unstyled: { type: Boolean, required: false }
80
+ });
81
+ const emits = defineEmits(["update:visible"]);
82
+ const attrs = useAttrs();
83
+ const dialogId = useId();
84
+ const dialogWidth = computed(() => {
85
+ switch (props.size) {
86
+ case "lg":
87
+ return "max-w-5xl";
88
+ case "sm":
89
+ return "max-w-xl";
90
+ case "xs":
91
+ return "max-w-md";
92
+ case "xxs":
93
+ return "max-w-sm";
94
+ default:
95
+ return "max-w-3xl";
96
+ }
97
+ });
98
+ const dialogLabelledBy = computed(() => {
99
+ return !attrs["aria-label"] ? `${dialogId}_header` : void 0;
100
+ });
101
+ const passthroughProps = computed(() => {
102
+ return {
103
+ header: {
104
+ class: "header"
105
+ },
106
+ content: {
107
+ class: "content"
108
+ },
109
+ mask: {
110
+ class: "occlude-background"
111
+ },
112
+ transition: {
113
+ name: "scale"
114
+ }
115
+ };
116
+ });
117
+ </script>
118
+
119
+ <style>
120
+ @reference "tailwindcss";.dialog{background-color:var(--color-global-background);border:1px solid var(--color-global-background-accent);border-radius:var(--radius-md);height:calc(100% - --spacing(4));margin:--spacing(2);overflow:clip;width:100%;@variant sm{box-shadow:var(--shadow-heavy);height:auto}}.dialog .header{align-items:center;border-bottom:1px solid var(--color-global-background-accent);display:flex;gap:--spacing(3);margin-inline:--spacing(3);margin-top:--spacing(3);padding-bottom:--spacing(3)}.dialog .header .title{flex-grow:1;font-size:var(--text-lg)}.dialog .content{overflow-y:auto;padding:--spacing(3)}
121
+ </style>
@@ -0,0 +1,31 @@
1
+ import type { DialogProps as PrimeDialogProps } from 'primevue';
2
+ export type DialogProps = {
3
+ size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
4
+ showHeaderText?: boolean;
5
+ } & PrimeDialogProps;
6
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ "update:visible": (visible: boolean) => any;
8
+ }, string, import("vue").PublicProps, Readonly<DialogProps> & Readonly<{
9
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
10
+ }>, {
11
+ size: "xxs" | "xs" | "sm" | "md" | "lg";
12
+ showHeaderText: boolean;
13
+ modal: boolean;
14
+ contentClass: any;
15
+ closable: boolean;
16
+ dismissableMask: boolean;
17
+ showHeader: boolean;
18
+ position: import("@primevue/core").HintedString<"top" | "center" | "bottom" | "left" | "right" | "topleft" | "topright" | "bottomleft" | "bottomright">;
19
+ draggable: boolean;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
21
+ title?: (props: {}) => any;
22
+ } & {
23
+ default?: (props: {}) => any;
24
+ }>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,91 @@
1
+ <template>
2
+ <PrimeDrawer
3
+ :class ="['drawer', `drawer-${props.position ?? 'left'}`]"
4
+ :visible = "props.visible"
5
+ :position = "props.position"
6
+ :block-scroll = "props.blockScroll"
7
+ :aria-label = "props.showHeaderText ? void 0 : props.header"
8
+ :pt = "passthroughProps"
9
+ @update:visible = "(updatedValue) => emits('update:visible', updatedValue)"
10
+ >
11
+ <template #closebutton="{ closeCallback }">
12
+ <CloseButton @click="closeCallback" />
13
+ </template>
14
+
15
+ <template #header>
16
+ <div class="title">
17
+ <slot v-if="props.showHeaderText" name="title">
18
+ {{ props.header }}
19
+ </slot>
20
+ </div>
21
+ </template>
22
+
23
+ <template #default>
24
+ <slot />
25
+ </template>
26
+ </PrimeDrawer>
27
+ </template>
28
+
29
+ <script>
30
+ import { calculateBodyScrollbarWidth } from "@primeuix/utils";
31
+ </script>
32
+
33
+ <script setup>
34
+ import { computed } from "vue";
35
+ import PrimeDrawer from "primevue/drawer";
36
+ import CloseButton from "./CloseButton.vue";
37
+ const props = defineProps({
38
+ showHeaderText: { type: Boolean, required: false, default: true },
39
+ visible: { type: Boolean, required: false, skipCheck: true },
40
+ position: { type: null, required: false },
41
+ header: { type: null, required: false },
42
+ baseZIndex: { type: null, required: false },
43
+ autoZIndex: { type: Boolean, required: false, skipCheck: true },
44
+ dismissable: { type: Boolean, required: false, skipCheck: true },
45
+ showCloseIcon: { type: Boolean, required: false, skipCheck: true },
46
+ closeButtonProps: { type: null, required: false },
47
+ closeIcon: { type: null, required: false },
48
+ modal: { type: Boolean, required: false, skipCheck: true },
49
+ blockScroll: { type: Boolean, required: false, skipCheck: true, default: true },
50
+ dt: { type: null, required: false },
51
+ pt: { type: null, required: false },
52
+ ptOptions: { type: Object, required: false },
53
+ unstyled: { type: Boolean, required: false },
54
+ closeOnEscape: { type: Boolean, required: false, skipCheck: true }
55
+ });
56
+ const emits = defineEmits(["update:visible"]);
57
+ const passthroughProps = computed(() => {
58
+ return {
59
+ header() {
60
+ return {
61
+ class: [
62
+ "header",
63
+ {
64
+ "me-3": props.position !== "right" || calculateBodyScrollbarWidth() === 0
65
+ }
66
+ ]
67
+ };
68
+ },
69
+ content: {
70
+ class: "content"
71
+ },
72
+ mask() {
73
+ return {
74
+ class: [
75
+ "occlude-background",
76
+ {
77
+ "replace-scrollbar": props.position === "right"
78
+ }
79
+ ]
80
+ };
81
+ },
82
+ transition: {
83
+ name: `slide-in-${props.position ?? "left"}`
84
+ }
85
+ };
86
+ });
87
+ </script>
88
+
89
+ <style>
90
+ @reference "tailwindcss";.drawer{background:var(--color-global-background);border-color:var(--color-global-background-accent)}.drawer.drawer-left{border-right-width:1px;box-shadow:var(--shadow-heavy-right);height:100%;width:--spacing(80)}.drawer.drawer-right{border-left-width:1px;box-shadow:var(--shadow-heavy-left);height:100%;width:--spacing(80)}.drawer.drawer-top{border-bottom-width:1px;box-shadow:var(--shadow-heavy);width:100%}.drawer.drawer-bottom{border-top-width:1px;box-shadow:var(--shadow-heavy-top);width:100%}.drawer .header{align-items:center;border-bottom:1px solid var(--color-global-background-accent);display:flex;margin-inline-start:--spacing(3);margin-top:--spacing(3);padding-bottom:--spacing(3)}.drawer .header .title{flex-grow:1;font-size:var(--text-lg)}.drawer .content{height:100%;overflow-y:auto;padding-bottom:--spacing(3);padding-top:--spacing(3);padding-inline-start:--spacing(3);width:100%}
91
+ </style>
@@ -0,0 +1,23 @@
1
+ import type { DrawerProps as PrimeDrawerProps } from 'primevue';
2
+ export type DrawerProps = {
3
+ showHeaderText?: boolean;
4
+ } & PrimeDrawerProps;
5
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<DrawerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
6
+ "update:visible": (visible: boolean) => any;
7
+ }, string, import("vue").PublicProps, Readonly<DrawerProps> & Readonly<{
8
+ "onUpdate:visible"?: ((visible: boolean) => any) | undefined;
9
+ }>, {
10
+ showHeaderText: boolean;
11
+ blockScroll: boolean;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
13
+ title?: (props: {}) => any;
14
+ } & {
15
+ default?: (props: {}) => any;
16
+ }>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <Transition name="fade" mode="out-in">
3
+ <LoadingIndicator v-if="props.loading" :size="props.size" class="icon" />
4
+ <span v-else role="presentation" :class="['icon', props.name, props.size, { 'color-cycle': props.colorCycle }]" />
5
+ </Transition>
6
+ </template>
7
+
8
+ <script>
9
+
10
+ </script>
11
+
12
+ <script setup>
13
+ import LoadingIndicator from "./LoadingIndicator.vue";
14
+ const props = defineProps({
15
+ name: { type: String, required: false, default: void 0 },
16
+ loading: { type: Boolean, required: false, default: false },
17
+ size: { type: String, required: false, default: "md" },
18
+ colorCycle: { type: Boolean, required: false, default: false }
19
+ });
20
+ </script>
21
+
22
+ <style scoped>
23
+ .icon{align-items:center;display:inline-flex}.icon:before{content:var(--zero-width-space)}.icon.sm{font-size:var(--icon-size-small)}.icon.md{font-size:var(--icon-size-medium)}.icon.lg{font-size:var(--icon-size-large)}.icon.xl{font-size:var(--icon-size-jumbo)}.icon.color-cycle{--resee-color-cycle-timing:cubic-bezier(0,.5,1,.5);animation-duration:8s;animation-iteration-count:infinite;animation-name:resee-color-cycle}@keyframes resee-color-cycle{0%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-red)}6.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-orange)}18.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-yellow)}31.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-green)}43.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-seaweed)}56.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-aqua)}68.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-blue)}81.25%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-indigo)}93.75%{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-violet)}to{animation-timing-function:var(--resee-color-cycle-timing);color:var(--color-resee-red)}}
24
+ </style>
@@ -0,0 +1,14 @@
1
+ export type IconProps = {
2
+ name?: string;
3
+ loading?: boolean;
4
+ size?: 'sm' | 'md' | 'lg' | 'xl';
5
+ colorCycle?: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {
8
+ size: "sm" | "md" | "lg" | "xl";
9
+ name: string;
10
+ loading: boolean;
11
+ colorCycle: boolean;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -6,7 +6,7 @@
6
6
  props.spacing ? `spacing-${props.spacing}` : void 0
7
7
  ]"
8
8
  >
9
- <UiIcon
9
+ <Icon
10
10
  v-if = "props.icon || props.loading"
11
11
  :name = "props.icon"
12
12
  :size = "props.iconSize"
@@ -19,7 +19,7 @@
19
19
  </slot>
20
20
  </span>
21
21
 
22
- <UiIcon
22
+ <Icon
23
23
  v-if = "props.trailingIcon"
24
24
  :name = "props.trailingIcon"
25
25
  :size = "props.iconSize"
@@ -32,7 +32,7 @@ import { useSlots } from "vue";
32
32
  </script>
33
33
 
34
34
  <script setup>
35
- import UiIcon from "./UiIcon.vue";
35
+ import Icon from "./Icon.vue";
36
36
  const props = defineProps({
37
37
  text: { type: String, required: false, default: void 0 },
38
38
  icon: { type: String, required: false, default: void 0 },
@@ -1,15 +1,15 @@
1
- import type { UiIconProps } from './UiIcon.vue.js';
2
- export type UiIconTextPairProps = {
1
+ import type { IconProps } from './Icon.vue.js';
2
+ export type IconTextPairProps = {
3
3
  text?: string;
4
4
  icon?: string;
5
5
  trailingIcon?: string;
6
- iconSize?: UiIconProps['size'];
7
- trailingIconSize?: UiIconProps['size'];
6
+ iconSize?: IconProps['size'];
7
+ trailingIconSize?: IconProps['size'];
8
8
  layout?: 'column' | 'row';
9
9
  spacing?: 'wide' | 'normal';
10
10
  loading?: boolean;
11
11
  };
12
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<UiIconTextPairProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UiIconTextPairProps> & Readonly<{}>, {
12
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<IconTextPairProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconTextPairProps> & Readonly<{}>, {
13
13
  loading: boolean;
14
14
  icon: string;
15
15
  text: string;