rimelight-components 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -0
- package/dist/module.d.mts +8 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +39 -0
- package/dist/runtime/components/app/ConstructionBanner.d.vue.ts +6 -0
- package/dist/runtime/components/app/ConstructionBanner.vue +23 -0
- package/dist/runtime/components/app/ConstructionBanner.vue.d.ts +6 -0
- package/dist/runtime/components/app/Footer.d.vue.ts +17 -0
- package/dist/runtime/components/app/Footer.vue +23 -0
- package/dist/runtime/components/app/Footer.vue.d.ts +17 -0
- package/dist/runtime/components/app/Header.d.vue.ts +23 -0
- package/dist/runtime/components/app/Header.vue +34 -0
- package/dist/runtime/components/app/Header.vue.d.ts +23 -0
- package/dist/runtime/components/app/Logo.d.vue.ts +6 -0
- package/dist/runtime/components/app/Logo.vue +23 -0
- package/dist/runtime/components/app/Logo.vue.d.ts +6 -0
- package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +9 -0
- package/dist/runtime/components/app/NewsletterSignup.vue +29 -0
- package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +9 -0
- package/dist/runtime/components/cards/TeamCard.d.vue.ts +20 -0
- package/dist/runtime/components/cards/TeamCard.vue +29 -0
- package/dist/runtime/components/cards/TeamCard.vue.d.ts +20 -0
- package/dist/runtime/components/utilities/Placeholder.d.vue.ts +13 -0
- package/dist/runtime/components/utilities/Placeholder.vue +30 -0
- package/dist/runtime/components/utilities/Placeholder.vue.d.ts +13 -0
- package/dist/runtime/composables/useDateRange.d.ts +19 -0
- package/dist/runtime/composables/useDateRange.js +55 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/types.d.mts +3 -0
- package/package.json +59 -0
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Get your module up and running quickly.
|
|
3
|
+
|
|
4
|
+
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
+
- Name: My Module
|
|
6
|
+
- Package name: my-module
|
|
7
|
+
- Description: My new Nuxt module
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# My Module
|
|
11
|
+
|
|
12
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
15
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
+
|
|
17
|
+
My new Nuxt module for doing amazing things.
|
|
18
|
+
|
|
19
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
+
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
|
|
21
|
+
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
<!-- Highlight some of the features your module provide here -->
|
|
26
|
+
- ⛰ Foo
|
|
27
|
+
- 🚠 Bar
|
|
28
|
+
- 🌲 Baz
|
|
29
|
+
|
|
30
|
+
## Quick Setup
|
|
31
|
+
|
|
32
|
+
Install the module to your Nuxt application with one command:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx nuxi module add my-module
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it! You can now use My Module in your Nuxt app ✨
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Contribution
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Local development</summary>
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Install dependencies
|
|
48
|
+
npm install
|
|
49
|
+
|
|
50
|
+
# Generate type stubs
|
|
51
|
+
npm run dev:prepare
|
|
52
|
+
|
|
53
|
+
# Develop with the playground
|
|
54
|
+
npm run dev
|
|
55
|
+
|
|
56
|
+
# Build the playground
|
|
57
|
+
npm run dev:build
|
|
58
|
+
|
|
59
|
+
# Run ESLint
|
|
60
|
+
npm run lint
|
|
61
|
+
|
|
62
|
+
# Run Vitest
|
|
63
|
+
npm run test
|
|
64
|
+
npm run test:watch
|
|
65
|
+
|
|
66
|
+
# Release new version
|
|
67
|
+
npm run release
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
</details>
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
<!-- Badges -->
|
|
74
|
+
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
75
|
+
[npm-version-href]: https://npmjs.com/package/my-module
|
|
76
|
+
|
|
77
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
+
[npm-downloads-href]: https://npm.chart.dev/my-module
|
|
79
|
+
|
|
80
|
+
[license-src]: https://img.shields.io/npm/l/my-module.svg?style=flat&colorA=020420&colorB=00DC82
|
|
81
|
+
[license-href]: https://npmjs.com/package/my-module
|
|
82
|
+
|
|
83
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
84
|
+
[nuxt-href]: https://nuxt.com
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineNuxtModule, createResolver, addComponentsDir } from '@nuxt/kit';
|
|
2
|
+
|
|
3
|
+
const module = defineNuxtModule({
|
|
4
|
+
meta: {
|
|
5
|
+
name: "rimelight-components",
|
|
6
|
+
version: "0.0.1",
|
|
7
|
+
configKey: "rimelightComponents",
|
|
8
|
+
compatibility: {
|
|
9
|
+
nuxt: ">=4.0.0"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
defaults: {},
|
|
13
|
+
hooks: {},
|
|
14
|
+
moduleDependencies: {
|
|
15
|
+
"@nuxt/ui": {
|
|
16
|
+
version: ">=4.0.0",
|
|
17
|
+
optional: false,
|
|
18
|
+
overrides: {},
|
|
19
|
+
defaults: {}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
async setup() {
|
|
23
|
+
const resolver = createResolver(import.meta.url);
|
|
24
|
+
addComponentsDir({
|
|
25
|
+
path: resolver.resolve("./runtime/components/"),
|
|
26
|
+
pathPrefix: false,
|
|
27
|
+
prefix: "RC",
|
|
28
|
+
global: true
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
onInstall(nuxt) {
|
|
32
|
+
console.log("Setting up rimelight-components for the first time!");
|
|
33
|
+
},
|
|
34
|
+
onUpgrade() {
|
|
35
|
+
console.log("Upgrading rimelight-components.");
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { module as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
to: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
const { to } = defineProps({
|
|
4
|
+
to: { type: String, required: true }
|
|
5
|
+
});
|
|
6
|
+
const actions = ref([
|
|
7
|
+
{
|
|
8
|
+
label: "View on GitHub",
|
|
9
|
+
trailingIcon: "mdi:github",
|
|
10
|
+
to
|
|
11
|
+
}
|
|
12
|
+
]);
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<UBanner
|
|
17
|
+
color="primary"
|
|
18
|
+
icon="lucide:construction"
|
|
19
|
+
title="This website is currently under construction. Feel free to report any issues!"
|
|
20
|
+
:actions="actions"
|
|
21
|
+
close
|
|
22
|
+
/>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
to: string;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
left?: (props: typeof __VLS_6) => any;
|
|
4
|
+
} & {
|
|
5
|
+
center?: (props: typeof __VLS_8) => any;
|
|
6
|
+
} & {
|
|
7
|
+
right?: (props: typeof __VLS_10) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
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,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<footer class="py-12">
|
|
7
|
+
<UContainer class="flex flex-col justify-between gap-xl lg:flex-row">
|
|
8
|
+
<div class="sm:order-3 flex flex-col items-center justify-between gap-xl lg:order-1 lg:flex-1 lg:items-start">
|
|
9
|
+
<slot name="left"/>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="flex flex-col items-start order-2 lg:order-2">
|
|
12
|
+
<slot name="center"/>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="sm:order-1 flex flex-col items-center justify-between gap-xl lg:order-3 lg:flex-1 lg:items-end">
|
|
15
|
+
<slot name="right"/>
|
|
16
|
+
</div>
|
|
17
|
+
</UContainer>
|
|
18
|
+
</footer>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<style scoped>
|
|
22
|
+
|
|
23
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
left?: (props: typeof __VLS_6) => any;
|
|
4
|
+
} & {
|
|
5
|
+
center?: (props: typeof __VLS_8) => any;
|
|
6
|
+
} & {
|
|
7
|
+
right?: (props: typeof __VLS_10) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
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,23 @@
|
|
|
1
|
+
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
'collapsed-left'?: (props: typeof __VLS_6) => any;
|
|
4
|
+
} & {
|
|
5
|
+
'collapsed-center'?: (props: typeof __VLS_8) => any;
|
|
6
|
+
} & {
|
|
7
|
+
'collapsed-right'?: (props: typeof __VLS_10) => any;
|
|
8
|
+
} & {
|
|
9
|
+
left?: (props: typeof __VLS_12) => any;
|
|
10
|
+
} & {
|
|
11
|
+
center?: (props: typeof __VLS_14) => any;
|
|
12
|
+
} & {
|
|
13
|
+
right?: (props: typeof __VLS_16) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
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,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<header>
|
|
7
|
+
<UContainer>
|
|
8
|
+
<div class="flex flex-row items-center justify-between p-sm">
|
|
9
|
+
<div class="hidden sm:block">
|
|
10
|
+
<slot name="collapsed-left" />
|
|
11
|
+
</div>
|
|
12
|
+
<div class="hidden sm:block">
|
|
13
|
+
<slot name="collapsed-center" />
|
|
14
|
+
</div>
|
|
15
|
+
<div class="hidden sm:block">
|
|
16
|
+
<slot name="collapsed-right" />
|
|
17
|
+
</div>
|
|
18
|
+
<div class="sm:hidden">
|
|
19
|
+
<slot name="left" />
|
|
20
|
+
</div>
|
|
21
|
+
<div class="sm:hidden">
|
|
22
|
+
<slot name="center" />
|
|
23
|
+
</div>
|
|
24
|
+
<div class="sm:hidden">
|
|
25
|
+
<slot name="right" />
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</UContainer>
|
|
29
|
+
</header>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<style scoped>
|
|
33
|
+
|
|
34
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
'collapsed-left'?: (props: typeof __VLS_6) => any;
|
|
4
|
+
} & {
|
|
5
|
+
'collapsed-center'?: (props: typeof __VLS_8) => any;
|
|
6
|
+
} & {
|
|
7
|
+
'collapsed-right'?: (props: typeof __VLS_10) => any;
|
|
8
|
+
} & {
|
|
9
|
+
left?: (props: typeof __VLS_12) => any;
|
|
10
|
+
} & {
|
|
11
|
+
center?: (props: typeof __VLS_14) => any;
|
|
12
|
+
} & {
|
|
13
|
+
right?: (props: typeof __VLS_16) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
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,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
variant?: "mark" | "type";
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useAppConfig } from "nuxt/app";
|
|
3
|
+
import { computed } from "#imports";
|
|
4
|
+
const appConfig = useAppConfig();
|
|
5
|
+
const { variant = "mark" } = defineProps({
|
|
6
|
+
variant: { type: String, required: false }
|
|
7
|
+
});
|
|
8
|
+
const logoSrc = computed(() => {
|
|
9
|
+
switch (variant) {
|
|
10
|
+
case "type":
|
|
11
|
+
return appConfig.logotype || "";
|
|
12
|
+
case "mark":
|
|
13
|
+
default:
|
|
14
|
+
return appConfig.logomark || "";
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<NuxtLink to="/">
|
|
21
|
+
<UIcon :name="logoSrc" v-bind="$attrs" />
|
|
22
|
+
</NuxtLink>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
variant?: "mark" | "type";
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
declare const _default: typeof __VLS_export;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
fieldLabel?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
buttonLabel?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const {
|
|
3
|
+
fieldLabel = "Subscribe to our Newsletter",
|
|
4
|
+
description = "Stay updated on new posts and updates. Unsubscribe at any time.",
|
|
5
|
+
placeholder = "email@domain.com",
|
|
6
|
+
buttonLabel = "Subscribe"
|
|
7
|
+
} = defineProps({
|
|
8
|
+
fieldLabel: { type: String, required: false },
|
|
9
|
+
description: { type: String, required: false },
|
|
10
|
+
placeholder: { type: String, required: false },
|
|
11
|
+
buttonLabel: { type: String, required: false }
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<UForm>
|
|
17
|
+
<UFormField
|
|
18
|
+
name="email"
|
|
19
|
+
:label="fieldLabel"
|
|
20
|
+
:description="description"
|
|
21
|
+
class="max-w-96"
|
|
22
|
+
>
|
|
23
|
+
<UFieldGroup class="pt-2">
|
|
24
|
+
<UInput type="email" :placeholder="placeholder" />
|
|
25
|
+
<UButton type="submit" :label="buttonLabel" />
|
|
26
|
+
</UFieldGroup>
|
|
27
|
+
</UFormField>
|
|
28
|
+
</UForm>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
fieldLabel?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
buttonLabel?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
declare const _default: typeof __VLS_export;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
name: string;
|
|
5
|
+
role: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_13: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
links?: (props: typeof __VLS_13) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, 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,29 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const {} = defineProps({
|
|
3
|
+
src: { type: String, required: true },
|
|
4
|
+
alt: { type: String, required: true },
|
|
5
|
+
name: { type: String, required: true },
|
|
6
|
+
role: { type: String, required: true },
|
|
7
|
+
description: { type: String, required: true }
|
|
8
|
+
});
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<UCard>
|
|
13
|
+
<NuxtImg :src="src" :alt="alt" />
|
|
14
|
+
<div class="flex flex-col gap-xs">
|
|
15
|
+
<h3 class="text-xl font-bold">
|
|
16
|
+
{{ name }}
|
|
17
|
+
</h3>
|
|
18
|
+
<span class="text-sm">{{ role }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<p class="text-md">
|
|
21
|
+
{{ description }}
|
|
22
|
+
</p>
|
|
23
|
+
<template #footer>
|
|
24
|
+
<div class="flex flex-row gap-md">
|
|
25
|
+
<slot name="links" />
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
</UCard>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
src: string;
|
|
3
|
+
alt: string;
|
|
4
|
+
name: string;
|
|
5
|
+
role: string;
|
|
6
|
+
description: string;
|
|
7
|
+
};
|
|
8
|
+
declare var __VLS_13: {};
|
|
9
|
+
type __VLS_Slots = {} & {
|
|
10
|
+
links?: (props: typeof __VLS_13) => any;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, 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,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts"></script>
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<div
|
|
5
|
+
class="relative flex items-center justify-center overflow-hidden rounded-sm border border-dashed border-accented px-4 opacity-75"
|
|
6
|
+
>
|
|
7
|
+
<svg class="absolute inset-0 h-full w-full stroke-inverted/10">
|
|
8
|
+
<defs>
|
|
9
|
+
<pattern
|
|
10
|
+
id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"
|
|
11
|
+
x="0"
|
|
12
|
+
y="0"
|
|
13
|
+
width="10"
|
|
14
|
+
height="10"
|
|
15
|
+
patternUnits="userSpaceOnUse"
|
|
16
|
+
>
|
|
17
|
+
<path d="M-3 13 15-5M-5 5l18-18M-1 21 17 3" />
|
|
18
|
+
</pattern>
|
|
19
|
+
</defs>
|
|
20
|
+
<rect
|
|
21
|
+
stroke="none"
|
|
22
|
+
fill="url(#pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e)"
|
|
23
|
+
width="100%"
|
|
24
|
+
height="100%"
|
|
25
|
+
/>
|
|
26
|
+
</svg>
|
|
27
|
+
|
|
28
|
+
<slot />
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface DateRange {
|
|
2
|
+
start: Date;
|
|
3
|
+
end: Date;
|
|
4
|
+
}
|
|
5
|
+
export declare function useDateRange(): {
|
|
6
|
+
dateRange: Readonly<import("vue").Ref<{
|
|
7
|
+
readonly start: Date;
|
|
8
|
+
readonly end: Date;
|
|
9
|
+
}, {
|
|
10
|
+
readonly start: Date;
|
|
11
|
+
readonly end: Date;
|
|
12
|
+
}>>;
|
|
13
|
+
setDateRange: (range: DateRange) => void;
|
|
14
|
+
setPresetRange: (preset: `week` | `month` | `3months` | `6months` | `year`) => void;
|
|
15
|
+
isDateInRange: (date: Date | string) => boolean;
|
|
16
|
+
filterFeedbackByDateRange: <T extends {
|
|
17
|
+
createdAt: Date | string;
|
|
18
|
+
}>(feedback: T[]) => T[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { useState, readonly } from "#imports";
|
|
2
|
+
import { subDays, subMonths, subYears, startOfDay, endOfDay } from "date-fns";
|
|
3
|
+
export function useDateRange() {
|
|
4
|
+
const dateRange = useState(`feedback-date-range`, () => ({
|
|
5
|
+
start: subDays(/* @__PURE__ */ new Date(), 30),
|
|
6
|
+
end: /* @__PURE__ */ new Date()
|
|
7
|
+
}));
|
|
8
|
+
const setDateRange = (range) => {
|
|
9
|
+
dateRange.value = {
|
|
10
|
+
start: startOfDay(range.start),
|
|
11
|
+
end: endOfDay(range.end)
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
const setPresetRange = (preset) => {
|
|
15
|
+
const end = /* @__PURE__ */ new Date();
|
|
16
|
+
let start;
|
|
17
|
+
switch (preset) {
|
|
18
|
+
case `week`:
|
|
19
|
+
start = subDays(end, 7);
|
|
20
|
+
break;
|
|
21
|
+
case `month`:
|
|
22
|
+
start = subDays(end, 30);
|
|
23
|
+
break;
|
|
24
|
+
case `3months`:
|
|
25
|
+
start = subMonths(end, 3);
|
|
26
|
+
break;
|
|
27
|
+
case `6months`:
|
|
28
|
+
start = subMonths(end, 6);
|
|
29
|
+
break;
|
|
30
|
+
case `year`:
|
|
31
|
+
start = subYears(end, 1);
|
|
32
|
+
break;
|
|
33
|
+
default:
|
|
34
|
+
start = subDays(end, 30);
|
|
35
|
+
}
|
|
36
|
+
setDateRange({
|
|
37
|
+
start,
|
|
38
|
+
end
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const isDateInRange = (date) => {
|
|
42
|
+
const checkDate = typeof date === `string` ? new Date(date) : date;
|
|
43
|
+
return checkDate >= dateRange.value.start && checkDate <= dateRange.value.end;
|
|
44
|
+
};
|
|
45
|
+
const filterFeedbackByDateRange = (feedback) => {
|
|
46
|
+
return feedback.filter((item) => isDateInRange(item.createdAt));
|
|
47
|
+
};
|
|
48
|
+
return {
|
|
49
|
+
dateRange: readonly(dateRange),
|
|
50
|
+
setDateRange,
|
|
51
|
+
setPresetRange,
|
|
52
|
+
isDateInRange,
|
|
53
|
+
filterFeedbackByDateRange
|
|
54
|
+
};
|
|
55
|
+
}
|
package/dist/types.d.mts
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rimelight-components",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "My new Nuxt module",
|
|
5
|
+
"repository": "your-org/my-module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types.d.mts",
|
|
11
|
+
"import": "./dist/module.mjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"main": "./dist/module.mjs",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
"*": {
|
|
17
|
+
".": [
|
|
18
|
+
"./dist/types.d.mts"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"prepack": "nuxt-module-build build",
|
|
27
|
+
"dev": "bun run dev:prepare && nuxi dev playground",
|
|
28
|
+
"dev:build": "nuxi build playground",
|
|
29
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
30
|
+
"release": "bun run lint && bun run test && bun run prepack && changelogen --release && bun publish && git push --follow-tags",
|
|
31
|
+
"lint": "eslint .",
|
|
32
|
+
"test": "vitest run",
|
|
33
|
+
"test:watch": "vitest watch",
|
|
34
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@nuxt/kit": "^4.1.3",
|
|
38
|
+
"date-fns": "^4.1.0",
|
|
39
|
+
"vue": "^3.5.22"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@nuxt/devtools": "^2.6.5",
|
|
43
|
+
"@nuxt/image": "1.11.0",
|
|
44
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
45
|
+
"@nuxt/schema": "^4.1.3",
|
|
46
|
+
"@nuxt/test-utils": "^3.19.2",
|
|
47
|
+
"@nuxt/ui": "4.0.1",
|
|
48
|
+
"@types/node": "latest",
|
|
49
|
+
"changelogen": "^0.6.2",
|
|
50
|
+
"nuxt": "^4.1.3",
|
|
51
|
+
"typescript": "~5.9.3",
|
|
52
|
+
"vitest": "^3.2.4",
|
|
53
|
+
"vue-tsc": "^3.1.0",
|
|
54
|
+
"@prettier/plugin-oxc": "^0.0.4",
|
|
55
|
+
"oxlint": "^1.21.0",
|
|
56
|
+
"prettier": "^3.6.2",
|
|
57
|
+
"prettier-plugin-tailwindcss": "^0.6.14"
|
|
58
|
+
}
|
|
59
|
+
}
|