rimelight-components 1.1.2 → 1.1.4
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/dist/module.mjs +8 -1
- package/dist/runtime/components/app/Header.d.vue.ts +6 -6
- package/dist/runtime/components/app/Header.vue +44 -24
- package/dist/runtime/components/app/Header.vue.d.ts +6 -6
- package/dist/runtime/components/{app/ConstructionBanner.d.vue.ts → feedback/Feedback.d.vue.ts} +4 -1
- package/dist/runtime/components/feedback/Feedback.vue +207 -0
- package/dist/runtime/components/{app/ConstructionBanner.vue.d.ts → feedback/Feedback.vue.d.ts} +4 -1
- package/dist/runtime/components/feedback/FeedbackChart.d.vue.ts +18 -0
- package/dist/runtime/components/feedback/FeedbackChart.vue +604 -0
- package/dist/runtime/components/feedback/FeedbackChart.vue.d.ts +18 -0
- package/dist/runtime/components/feedback/FeedbackDatePicker.d.vue.ts +3 -0
- package/dist/runtime/components/feedback/FeedbackDatePicker.vue +149 -0
- package/dist/runtime/components/feedback/FeedbackDatePicker.vue.d.ts +3 -0
- package/dist/runtime/components/feedback/FeedbackItem.d.vue.ts +10 -0
- package/dist/runtime/components/feedback/FeedbackItem.vue +77 -0
- package/dist/runtime/components/feedback/FeedbackItem.vue.d.ts +10 -0
- package/dist/runtime/components/feedback/FeedbackStatCard.d.vue.ts +17 -0
- package/dist/runtime/components/feedback/FeedbackStatCard.vue +66 -0
- package/dist/runtime/components/feedback/FeedbackStatCard.vue.d.ts +17 -0
- package/package.json +21 -10
- package/dist/runtime/components/app/ConstructionBanner.vue +0 -23
package/dist/module.mjs
CHANGED
|
@@ -39,9 +39,15 @@ const module = defineNuxtModule({
|
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
},
|
|
43
|
+
"motion-v/nuxt": {
|
|
44
|
+
version: ">=1.7.2",
|
|
45
|
+
optional: false,
|
|
46
|
+
overrides: {},
|
|
47
|
+
defaults: {}
|
|
42
48
|
}
|
|
43
49
|
},
|
|
44
|
-
setup() {
|
|
50
|
+
setup(options, nuxt) {
|
|
45
51
|
const resolver = createResolver(import.meta.url);
|
|
46
52
|
addComponentsDir({
|
|
47
53
|
path: resolver.resolve("./runtime/components/"),
|
|
@@ -50,6 +56,7 @@ const module = defineNuxtModule({
|
|
|
50
56
|
global: true
|
|
51
57
|
});
|
|
52
58
|
addImportsDir(resolver.resolve("./runtime/composables"));
|
|
59
|
+
addImportsDir(resolver.resolve("./runtime/utils"));
|
|
53
60
|
},
|
|
54
61
|
onInstall() {
|
|
55
62
|
console.log("Setting up rimelight-components for the first time!");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
|
|
3
|
+
left?: (props: typeof __VLS_6) => any;
|
|
4
4
|
} & {
|
|
5
|
-
|
|
5
|
+
center?: (props: typeof __VLS_8) => any;
|
|
6
6
|
} & {
|
|
7
|
-
|
|
7
|
+
right?: (props: typeof __VLS_10) => any;
|
|
8
8
|
} & {
|
|
9
|
-
left?: (props: typeof __VLS_12) => any;
|
|
9
|
+
'collapsed-left'?: (props: typeof __VLS_12) => any;
|
|
10
10
|
} & {
|
|
11
|
-
center?: (props: typeof __VLS_14) => any;
|
|
11
|
+
'collapsed-center'?: (props: typeof __VLS_14) => any;
|
|
12
12
|
} & {
|
|
13
|
-
right?: (props: typeof __VLS_16) => any;
|
|
13
|
+
'collapsed-right'?: (props: typeof __VLS_16) => any;
|
|
14
14
|
};
|
|
15
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
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,30 +1,50 @@
|
|
|
1
|
-
<script setup
|
|
1
|
+
<script setup>
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
const header = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "sticky top-0 z-50 h-(--ui-header-height)",
|
|
6
|
+
container: "h-full flex flex-row items-center justify-between p-sm",
|
|
7
|
+
left: "hidden lg:flex",
|
|
8
|
+
center: "hidden lg:flex",
|
|
9
|
+
right: "hidden lg:flex",
|
|
10
|
+
collapsedLeft: "lg:hidden",
|
|
11
|
+
collapsedCenter: "lg:hidden",
|
|
12
|
+
collapsedRight: "lg:hidden"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
const {
|
|
16
|
+
root,
|
|
17
|
+
container,
|
|
18
|
+
left,
|
|
19
|
+
center,
|
|
20
|
+
right,
|
|
21
|
+
collapsedLeft,
|
|
22
|
+
collapsedCenter,
|
|
23
|
+
collapsedRight
|
|
24
|
+
} = header();
|
|
25
|
+
</script>
|
|
2
26
|
|
|
3
27
|
<template>
|
|
4
|
-
<header class="
|
|
5
|
-
<UContainer class="
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
<slot name="right" />
|
|
24
|
-
</div>
|
|
28
|
+
<header :class="root()">
|
|
29
|
+
<UContainer :class="container()">
|
|
30
|
+
<div :class="left()">
|
|
31
|
+
<slot name="left" />
|
|
32
|
+
</div>
|
|
33
|
+
<div :class="center()">
|
|
34
|
+
<slot name="center" />
|
|
35
|
+
</div>
|
|
36
|
+
<div :class="right()">
|
|
37
|
+
<slot name="right" />
|
|
38
|
+
</div>
|
|
39
|
+
<div :class="collapsedLeft()">
|
|
40
|
+
<slot name="collapsed-left" />
|
|
41
|
+
</div>
|
|
42
|
+
<div :class="collapsedCenter()">
|
|
43
|
+
<slot name="collapsed-center" />
|
|
44
|
+
</div>
|
|
45
|
+
<div :class="collapsedRight()">
|
|
46
|
+
<slot name="collapsed-right" />
|
|
25
47
|
</div>
|
|
26
48
|
</UContainer>
|
|
27
49
|
</header>
|
|
28
50
|
</template>
|
|
29
|
-
|
|
30
|
-
<style scoped></style>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {}, __VLS_16: {};
|
|
2
2
|
type __VLS_Slots = {} & {
|
|
3
|
-
|
|
3
|
+
left?: (props: typeof __VLS_6) => any;
|
|
4
4
|
} & {
|
|
5
|
-
|
|
5
|
+
center?: (props: typeof __VLS_8) => any;
|
|
6
6
|
} & {
|
|
7
|
-
|
|
7
|
+
right?: (props: typeof __VLS_10) => any;
|
|
8
8
|
} & {
|
|
9
|
-
left?: (props: typeof __VLS_12) => any;
|
|
9
|
+
'collapsed-left'?: (props: typeof __VLS_12) => any;
|
|
10
10
|
} & {
|
|
11
|
-
center?: (props: typeof __VLS_14) => any;
|
|
11
|
+
'collapsed-center'?: (props: typeof __VLS_14) => any;
|
|
12
12
|
} & {
|
|
13
|
-
right?: (props: typeof __VLS_16) => any;
|
|
13
|
+
'collapsed-right'?: (props: typeof __VLS_16) => any;
|
|
14
14
|
};
|
|
15
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
16
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
package/dist/runtime/components/{app/ConstructionBanner.d.vue.ts → feedback/Feedback.d.vue.ts}
RENAMED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
2
|
+
page: {
|
|
3
|
+
title: string;
|
|
4
|
+
stem: string;
|
|
5
|
+
};
|
|
3
6
|
};
|
|
4
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>;
|
|
5
8
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { AnimatePresence, MotionConfig, motion } from "motion-v";
|
|
3
|
+
const {} = defineProps({
|
|
4
|
+
page: { type: Object, required: true }
|
|
5
|
+
});
|
|
6
|
+
const {
|
|
7
|
+
formState,
|
|
8
|
+
isExpanded,
|
|
9
|
+
isSubmitted,
|
|
10
|
+
isSubmitting,
|
|
11
|
+
handleRatingSelect,
|
|
12
|
+
submitFeedback
|
|
13
|
+
} = useFeedbackForm(props);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<MotionConfig
|
|
18
|
+
:transition="{ type: 'spring', visualDuration: 0.25, bounce: 0 }"
|
|
19
|
+
>
|
|
20
|
+
<motion.div layout class="max-w-md rounded-lg">
|
|
21
|
+
<AnimatePresence mode="wait">
|
|
22
|
+
<!-- Success State -->
|
|
23
|
+
<motion.div
|
|
24
|
+
v-if="isSubmitted"
|
|
25
|
+
key="success"
|
|
26
|
+
:initial="{ opacity: 0, scale: 0.95 }"
|
|
27
|
+
:animate="{ opacity: 1, scale: 1 }"
|
|
28
|
+
:transition="{ duration: 0.3 }"
|
|
29
|
+
class="flex items-center gap-3 py-2"
|
|
30
|
+
role="status"
|
|
31
|
+
aria-live="polite"
|
|
32
|
+
aria-label="Feedback submitted successfully"
|
|
33
|
+
>
|
|
34
|
+
<motion.div
|
|
35
|
+
:initial="{ scale: 0 }"
|
|
36
|
+
:animate="{ scale: 1 }"
|
|
37
|
+
:transition="{ delay: 0.1, type: 'spring', visualDuration: 0.4 }"
|
|
38
|
+
class="text-xl"
|
|
39
|
+
aria-hidden="true"
|
|
40
|
+
>
|
|
41
|
+
✨
|
|
42
|
+
</motion.div>
|
|
43
|
+
<motion.div
|
|
44
|
+
:initial="{ opacity: 0, x: 10 }"
|
|
45
|
+
:animate="{ opacity: 1, x: 0 }"
|
|
46
|
+
:transition="{ delay: 0.2, duration: 0.3 }"
|
|
47
|
+
>
|
|
48
|
+
<div class="text-sm font-medium text-highlighted">
|
|
49
|
+
Thank you for your feedback!
|
|
50
|
+
</div>
|
|
51
|
+
<div class="mt-1 text-xs text-muted">
|
|
52
|
+
Your input helps us improve the documentation.
|
|
53
|
+
</div>
|
|
54
|
+
</motion.div>
|
|
55
|
+
</motion.div>
|
|
56
|
+
|
|
57
|
+
<motion.div v-else key="feedback">
|
|
58
|
+
<fieldset>
|
|
59
|
+
<motion.div layout class="flex items-center gap-3">
|
|
60
|
+
<motion.legend
|
|
61
|
+
id="feedback-legend"
|
|
62
|
+
layout
|
|
63
|
+
class="text-sm font-medium whitespace-nowrap text-highlighted"
|
|
64
|
+
>
|
|
65
|
+
Was this helpful?
|
|
66
|
+
</motion.legend>
|
|
67
|
+
|
|
68
|
+
<motion.div
|
|
69
|
+
layout
|
|
70
|
+
class="flex gap-2"
|
|
71
|
+
role="radiogroup"
|
|
72
|
+
aria-labelledby="feedback-legend"
|
|
73
|
+
>
|
|
74
|
+
<UButton
|
|
75
|
+
v-for="option in FEEDBACK_OPTIONS"
|
|
76
|
+
:key="option.value"
|
|
77
|
+
class="flex size-8 items-center justify-center rounded-lg border grayscale-80 transition-all duration-150 hover:grayscale-0 focus:outline-2 focus:outline-offset-2 focus:outline-primary"
|
|
78
|
+
:class="[
|
|
79
|
+
formState.rating === option.value ? 'border-primary bg-primary/20 grayscale-0 hover:bg-primary/30' : 'border-default bg-accented/20 hover:border-accented/70 hover:bg-accented/80'
|
|
80
|
+
]"
|
|
81
|
+
:aria-label="`Rate as ${option.label}`"
|
|
82
|
+
:aria-pressed="formState.rating === option.value"
|
|
83
|
+
role="radio"
|
|
84
|
+
:aria-checked="formState.rating === option.value"
|
|
85
|
+
@click="handleRatingSelect(option.value)"
|
|
86
|
+
>
|
|
87
|
+
<span class="text-lg">{{ option.emoji }}</span>
|
|
88
|
+
</UButton>
|
|
89
|
+
</motion.div>
|
|
90
|
+
</motion.div>
|
|
91
|
+
</fieldset>
|
|
92
|
+
|
|
93
|
+
<AnimatePresence>
|
|
94
|
+
<motion.div
|
|
95
|
+
v-if="isExpanded"
|
|
96
|
+
key="expanded-form"
|
|
97
|
+
:initial="{ opacity: 0, height: 0, marginTop: 0 }"
|
|
98
|
+
:animate="{ opacity: 1, height: 'auto', marginTop: 8 }"
|
|
99
|
+
:exit="{ opacity: 0, height: 0, marginTop: 0 }"
|
|
100
|
+
:transition="{ duration: 0.3, ease: 'easeInOut' }"
|
|
101
|
+
class="overflow-hidden"
|
|
102
|
+
role="region"
|
|
103
|
+
aria-label="Additional feedback form"
|
|
104
|
+
>
|
|
105
|
+
<motion.div
|
|
106
|
+
:initial="{ opacity: 0 }"
|
|
107
|
+
:animate="{ opacity: 1 }"
|
|
108
|
+
:transition="{ delay: 0.15, duration: 0.2 }"
|
|
109
|
+
class="space-y-1"
|
|
110
|
+
>
|
|
111
|
+
<UForm
|
|
112
|
+
:state="formState"
|
|
113
|
+
:schema="feedbackFormSchema"
|
|
114
|
+
@submit="submitFeedback"
|
|
115
|
+
>
|
|
116
|
+
<UFormField name="feedback">
|
|
117
|
+
<label for="feedback-textarea" class="sr-only">
|
|
118
|
+
Additional feedback (optional)
|
|
119
|
+
</label>
|
|
120
|
+
<UTextarea
|
|
121
|
+
id="feedback-textarea"
|
|
122
|
+
ref="textareaRef"
|
|
123
|
+
v-model="formState.feedback"
|
|
124
|
+
class="resize-vertical w-full rounded-xl text-sm leading-relaxed"
|
|
125
|
+
placeholder="Share your thoughts... (optional)"
|
|
126
|
+
:rows="4"
|
|
127
|
+
autoresize
|
|
128
|
+
aria-describedby="feedback-help"
|
|
129
|
+
/>
|
|
130
|
+
<div id="feedback-help" class="sr-only">
|
|
131
|
+
Provide additional details about your experience with this
|
|
132
|
+
page
|
|
133
|
+
</div>
|
|
134
|
+
</UFormField>
|
|
135
|
+
<div class="mt-2 flex items-center">
|
|
136
|
+
<div class="flex gap-2">
|
|
137
|
+
<UButton
|
|
138
|
+
size="sm"
|
|
139
|
+
:disabled="isSubmitting"
|
|
140
|
+
type="submit"
|
|
141
|
+
class="focus:outline-0"
|
|
142
|
+
:aria-label="
|
|
143
|
+
isSubmitting ? 'Sending feedback...' : 'Send feedback'
|
|
144
|
+
"
|
|
145
|
+
>
|
|
146
|
+
<motion.span
|
|
147
|
+
class="flex items-center"
|
|
148
|
+
:transition="{ duration: 0.2, ease: 'easeInOut' }"
|
|
149
|
+
>
|
|
150
|
+
<motion.div
|
|
151
|
+
:animate="{
|
|
152
|
+
width: isSubmitting ? '14px' : '0px',
|
|
153
|
+
marginRight: isSubmitting ? '6px' : '0px',
|
|
154
|
+
opacity: isSubmitting ? 1 : 0,
|
|
155
|
+
scale: isSubmitting ? 1 : 0,
|
|
156
|
+
rotate: isSubmitting ? 360 : 0
|
|
157
|
+
}"
|
|
158
|
+
:transition="{
|
|
159
|
+
width: { duration: 0.2, ease: 'easeInOut' },
|
|
160
|
+
marginRight: { duration: 0.2, ease: 'easeInOut' },
|
|
161
|
+
opacity: { duration: 0.2 },
|
|
162
|
+
scale: {
|
|
163
|
+
duration: 0.2,
|
|
164
|
+
type: 'spring',
|
|
165
|
+
bounce: 0.3
|
|
166
|
+
},
|
|
167
|
+
rotate: {
|
|
168
|
+
duration: 1,
|
|
169
|
+
ease: 'linear',
|
|
170
|
+
repeat: Infinity
|
|
171
|
+
}
|
|
172
|
+
}"
|
|
173
|
+
class="flex items-center justify-center overflow-hidden"
|
|
174
|
+
>
|
|
175
|
+
<Icon
|
|
176
|
+
name="mdi:loading"
|
|
177
|
+
class="size-3.5 shrink-0"
|
|
178
|
+
/>
|
|
179
|
+
</motion.div>
|
|
180
|
+
<motion.span
|
|
181
|
+
:animate="{
|
|
182
|
+
opacity: 1
|
|
183
|
+
}"
|
|
184
|
+
:transition="{ duration: 0.2, ease: 'easeInOut' }"
|
|
185
|
+
>
|
|
186
|
+
{{ isSubmitting ? "Sending..." : "Send" }}
|
|
187
|
+
</motion.span>
|
|
188
|
+
</motion.span>
|
|
189
|
+
</UButton>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</UForm>
|
|
193
|
+
</motion.div>
|
|
194
|
+
</motion.div>
|
|
195
|
+
</AnimatePresence>
|
|
196
|
+
</motion.div>
|
|
197
|
+
</AnimatePresence>
|
|
198
|
+
|
|
199
|
+
<div aria-live="polite" class="sr-only">
|
|
200
|
+
<span v-if="isSubmitting">Sending your feedback...</span>
|
|
201
|
+
<span v-else-if="isExpanded && formState.rating">
|
|
202
|
+
Feedback form expanded. You can now add additional comments.
|
|
203
|
+
</span>
|
|
204
|
+
</div>
|
|
205
|
+
</motion.div>
|
|
206
|
+
</MotionConfig>
|
|
207
|
+
</template>
|
package/dist/runtime/components/{app/ConstructionBanner.vue.d.ts → feedback/Feedback.vue.d.ts}
RENAMED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
|
|
2
|
+
page: {
|
|
3
|
+
title: string;
|
|
4
|
+
stem: string;
|
|
5
|
+
};
|
|
3
6
|
};
|
|
4
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>;
|
|
5
8
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type PageAnalytic = {
|
|
2
|
+
path: string;
|
|
3
|
+
total: number;
|
|
4
|
+
positive: number;
|
|
5
|
+
negative: number;
|
|
6
|
+
averageScore: number;
|
|
7
|
+
positivePercentage: number;
|
|
8
|
+
feedback: any[];
|
|
9
|
+
lastFeedback: any;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_Props = {
|
|
14
|
+
pageAnalytics: PageAnalytic[];
|
|
15
|
+
};
|
|
16
|
+
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>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|