rimelight-components 1.1.3 → 1.2.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/dist/module.mjs +7 -1
- package/dist/runtime/components/app/ScrollToTop.d.vue.ts +10 -0
- package/dist/runtime/components/app/ScrollToTop.vue +97 -0
- package/dist/runtime/components/app/ScrollToTop.vue.d.ts +10 -0
- package/dist/runtime/components/backgrounds/AnimateGrid.d.vue.ts +23 -0
- package/dist/runtime/components/backgrounds/AnimateGrid.vue +84 -0
- package/dist/runtime/components/backgrounds/AnimateGrid.vue.d.ts +23 -0
- package/dist/runtime/components/backgrounds/FlickeringGrid.d.vue.ts +19 -0
- package/dist/runtime/components/backgrounds/FlickeringGrid.vue +130 -0
- package/dist/runtime/components/backgrounds/FlickeringGrid.vue.d.ts +19 -0
- package/dist/runtime/components/backgrounds/InteractiveGrid.d.vue.ts +15 -0
- package/dist/runtime/components/backgrounds/InteractiveGrid.vue +58 -0
- package/dist/runtime/components/backgrounds/InteractiveGrid.vue.d.ts +15 -0
- 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/dist/runtime/composables/useFeedback.d.ts +50 -0
- package/dist/runtime/composables/useFeedback.js +237 -0
- package/dist/runtime/composables/useFeedbackExports.d.ts +4 -0
- package/dist/runtime/composables/useFeedbackExports.js +150 -0
- package/dist/runtime/types/index.d.ts +14 -0
- package/dist/runtime/utils/index.d.ts +3 -0
- package/dist/runtime/utils/index.js +5 -0
- package/package.json +28 -8
- package/dist/runtime/components/app/ConstructionBanner.vue +0 -23
|
@@ -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;
|