@resee-movies/nuxt-ux 0.0.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 (61) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +2 -0
  3. package/dist/module.d.mts +6 -0
  4. package/dist/module.json +9 -0
  5. package/dist/module.mjs +185 -0
  6. package/dist/runtime/components/UiButton.vue +92 -0
  7. package/dist/runtime/components/UiButton.vue.d.ts +53 -0
  8. package/dist/runtime/components/UiCard.vue +26 -0
  9. package/dist/runtime/components/UiCard.vue.d.ts +24 -0
  10. package/dist/runtime/components/UiHeading.vue +16 -0
  11. package/dist/runtime/components/UiHeading.vue.d.ts +20 -0
  12. package/dist/runtime/components/UiIcon.vue +23 -0
  13. package/dist/runtime/components/UiIcon.vue.d.ts +12 -0
  14. package/dist/runtime/components/UiIconTextPair.vue +51 -0
  15. package/dist/runtime/components/UiIconTextPair.vue.d.ts +30 -0
  16. package/dist/runtime/components/UiLayoutPageColumn.vue +23 -0
  17. package/dist/runtime/components/UiLayoutPageColumn.vue.d.ts +17 -0
  18. package/dist/runtime/components/UiLayoutPageContainer.vue +24 -0
  19. package/dist/runtime/components/UiLayoutPageContainer.vue.d.ts +20 -0
  20. package/dist/runtime/components/UiLink.vue +28 -0
  21. package/dist/runtime/components/UiLink.vue.d.ts +26 -0
  22. package/dist/runtime/components/UiLoadingIndicator.vue +14 -0
  23. package/dist/runtime/components/UiLoadingIndicator.vue.d.ts +9 -0
  24. package/dist/runtime/components/UiLorem.vue +314 -0
  25. package/dist/runtime/components/UiLorem.vue.d.ts +24 -0
  26. package/dist/runtime/components/UiMessage.vue +46 -0
  27. package/dist/runtime/components/UiMessage.vue.d.ts +18 -0
  28. package/dist/runtime/components/UiNotificationContainer.vue +37 -0
  29. package/dist/runtime/components/UiNotificationContainer.vue.d.ts +3 -0
  30. package/dist/runtime/components/UiProgressBar.vue +25 -0
  31. package/dist/runtime/components/UiProgressBar.vue.d.ts +12 -0
  32. package/dist/runtime/components/UiTag.vue +28 -0
  33. package/dist/runtime/components/UiTag.vue.d.ts +17 -0
  34. package/dist/runtime/composables/use-notification.d.ts +17 -0
  35. package/dist/runtime/composables/use-notification.js +31 -0
  36. package/dist/runtime/composables/use-nuxt-ux-config.d.ts +24 -0
  37. package/dist/runtime/composables/use-nuxt-ux-config.js +15 -0
  38. package/dist/runtime/composables/use-shared-intersection-observer.d.ts +41 -0
  39. package/dist/runtime/composables/use-shared-intersection-observer.js +70 -0
  40. package/dist/runtime/constants.d.ts +6 -0
  41. package/dist/runtime/constants.js +9 -0
  42. package/dist/runtime/server/plugins/color-mode.d.ts +3 -0
  43. package/dist/runtime/server/plugins/color-mode.js +27 -0
  44. package/dist/runtime/theme/css/brand/anchor.css +1 -0
  45. package/dist/runtime/theme/css/brand/application.css +1 -0
  46. package/dist/runtime/theme/css/brand/button.css +1 -0
  47. package/dist/runtime/theme/css/brand/status.css +1 -0
  48. package/dist/runtime/theme/css/brand/theme.css +1 -0
  49. package/dist/runtime/theme/css/brand/tooltip.css +1 -0
  50. package/dist/runtime/theme/css/brand/transition.css +1 -0
  51. package/dist/runtime/theme/css/brand/typography.css +1 -0
  52. package/dist/runtime/theme/css/brand/utilities.css +1 -0
  53. package/dist/runtime/theme/css/styles.css +1 -0
  54. package/dist/runtime/theme/primevue/index.d.ts +6 -0
  55. package/dist/runtime/theme/primevue/index.js +6 -0
  56. package/dist/runtime/theme/primevue/passthrough/tooltip.d.ts +3 -0
  57. package/dist/runtime/theme/primevue/passthrough/tooltip.js +15 -0
  58. package/dist/runtime/types/index.d.ts +36 -0
  59. package/dist/runtime/types/index.js +0 -0
  60. package/dist/types.d.mts +7 -0
  61. package/package.json +86 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ReSee Movies
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # ReSee Movies Nuxt UX
2
+ The next-gen user experience library for ReSee Movies - currently in development.
@@ -0,0 +1,6 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { ModuleOptions } from '../dist/runtime/types/index.js';
3
+
4
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
5
+
6
+ export { _default as default };
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@resee-movies/nuxt-ux",
3
+ "configKey": "ux",
4
+ "version": "0.0.1",
5
+ "builder": {
6
+ "@nuxt/module-builder": "1.0.2",
7
+ "unbuild": "3.6.0"
8
+ }
9
+ }
@@ -0,0 +1,185 @@
1
+ import { useNuxt, addTemplate, resolvePath, logger, installModule, addVitePlugin, defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addServerScanDir } from '@nuxt/kit';
2
+ import { readFile } from 'node:fs/promises';
3
+ import { join } from 'node:path';
4
+
5
+ const IMPORT_REGEX = /(?<=\s|^|;|\})@import\s+["']tailwindcss["']/gmu;
6
+ function getDefaults(config) {
7
+ return [
8
+ "css/tailwind.css",
9
+ "css/main.css",
10
+ "css/styles.css"
11
+ ].map(
12
+ (defaultPath) => join(config.srcDir, config.dir?.assets || "assets", defaultPath)
13
+ );
14
+ }
15
+ async function importCSS(nuxt = useNuxt(), options) {
16
+ const sources = nuxt.options._layers.map(
17
+ (layer) => layer.config.srcDir || layer.cwd
18
+ );
19
+ const plugins = options?.plugins ?? [];
20
+ if (options?.sources) {
21
+ sources.push(...options.sources);
22
+ }
23
+ await nuxt.callHook("tailwindcss:sources:extend", sources);
24
+ const sourcesTemplate = addTemplate({
25
+ filename: "tailwindcss/sources.css",
26
+ write: true,
27
+ getContents: () => {
28
+ const sourceStrings = sources.map((source) => `@source ${JSON.stringify(source)};`).join("\n");
29
+ const pluginStrings = plugins.map((plugin) => `@plugin ${JSON.stringify(plugin)};`).join("\n");
30
+ return sourceStrings + "\n" + pluginStrings;
31
+ }
32
+ });
33
+ const importingFiles = [];
34
+ const projectCSSFiles = await Promise.all(nuxt.options.css.map((p) => resolvePath(p)));
35
+ for (let i = 0; i < nuxt.options._layers.length; i++) {
36
+ const currentLayer = nuxt.options._layers[i];
37
+ const resolvedCSS = [];
38
+ if (i === 0) {
39
+ resolvedCSS.push(...projectCSSFiles);
40
+ } else if (currentLayer?.config.css) {
41
+ const cssPaths = currentLayer.config.css.filter((p) => typeof p === "string").map((p) => resolvePath(p));
42
+ await Promise.all(cssPaths).then(
43
+ (files) => resolvedCSS.push(...files)
44
+ );
45
+ }
46
+ if (currentLayer?.config) {
47
+ const promises = Array.from(
48
+ /* @__PURE__ */ new Set([...getDefaults(currentLayer.config), ...resolvedCSS])
49
+ ).map(async (file2) => {
50
+ const contents = await readFile(file2, { encoding: "utf-8" }).catch(() => "");
51
+ return [file2, {
52
+ hasImport: IMPORT_REGEX.test(contents),
53
+ isInNuxt: projectCSSFiles.includes(file2)
54
+ }];
55
+ });
56
+ const analyzed = await Promise.all(promises).then(
57
+ (files) => files.filter((file2) => file2[1].hasImport)
58
+ );
59
+ if (analyzed.length) {
60
+ importingFiles.push(...analyzed);
61
+ break;
62
+ }
63
+ }
64
+ }
65
+ const [file, { isInNuxt } = {}] = importingFiles.length === 0 ? [
66
+ addTemplate({
67
+ filename: "tailwind.css",
68
+ write: true,
69
+ getContents: () => {
70
+ return [
71
+ `@import 'tailwindcss';`,
72
+ `@import ${JSON.stringify(sourcesTemplate.dst)};`,
73
+ ...(options?.imports ?? []).map((item) => `@import ${JSON.stringify(item)};`)
74
+ ].join("\n");
75
+ }
76
+ }).dst
77
+ ] : importingFiles.find((file2) => file2[1].isInNuxt) || importingFiles.pop();
78
+ if (!isInNuxt) {
79
+ nuxt.options.css.unshift(file);
80
+ }
81
+ nuxt.options.alias["#tailwindcss"] = file;
82
+ nuxt.options.alias["#tailwindcss/sources"] = sourcesTemplate.dst;
83
+ nuxt.hook("builder:watch", (_e, path) => {
84
+ if (path !== file && projectCSSFiles.includes(path)) {
85
+ readFile(file, { encoding: "utf-8" }).then((fileContents) => {
86
+ if (IMPORT_REGEX.test(fileContents)) {
87
+ logger.withTag("@nuxtjs/tailwindcss").warn(`New import for \`tailwindcss\` detected in ${file}. Restart server.`);
88
+ }
89
+ });
90
+ }
91
+ });
92
+ }
93
+
94
+ async function importModules(nuxt = useNuxt()) {
95
+ await installModule("@nuxt/fonts", {
96
+ families: [
97
+ {
98
+ name: "Archivo",
99
+ provider: "google",
100
+ styles: ["normal"],
101
+ weights: [200, 300, 400, 500]
102
+ }
103
+ ]
104
+ });
105
+ await installModule("@primevue/nuxt-module", {
106
+ autoImport: false,
107
+ loadStyles: false,
108
+ importPT: {
109
+ from: "#resee-movies-nuxt-ux-primevue-passthrough"
110
+ },
111
+ options: {
112
+ unstyled: true
113
+ },
114
+ composables: {
115
+ include: ["useToast"]
116
+ },
117
+ directives: {
118
+ prefix: "Prime",
119
+ include: ["Tooltip"]
120
+ },
121
+ components: {
122
+ prefix: "Prime",
123
+ include: ["Message", "ProgressBar", "ProgressSpinner", "Tag", "Toast"]
124
+ }
125
+ }, nuxt);
126
+ }
127
+
128
+ const Builder = "@nuxt/vite-builder";
129
+ const VitePlugin = "@tailwindcss/vite";
130
+ const PostPlugin = "@tailwindcss/postcss";
131
+ function checkVitePlugins(plugins) {
132
+ return plugins.some((entry) => {
133
+ if (Array.isArray(entry)) {
134
+ return checkVitePlugins(entry);
135
+ }
136
+ return entry && typeof entry === "object" && "name" in entry && typeof entry.name === "string" && entry.name.startsWith(VitePlugin);
137
+ });
138
+ }
139
+ async function importTailwind(nuxt = useNuxt()) {
140
+ if (nuxt.options.builder === Builder) {
141
+ if (!checkVitePlugins(nuxt.options.vite.plugins ?? [])) {
142
+ await import(VitePlugin).then(
143
+ (tailwind) => addVitePlugin(tailwind.default())
144
+ );
145
+ }
146
+ } else {
147
+ nuxt.options.postcss ??= { plugins: {}, order: [] };
148
+ nuxt.options.postcss.plugins ??= {};
149
+ if (!nuxt.options.postcss.plugins[PostPlugin]) {
150
+ nuxt.options.postcss.plugins[PostPlugin] = {};
151
+ }
152
+ }
153
+ }
154
+
155
+ const module = defineNuxtModule({
156
+ defaults: {},
157
+ meta: {
158
+ name: "@resee-movies/nuxt-ux",
159
+ configKey: "ux"
160
+ },
161
+ async setup(options, nuxt) {
162
+ const resolver = createResolver(import.meta.url);
163
+ const components = resolver.resolve("./runtime/components/");
164
+ const composables = resolver.resolve("./runtime/composables/");
165
+ const server = resolver.resolve("./runtime/server/");
166
+ const stylesheet = resolver.resolve("./runtime/theme/css/styles.css");
167
+ nuxt.options.alias["#resee-movies-nuxt-ux-primevue-passthrough"] = resolver.resolve("./runtime/theme/primevue/index.ts");
168
+ const sources = options.tailwind?.sources?.slice() ?? [];
169
+ const plugins = options.tailwind?.plugins?.slice() ?? [];
170
+ const imports = options.tailwind?.plugins?.slice() ?? [];
171
+ sources.push(components);
172
+ plugins.push("@egoist/tailwindcss-icons");
173
+ imports.push(stylesheet);
174
+ addComponentsDir({ path: components });
175
+ addImportsDir([composables]);
176
+ addServerScanDir([server]);
177
+ await importTailwind(nuxt);
178
+ await importModules(nuxt);
179
+ nuxt.hook("modules:done", async () => {
180
+ await importCSS(nuxt, { sources, plugins, imports });
181
+ });
182
+ }
183
+ });
184
+
185
+ export { module as default };
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <Component
3
+ :is = "props.is"
4
+ :aria-label = "shrink ? props.text : void 0"
5
+ :disabled = "props.disabled"
6
+ :class = "[
7
+ props.severity === 'unset' ? void 0 : props.variant,
8
+ {
9
+ 'borderless': !props.bordered,
10
+ 'small': props.size === 'sm',
11
+ 'large': props.size === 'lg',
12
+ 'disabled': props.disabled,
13
+ 'loading': showLoading,
14
+ 'responsive-shrink': shrink,
15
+ 'responsive-grow': props.responsive === 'grow',
16
+ 'icon-only': iconOnly
17
+ }
18
+ ]"
19
+ v-primetooltip.top = "{ value: tooltipText, showDelay: 250 }"
20
+ @click = "handleButtonClick"
21
+ >
22
+ <UiIconTextPair
23
+ :text = "props.text"
24
+ :icon = "props.icon"
25
+ :icon-size = "props.size"
26
+ :trailing-icon = "props.trailingIcon"
27
+ :layout = "props.layout"
28
+ :spacing = "props.spacing ?? (props.layout === 'column' ? void 0 : 'wide')"
29
+ :loading = "showLoading"
30
+ >
31
+ <slot />
32
+ </UiIconTextPair>
33
+ </Component>
34
+ </template>
35
+
36
+ <script>
37
+ import { toNonNullableArray } from "@resee-movies/utilities/arrays/to-non-nullable-array";
38
+ import { isPromiseLike } from "@resee-movies/utilities/objects/is-promise-like";
39
+ import { computed, ref, useSlots } from "vue";
40
+ </script>
41
+
42
+ <script setup>
43
+ defineEmits(["click"]);
44
+ const props = defineProps({
45
+ is: { type: null, required: false, default: "button" },
46
+ severity: { type: String, required: false, default: void 0 },
47
+ bordered: { type: Boolean, required: false, default: true },
48
+ responsive: { type: [Boolean, String], required: false, default: false },
49
+ variant: { type: String, required: false, default: "btn" },
50
+ size: { type: String, required: false, default: void 0 },
51
+ disabled: { type: Boolean, required: false, default: false },
52
+ loading: { type: Boolean, required: false, default: false },
53
+ tooltip: { type: String, required: false, default: void 0 },
54
+ disabledTooltip: { type: String, required: false, default: void 0 },
55
+ onClick: { type: [Function, Array], required: false },
56
+ text: { type: String, required: false },
57
+ icon: { type: String, required: false },
58
+ trailingIcon: { type: String, required: false },
59
+ iconSize: { type: String, required: false },
60
+ trailingIconSize: { type: String, required: false },
61
+ layout: { type: String, required: false },
62
+ spacing: { type: String, required: false }
63
+ });
64
+ const slots = useSlots();
65
+ const shrink = computed(
66
+ () => props.responsive === true || props.responsive === "shrink"
67
+ );
68
+ const iconOnly = computed(
69
+ () => !!(props.icon || props.trailingIcon) && !(props.text || slots.default)
70
+ );
71
+ const tooltipText = computed(
72
+ () => props.disabled ? props.disabledTooltip : props.tooltip
73
+ );
74
+ const pendingClickResult = ref(false);
75
+ const showLoading = computed(
76
+ () => props.loading || pendingClickResult.value
77
+ );
78
+ async function handleButtonClick(evt) {
79
+ if (showLoading.value || props.disabled) {
80
+ return;
81
+ }
82
+ if (props.onClick) {
83
+ const handlers = toNonNullableArray(props.onClick);
84
+ const results = handlers.map((handler) => handler(evt));
85
+ if (!!results.find((result) => isPromiseLike(result))) {
86
+ pendingClickResult.value = true;
87
+ await Promise.allSettled(results);
88
+ pendingClickResult.value = false;
89
+ }
90
+ }
91
+ }
92
+ </script>
@@ -0,0 +1,53 @@
1
+ import { type Component } from 'vue';
2
+ import type { StyleStatusLevel } from '../types/index.js';
3
+ import type { UiIconTextPairProps } from './UiIconTextPair.vue.js';
4
+ /**
5
+ * UiButton component properties.
6
+ *
7
+ * A note about the `responsive` prop:
8
+ *
9
+ * When a boolean true or "shrink", causes the button text to be hidden at the small
10
+ * breakpoint, leaving only the icon. The text is still made reader accessible
11
+ * via the aria-label attribute.
12
+ *
13
+ * When "grow", causes the button to expand to the full width of its container, and
14
+ * increase its font size when at the small breakpoint.
15
+ */
16
+ export type UiButtonProps = {
17
+ is?: string | Component;
18
+ severity?: StyleStatusLevel | 'unset';
19
+ bordered?: boolean;
20
+ responsive?: boolean | 'grow' | 'shrink';
21
+ variant?: 'btn' | 'a';
22
+ size?: 'sm' | 'lg';
23
+ disabled?: boolean;
24
+ loading?: boolean;
25
+ tooltip?: string;
26
+ disabledTooltip?: string;
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, {} & {
30
+ click: (evt: Event) => any;
31
+ }, string, import("vue").PublicProps, Readonly<UiButtonProps> & Readonly<{
32
+ onClick?: ((evt: Event) => any) | undefined;
33
+ }>, {
34
+ size: "sm" | "lg";
35
+ loading: boolean;
36
+ is: string | Component;
37
+ severity: StyleStatusLevel | "unset";
38
+ bordered: boolean;
39
+ responsive: boolean | "grow" | "shrink";
40
+ variant: "btn" | "a";
41
+ disabled: boolean;
42
+ tooltip: string;
43
+ disabledTooltip: string;
44
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
45
+ default?: (props: {}) => any;
46
+ }>;
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ type __VLS_WithSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <Component :is="props.is" :class="['card', props.interactive ? 'interactive' : void 0]">
3
+ <slot>
4
+ <div v-if="slots.image" class="image">
5
+ <slot name="image" />
6
+ </div>
7
+
8
+ <div v-if="slots.content" class="content">
9
+ <slot name="content" />
10
+ </div>
11
+ </slot>
12
+ </Component>
13
+ </template>
14
+
15
+ <script setup>
16
+ import { useSlots } from "#imports";
17
+ const props = defineProps({
18
+ is: { type: String, required: false, default: "div" },
19
+ interactive: { type: Boolean, required: false, default: false }
20
+ });
21
+ const slots = useSlots();
22
+ </script>
23
+
24
+ <style scoped>
25
+ @reference "tailwindcss";.card{border:2px solid var(--color-background-scale-c);border-bottom-left-radius:--spacing(2);border-top-right-radius:--spacing(2);overflow:clip}.card .content{padding:--spacing(1.5)}.card.interactive{transition-duration:.5s;transition-property:border-color,border-radius,box-shadow;transition-timing-function:var(--default-transition-timing-function);-webkit-user-select:none;-moz-user-select:none;user-select:none}.card.interactive:focus-within,.card.interactive:hover{border-color:var(--color-background-scale-f);border-radius:0;box-shadow:var(--shadow-heavy)}
26
+ </style>
@@ -0,0 +1,24 @@
1
+ type __VLS_Props = {
2
+ is?: string;
3
+ interactive?: boolean;
4
+ };
5
+ declare var __VLS_7: {}, __VLS_9: {}, __VLS_11: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_7) => any;
8
+ } & {
9
+ image?: (props: typeof __VLS_9) => any;
10
+ } & {
11
+ content?: (props: typeof __VLS_11) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ is: string;
15
+ interactive: boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_WithSlots<T, S> = T & {
21
+ new (): {
22
+ $slots: S;
23
+ };
24
+ };
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <Component :is="tagName" :class="`h${props.level}`">
3
+ <slot>{{ props.text }}</slot>
4
+ </Component>
5
+ </template>
6
+
7
+ <script setup>
8
+ import { computed } from "vue";
9
+ const props = defineProps({
10
+ text: { type: [String, null], required: false, default: void 0 },
11
+ level: { type: [String, Number], required: false, default: "1" }
12
+ });
13
+ const tagName = computed(() => {
14
+ return `h${props.level}`;
15
+ });
16
+ </script>
@@ -0,0 +1,20 @@
1
+ type __VLS_Props = {
2
+ text?: string | null;
3
+ level?: '1' | '2' | '3' | '4' | '5' | '6' | 1 | 2 | 3 | 4 | 5 | 6;
4
+ };
5
+ declare var __VLS_7: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_7) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ text: string | null;
11
+ level: "1" | "2" | "3" | "4" | "5" | "6" | 1 | 2 | 3 | 4 | 5 | 6;
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <Transition name="fade" mode="out-in">
3
+ <UiLoadingIndicator v-if="props.loading" :size="props.size" class="icon" />
4
+ <span v-else role="presentation" :class="['icon', props.name, props.size]" />
5
+ </Transition>
6
+ </template>
7
+
8
+ <script>
9
+
10
+ </script>
11
+
12
+ <script setup>
13
+ import UiLoadingIndicator from "./UiLoadingIndicator.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
+ });
19
+ </script>
20
+
21
+ <style scoped>
22
+ .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)}
23
+ </style>
@@ -0,0 +1,12 @@
1
+ export type UiIconProps = {
2
+ name?: string;
3
+ loading?: boolean;
4
+ size?: 'sm' | 'md' | 'lg' | 'xl';
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<UiIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UiIconProps> & Readonly<{}>, {
7
+ size: "sm" | "md" | "lg" | "xl";
8
+ name: string;
9
+ loading: boolean;
10
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,51 @@
1
+ <template>
2
+ <span
3
+ :class="[
4
+ 'pair',
5
+ props.layout ? `layout-${props.layout}` : void 0,
6
+ props.spacing ? `spacing-${props.spacing}` : void 0
7
+ ]"
8
+ >
9
+ <UiIcon
10
+ v-if = "props.icon || props.loading"
11
+ :name = "props.icon"
12
+ :size = "props.iconSize"
13
+ :loading = "props.loading"
14
+ />
15
+
16
+ <span v-if="props.text || slots.default" class="label">
17
+ <slot>
18
+ {{ props.text }}
19
+ </slot>
20
+ </span>
21
+
22
+ <UiIcon
23
+ v-if = "props.trailingIcon"
24
+ :name = "props.trailingIcon"
25
+ :size = "props.iconSize"
26
+ />
27
+ </span>
28
+ </template>
29
+
30
+ <script>
31
+ import { useSlots } from "vue";
32
+ </script>
33
+
34
+ <script setup>
35
+ import UiIcon from "./UiIcon.vue";
36
+ const props = defineProps({
37
+ text: { type: String, required: false, default: void 0 },
38
+ icon: { type: String, required: false, default: void 0 },
39
+ trailingIcon: { type: String, required: false, default: void 0 },
40
+ iconSize: { type: String, required: false, default: "md" },
41
+ trailingIconSize: { type: String, required: false, default: "md" },
42
+ layout: { type: String, required: false, default: void 0 },
43
+ spacing: { type: String, required: false, default: void 0 },
44
+ loading: { type: Boolean, required: false, default: false }
45
+ });
46
+ const slots = useSlots();
47
+ </script>
48
+
49
+ <style scoped>
50
+ @reference "tailwindcss";.pair{align-items:baseline;display:inline-flex;gap:--spacing(1)}.pair.spacing-wide{gap:--spacing(2)}.pair.layout-row{display:flex}.pair.layout-column{align-items:center;flex-direction:column}
51
+ </style>
@@ -0,0 +1,30 @@
1
+ import type { UiIconProps } from './UiIcon.vue.js';
2
+ export type UiIconTextPairProps = {
3
+ text?: string;
4
+ icon?: string;
5
+ trailingIcon?: string;
6
+ iconSize?: UiIconProps['size'];
7
+ trailingIconSize?: UiIconProps['size'];
8
+ layout?: 'column' | 'row';
9
+ spacing?: 'wide' | 'normal';
10
+ loading?: boolean;
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<{}>, {
13
+ loading: boolean;
14
+ icon: string;
15
+ text: string;
16
+ trailingIcon: string;
17
+ iconSize: "sm" | "md" | "lg" | "xl";
18
+ trailingIconSize: "sm" | "md" | "lg" | "xl";
19
+ layout: "column" | "row";
20
+ spacing: "wide" | "normal";
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
22
+ default?: (props: {}) => any;
23
+ }>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <Component
3
+ :is = "props.is"
4
+ :class = "['page-column', props.layout ? `layout-${props.layout}` : void 0]"
5
+ >
6
+ <slot />
7
+ </Component>
8
+ </template>
9
+
10
+ <script>
11
+
12
+ </script>
13
+
14
+ <script setup>
15
+ const props = defineProps({
16
+ is: { type: String, required: false, default: "div" },
17
+ layout: { type: String, required: false, default: void 0 }
18
+ });
19
+ </script>
20
+
21
+ <style scoped>
22
+ @reference "tailwindcss";:global(:root){--page-column-gutter:calc(var(--spacing)*3);--page-column-pad-y:calc(var(--spacing)*12);--page-column-pad-vista:calc(var(--spacing)*52)}.page-column{margin-left:auto;margin-right:auto;padding:var(--page-column-gutter)}.page-column.layout-main:where(:has(:first-child.page-container)){padding-bottom:0;padding-top:0}.page-column.layout-vista:where(:has(:last-child.page-container)){padding-bottom:0}@variant md{.page-column{max-width:var(--container-3xl)}.page-column.layout-main{padding-top:var(--page-column-pad-y)}.page-column.layout-main,.page-column.layout-vista{padding-bottom:var(--page-column-pad-y)}}@variant lg{.page-column{max-width:var(--container-5xl)}.page-column.layout-vista{padding-top:var(--page-column-pad-vista)}}@variant portrait{.page-column.layout-vista{padding-top:min(calc(var(--spacing)*52),calc(56.25vw - 110px))}}
23
+ </style>
@@ -0,0 +1,17 @@
1
+ export type UiLayoutPageColumn = {
2
+ is?: string;
3
+ layout?: 'main' | 'vista';
4
+ };
5
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<UiLayoutPageColumn, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<UiLayoutPageColumn> & Readonly<{}>, {
6
+ layout: "main" | "vista";
7
+ is: string;
8
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
9
+ default?: (props: {}) => any;
10
+ }>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
13
+ type __VLS_WithSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,24 @@
1
+ <template>
2
+ <Component
3
+ :is = "props.is"
4
+ :class = "['page-container', props.glassEffect ? 'glass-effect' : void 0]"
5
+ >
6
+ <slot />
7
+ </Component>
8
+ </template>
9
+
10
+ <script>
11
+
12
+ </script>
13
+
14
+ <script setup>
15
+ const props = defineProps({
16
+ is: { type: String, required: false, default: "div" },
17
+ glassEffect: { type: Boolean, required: false, default: false },
18
+ accentColor: { type: String, required: false, default: void 0 }
19
+ });
20
+ </script>
21
+
22
+ <style scoped>
23
+ @reference "tailwindcss";:global(:root){--page-container-pad-y:calc(var(--page-column-gutter)*2);--page-container-pad-x:var(--page-container-pad-y);--page-container-radius:calc(var(--spacing)*1)}.page-container{--custom-accent-color:v-bind(accentColor);--page-container-accent-color:var(--custom-accent-color,var(--color-global-foreground-accent));background-color:var(--color-global-background);border:1px solid var(--page-container-accent-color);border-radius:var(--page-container-radius);box-shadow:var(--shadow-heavy);padding:var(--page-container-pad-y) var(--page-container-pad-x);transition:border-color;transition-duration:var(--default-transition-duration)}@variant sm{.page-container.glass-effect{backdrop-filter:blur(var(--blur-sm));background-color:color-mix(in srgb-linear,transparent 40%,var(--color-global-background))}}@variant max-sm{.page-container:where(.page-column>.page-container){border-bottom:none;border-left:none;border-radius:0;border-right:none;box-shadow:none;margin-left:calc(var(--page-column-gutter)*-1);margin-right:calc(var(--page-column-gutter)*-1);padding-left:var(--page-column-gutter);padding-right:var(--page-column-gutter)}}
24
+ </style>