@raclettejs/workbench 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 (89) hide show
  1. package/README.md +1 -0
  2. package/config/compositions.js +282 -0
  3. package/config/interactionLinks.js +164 -0
  4. package/i18n/de-DE.json +245 -0
  5. package/i18n/en-EU.json +245 -0
  6. package/i18n/sk-SK.json +245 -0
  7. package/package.json +63 -0
  8. package/packages.json +33 -0
  9. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionConfiguration.vue +140 -0
  10. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionIntegration.vue +3 -0
  11. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionWidgetsLayout.vue +129 -0
  12. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetContextMenu.vue +53 -0
  13. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetIcon.vue +99 -0
  14. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetList.vue +122 -0
  15. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetRenderer.vue +65 -0
  16. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetSettings.vue +96 -0
  17. package/plugins/pacifico__compositions/frontend/widgets/CompositionCreateWidget.vue +51 -0
  18. package/plugins/pacifico__compositions/frontend/widgets/CompositionEditWidget.vue +66 -0
  19. package/plugins/pacifico__compositions/frontend/widgets/CompositionListWidget.vue +132 -0
  20. package/plugins/pacifico__compositions/raclette.plugin.ts +8 -0
  21. package/plugins/pacifico__core/backend/index.ts +25 -0
  22. package/plugins/pacifico__core/backend/routes.ts +220 -0
  23. package/plugins/pacifico__core/raclette.plugin.ts +9 -0
  24. package/plugins/pacifico__interactionLinks/frontend/components/InteractionLinkConfiguration.vue +145 -0
  25. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkCreateWidget.vue +48 -0
  26. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkEditWidget.vue +66 -0
  27. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkListWidget.vue +126 -0
  28. package/plugins/pacifico__interactionLinks/raclette.plugin.ts +8 -0
  29. package/plugins/pacifico__plugins/frontend/index.ts +42 -0
  30. package/plugins/pacifico__plugins/frontend/widgets/PluginDetailWidget.vue +26 -0
  31. package/plugins/pacifico__plugins/frontend/widgets/PluginListWidget.vue +59 -0
  32. package/plugins/pacifico__plugins/raclette.plugin.ts +8 -0
  33. package/plugins/pacifico__tags/frontend/components/TagConfiguration.vue +99 -0
  34. package/plugins/pacifico__tags/frontend/widgets/TagCreateWidget.vue +43 -0
  35. package/plugins/pacifico__tags/frontend/widgets/TagEditWidget.vue +64 -0
  36. package/plugins/pacifico__tags/frontend/widgets/TagListWidget.vue +71 -0
  37. package/plugins/pacifico__tags/raclette.plugin.ts +8 -0
  38. package/plugins/pacifico__users/frontend/components/UserConfiguration.vue +110 -0
  39. package/plugins/pacifico__users/frontend/widgets/UserCreateWidget.vue +48 -0
  40. package/plugins/pacifico__users/frontend/widgets/UserEditWidget.vue +64 -0
  41. package/plugins/pacifico__users/frontend/widgets/UserListWidget.vue +86 -0
  42. package/plugins/pacifico__users/raclette.plugin.ts +8 -0
  43. package/raclette.config.js +150 -0
  44. package/services/frontend/.DS_Store +0 -0
  45. package/services/frontend/public/favicon.png +0 -0
  46. package/services/frontend/public/home-icon.png +0 -0
  47. package/services/frontend/public/logo.png +0 -0
  48. package/services/frontend/src/app/.DS_Store +0 -0
  49. package/services/frontend/src/app/components/BaseDataTable.vue +284 -0
  50. package/services/frontend/src/app/components/dynamicForm/DynamicForm.vue +207 -0
  51. package/services/frontend/src/app/components/dynamicForm/DynamicFormTypes.ts +63 -0
  52. package/services/frontend/src/app/components/dynamicForm/DynamicInput.vue +344 -0
  53. package/services/frontend/src/app/components/dynamicForm/TextDivider.vue +13 -0
  54. package/services/frontend/src/app/components/dynamicForm/testing/DynamicFormInputTesting.vue +477 -0
  55. package/services/frontend/src/app/components/dynamicForm/typedInputs/CheckboxInput.vue +16 -0
  56. package/services/frontend/src/app/components/dynamicForm/typedInputs/ColorInput.vue +52 -0
  57. package/services/frontend/src/app/components/dynamicForm/typedInputs/CompositionInput.vue +32 -0
  58. package/services/frontend/src/app/components/dynamicForm/typedInputs/IconInput.vue +40 -0
  59. package/services/frontend/src/app/components/dynamicForm/typedInputs/ListInput.vue +51 -0
  60. package/services/frontend/src/app/components/dynamicForm/typedInputs/LocalizedInput.vue +51 -0
  61. package/services/frontend/src/app/components/dynamicForm/typedInputs/PasswordInput.vue +23 -0
  62. package/services/frontend/src/app/components/dynamicForm/typedInputs/RecordInput.vue +91 -0
  63. package/services/frontend/src/app/components/dynamicForm/typedInputs/SwitchInput.vue +17 -0
  64. package/services/frontend/src/app/components/dynamicForm/typedInputs/TagsInput.vue +58 -0
  65. package/services/frontend/src/app/components/dynamicForm/typedInputs/TriggerInput.vue +159 -0
  66. package/services/frontend/src/app/components/dynamicForm/typedInputs/UserInput.vue +63 -0
  67. package/services/frontend/src/app/components/dynamicForm/typedInputs/mdi-icons.ts +7002 -0
  68. package/services/frontend/src/app/components/dynamicForm/validators.ts +19 -0
  69. package/services/frontend/src/app/components/stepNavigator/StepNavigator.vue +331 -0
  70. package/services/frontend/src/app/components/stepNavigator/StepNavigatorTypes.ts +12 -0
  71. package/services/frontend/src/app/composables/useUserHelper.ts +254 -0
  72. package/services/frontend/src/app/composables/useVantaFog.ts +37 -0
  73. package/services/frontend/src/app/composables/useWorkbenchPlugins.ts +44 -0
  74. package/services/frontend/src/orchestrator/.DS_Store +0 -0
  75. package/services/frontend/src/orchestrator/LoginApp.vue +62 -0
  76. package/services/frontend/src/orchestrator/WelcomeScreen.vue +39 -0
  77. package/services/frontend/src/orchestrator/assets/styles/themes/dark.ts +39 -0
  78. package/services/frontend/src/orchestrator/assets/styles/themes/highContrast.ts +39 -0
  79. package/services/frontend/src/orchestrator/assets/styles/themes/light.ts +39 -0
  80. package/services/frontend/src/orchestrator/components/InitProjectScreen.vue +298 -0
  81. package/services/frontend/src/orchestrator/components/LoginScreen.vue +73 -0
  82. package/services/frontend/src/orchestrator/components/RacletteAdCorner.vue +313 -0
  83. package/services/frontend/src/orchestrator/components/layout/AppButton.vue +109 -0
  84. package/services/frontend/src/orchestrator/components/layout/AppHeadline.vue +46 -0
  85. package/services/frontend/src/orchestrator/components/layout/AppLabelledInput.vue +94 -0
  86. package/services/frontend/src/orchestrator/components/layout/AppModal.vue +28 -0
  87. package/services/frontend/src/orchestrator/components/layout/SvgButtonArrow.vue +14 -0
  88. package/services/frontend/src/orchestrator/composables/useWelcomeScreen.ts +19 -0
  89. package/yarn.lock +3435 -0
@@ -0,0 +1,313 @@
1
+ <template>
2
+ <div class="raclette-ad-corner" @click="openRacletteWebsite">
3
+ <!-- Main folded corner container -->
4
+ <div class="corner-container">
5
+ <!-- The "page" that's peeled -->
6
+ <div class="page-peel">
7
+ <!-- Decorative fold strip -->
8
+ <div class="corner-fold"></div>
9
+
10
+ <!-- Content area revealed underneath -->
11
+ <div class="content-area">
12
+ <!-- SVG triangle hover area -->
13
+ <svg class="hover-triangle" viewBox="0 0 280 280">
14
+ <polygon
15
+ points="280,0 280,280 0,280"
16
+ fill="transparent"
17
+ class="triangle-hover-zone"
18
+ />
19
+ </svg>
20
+ <div class="container-content">
21
+ <div class="orb orb-1"></div>
22
+ <span class="cheese-emoji">🧀</span>
23
+ <span class="brand-name">raclette</span>
24
+ <div class="orb orb-2"></div>
25
+ <div class="tagline">The framework behind this app</div>
26
+ <div class="orb orb-3"></div>
27
+ <div class="cta-text">Click to learn more →</div>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ </template>
34
+
35
+ <script setup lang="ts">
36
+ const openRacletteWebsite = () => {
37
+ window.open("https://raclettejs.com/", "_blank")
38
+ }
39
+ </script>
40
+
41
+ <style scoped>
42
+ .raclette-ad-corner {
43
+ position: fixed;
44
+ bottom: 0;
45
+ right: 0;
46
+ z-index: 4;
47
+ pointer-events: none;
48
+ }
49
+
50
+ .corner-container {
51
+ position: relative;
52
+ width: 140px;
53
+ height: 140px;
54
+ }
55
+
56
+ .page-peel {
57
+ position: absolute;
58
+ bottom: 0;
59
+ right: 0;
60
+ width: 100%;
61
+ height: 100%;
62
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
63
+ }
64
+
65
+ .corner-fold {
66
+ position: absolute;
67
+ bottom: 0;
68
+ right: 140px;
69
+ width: 400px;
70
+ height: 15px;
71
+ background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
72
+ transform: rotate(135deg);
73
+ transform-origin: bottom right;
74
+ filter: drop-shadow(-2px -2px 4px rgba(0, 0, 0, 0.3));
75
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
76
+ z-index: 2;
77
+ }
78
+
79
+ .content-area {
80
+ position: absolute;
81
+ display: flex;
82
+ align-items: end;
83
+ justify-content: end;
84
+ bottom: 0;
85
+ right: 0;
86
+ width: 140px;
87
+ height: 140px;
88
+ background: linear-gradient(135deg, #2a2a2e 0%, #1b1b1f 100%);
89
+ border-top-left-radius: 16px;
90
+ padding: 16px;
91
+ box-shadow:
92
+ -4px -4px 12px rgba(0, 0, 0, 0.4),
93
+ inset 1px 1px 0 rgba(221, 139, 64, 0.1);
94
+ overflow: hidden;
95
+ clip-path: polygon(
96
+ 0 0,
97
+ 100% 0,
98
+ 100% 100%,
99
+ calc(100% - 140px) 100%,
100
+ 100% calc(100% - 140px)
101
+ );
102
+ padding: 4px;
103
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
104
+ }
105
+
106
+ @media (min-width: 1024px) {
107
+ .corner-container {
108
+ width: 190px;
109
+ height: 190px;
110
+ }
111
+
112
+ .corner-fold {
113
+ right: 190px;
114
+ height: 20px;
115
+ }
116
+
117
+ .content-area {
118
+ width: 190px;
119
+ height: 190px;
120
+ padding: 7px;
121
+ clip-path: polygon(
122
+ 0 0,
123
+ 100% 0,
124
+ 100% 100%,
125
+ calc(100% - 190px) 100%,
126
+ 100% calc(100% - 190px)
127
+ );
128
+ }
129
+ }
130
+
131
+ .container-content {
132
+ display: flex;
133
+ position: relative;
134
+ height: fit-content;
135
+ justify-content: end;
136
+ align-items: end;
137
+ flex-direction: column;
138
+ }
139
+
140
+ .brand-name {
141
+ color: #dd8b40;
142
+ font-weight: 600;
143
+ font-size: 16px;
144
+ font-family: "Quicksand", sans-serif;
145
+ }
146
+
147
+ .cheese-emoji {
148
+ font-size: 14px;
149
+ opacity: 0.8;
150
+ }
151
+
152
+ .tagline {
153
+ color: #c1c1c1;
154
+ font-size: 9px;
155
+ font-weight: 500;
156
+ opacity: 0.9;
157
+ line-height: 1.2;
158
+ font-family: "Roboto";
159
+ text-align: right;
160
+ }
161
+
162
+ .cta-text {
163
+ color: #dd8b40;
164
+ font-size: 11px;
165
+ font-weight: 500;
166
+ text-align: center;
167
+ opacity: 0.8;
168
+ margin-top: 4px;
169
+ }
170
+
171
+ @media (min-width: 1024px) {
172
+ .brand-name {
173
+ font-size: 25px;
174
+ margin-bottom: 16px;
175
+ }
176
+
177
+ .cheese-emoji {
178
+ font-size: 30px;
179
+ line-height: 20px;
180
+ }
181
+
182
+ .tagline {
183
+ font-size: 11px;
184
+ }
185
+
186
+ .cta-text {
187
+ font-size: 14px;
188
+ }
189
+ }
190
+
191
+ /* SVG hover triangle */
192
+ .hover-triangle {
193
+ position: absolute;
194
+ top: 0;
195
+ right: 0;
196
+ z-index: 3;
197
+ pointer-events: all;
198
+ transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
199
+ width: 140px;
200
+ height: 140px;
201
+ }
202
+
203
+ @media (min-width: 1024px) {
204
+ .hover-triangle {
205
+ width: 200px;
206
+ height: 200px;
207
+ }
208
+ }
209
+
210
+ .triangle-hover-zone {
211
+ cursor: pointer;
212
+ }
213
+
214
+ .hover-triangle:hover {
215
+ width: 260px;
216
+ height: 260px;
217
+ }
218
+
219
+ .raclette-ad-corner:has(.hover-triangle:hover) .corner-fold {
220
+ height: 20px;
221
+ right: 190px;
222
+ }
223
+
224
+ .raclette-ad-corner:has(.hover-triangle:hover) .content-area {
225
+ clip-path: polygon(
226
+ 0 0,
227
+ 100% 0,
228
+ 100% 100%,
229
+ calc(100% - 190px) 100%,
230
+ 100% calc(100% - 190px)
231
+ );
232
+ width: 190px;
233
+ height: 190px;
234
+ }
235
+
236
+ .raclette-ad-corner:has(.hover-triangle:hover) .cheese-emoji {
237
+ animation: spin 0.35s ease-in-out;
238
+ }
239
+
240
+ @media (min-width: 1024px) {
241
+ .raclette-ad-corner:has(.hover-triangle:hover) .corner-fold {
242
+ height: 25px;
243
+ right: 240px;
244
+ }
245
+
246
+ .raclette-ad-corner:has(.hover-triangle:hover) .content-area {
247
+ box-shadow:
248
+ -6px -6px 16px rgba(0, 0, 0, 0.5),
249
+ inset 1px 1px 0 rgba(221, 139, 64, 0.2);
250
+ clip-path: polygon(
251
+ 0 0,
252
+ 100% 0,
253
+ 100% 100%,
254
+ calc(100% - 240px) 100%,
255
+ 100% calc(100% - 240px)
256
+ );
257
+ width: 240px;
258
+ height: 240px;
259
+ }
260
+ }
261
+
262
+ @keyframes spin {
263
+ from {
264
+ transform: rotate(0deg);
265
+ }
266
+ to {
267
+ transform: rotate(360deg);
268
+ }
269
+ }
270
+
271
+ @keyframes float {
272
+ 0%,
273
+ 100% {
274
+ transform: translateY(0px);
275
+ }
276
+ 50% {
277
+ transform: translateY(-12px);
278
+ }
279
+ }
280
+
281
+ .orb {
282
+ position: absolute;
283
+ border-radius: 50%;
284
+ filter: blur(5px);
285
+ animation: float 6s ease-in-out infinite;
286
+ }
287
+
288
+ .orb-1 {
289
+ top: 0px;
290
+ right: 10px;
291
+ width: 32px;
292
+ height: 32px;
293
+ background-color: rgba(255, 165, 0, 0.15);
294
+ }
295
+
296
+ .orb-2 {
297
+ bottom: 6px;
298
+ right: 80px;
299
+ width: 24px;
300
+ height: 24px;
301
+ background-color: rgba(198, 162, 43, 0.15);
302
+ animation-delay: 2s;
303
+ }
304
+
305
+ .orb-3 {
306
+ bottom: 33.333333%;
307
+ right: -8px;
308
+ width: 22px;
309
+ height: 22px;
310
+ background-color: rgba(96, 165, 250, 0.15);
311
+ animation-delay: 4s;
312
+ }
313
+ </style>
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <!-- TODO: font Noto Sans -->
3
+ <v-btn
4
+ class="tw:border tw:border-solid tw:rounded-[5px] tw:text-black tw:border-black tw:text-center tw:w-fit tw:normal-case tw:font-normal tw:h-fit tw:block"
5
+ :color="variant === 'primary' ? '#FFEEDE' : 'white'"
6
+ :class="{
7
+ 'tw:bg-[#FFEEDE]': variant === 'primary',
8
+ 'tw:bg-white': variant === 'secondary',
9
+ 'tw:px-3 tw:py-[6px]': size === 'default',
10
+ 'tw:px-3 tw:py-[4px]': size === 'sm',
11
+ 'tw:px-4 tw:py-[10px]': size === 'lg',
12
+ }"
13
+ >
14
+ <div
15
+ class="tw:flex tw:items-center tw:tracking-[.5px]"
16
+ :class="{
17
+ 'tw:text-lg tw:leading-5 tw:gap-2': size === 'default' || size === 'sm',
18
+ 'tw:text-2xl tw:leading-6 tw:gap-3': size === 'lg',
19
+ }"
20
+ >
21
+ <slot name="prepend-icon" />
22
+
23
+ <div
24
+ v-if="prepend"
25
+ :class="{
26
+ 'tw:size-5': size === 'default',
27
+ 'tw:size-[18px]': size === 'sm',
28
+ 'tw:size-6': size === 'lg',
29
+ }"
30
+ >
31
+ <SvgButtonArrow
32
+ :class="{
33
+ 'tw:size-[13.333px]': size === 'default',
34
+ 'tw:size-3': size === 'sm',
35
+ }"
36
+ />
37
+ </div>
38
+
39
+ <div>
40
+ <slot />
41
+ </div>
42
+
43
+ <slot name="append-icon" />
44
+
45
+ <div v-if="append">
46
+ <SvgButtonArrow
47
+ :class="{
48
+ 'tw:size-[13.333px]': size === 'default',
49
+ 'tw:size-3': size === 'sm',
50
+ }"
51
+ />
52
+ </div>
53
+ </div>
54
+ </v-btn>
55
+
56
+ <!-- <button
57
+ class="tw:border tw:border-solid tw:rounded-[5px] tw:tracking-[.5px] tw:text-black tw:border-black tw:text-center tw:flex tw:items-center"
58
+ :class="{
59
+ 'tw:bg-[#FFEEDE]': variant === 'primary',
60
+ 'tw:bg-white': variant === 'secondary',
61
+ 'tw:text-lg tw:leading-5 tw:px-3 tw:py-[6px] tw:gap-2':
62
+ size === 'default',
63
+ 'tw:text-lg tw:leading-5 tw:px-3 tw:py-[4px] tw:gap-2': size === 'sm',
64
+ 'tw:text-2xl tw:leading-6 tw:px-4 tw:py-[10px] tw:gap-3': size === 'lg',
65
+ }"
66
+ >
67
+ <div
68
+ v-if="prepend"
69
+ :class="{
70
+ 'tw:size-5': size === 'default',
71
+ 'tw:size-[18px]': size === 'sm',
72
+ 'tw:size-6': size === 'lg',
73
+ }"
74
+ >
75
+ <SvgButtonArrow
76
+ :class="{
77
+ 'tw:size-[13.333px]': size === 'default',
78
+ 'tw:size-3': size === 'sm',
79
+ }"
80
+ />
81
+ </div>
82
+
83
+ <slot />
84
+
85
+ <div v-if="append">
86
+ <SvgButtonArrow
87
+ :class="{
88
+ 'tw:size-[13.333px]': size === 'default',
89
+ 'tw:size-3': size === 'sm',
90
+ }"
91
+ />
92
+ </div>
93
+ </button> -->
94
+ </template>
95
+
96
+ <script setup lang="ts">
97
+ import { PropType } from "vue"
98
+ import SvgButtonArrow from "./SvgButtonArrow.vue"
99
+
100
+ withDefaults(
101
+ defineProps<{
102
+ variant?: "primary" | "secondary"
103
+ size?: "sm" | "default" | "lg"
104
+ append?: boolean
105
+ prepend?: boolean
106
+ }>(),
107
+ { variant: "primary", size: "default" },
108
+ )
109
+ </script>
@@ -0,0 +1,46 @@
1
+ <template>
2
+ <component :is="tag" class="tw:font-medium tw:tracking-[.5px] tw:text-center">
3
+ <slot />
4
+ </component>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ withDefaults(
9
+ defineProps<{
10
+ tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6"
11
+ }>(),
12
+ { tag: "h1" },
13
+ )
14
+ </script>
15
+
16
+ <style scoped>
17
+ @reference "@raclettejs/core/orchestrator/assets/styles/tailwindStyles.css";
18
+
19
+ h1 {
20
+ @apply tw:text-[32px];
21
+ @apply tw:leading-10;
22
+ }
23
+
24
+ h2 {
25
+ @apply tw:text-[28px];
26
+ @apply tw:leading-9;
27
+ }
28
+
29
+ h3 {
30
+ @apply tw:text-2xl;
31
+ }
32
+
33
+ h4 {
34
+ @apply tw:text-xl;
35
+ }
36
+
37
+ h5 {
38
+ @apply tw:text-lg;
39
+ @apply tw:leading-6;
40
+ }
41
+
42
+ h6 {
43
+ @apply tw:text-base;
44
+ @apply tw:leading-[22px];
45
+ }
46
+ </style>
@@ -0,0 +1,94 @@
1
+ <template>
2
+ <!-- TODO: font Noto Sans -->
3
+ <div
4
+ class="tw:flex"
5
+ :class="{
6
+ 'tw:gap-11': !fullWidth,
7
+ 'tw:flex-col tw:gap-4': fullWidth,
8
+ }"
9
+ >
10
+ <label
11
+ :for="inputId"
12
+ class="tw:flex tw:flex-col tw:gap-1"
13
+ :class="{
14
+ 'tw:w-1/2': !fullWidth,
15
+ 'tw:w-full': fullWidth,
16
+ }"
17
+ >
18
+ <span
19
+ class="tw:font-semibold tw:text-base tw:leading-[22px] tw:tracking-[.5%]"
20
+ >
21
+ {{ inputLabel }}
22
+ </span>
23
+ <span
24
+ v-if="description"
25
+ class="tw:text-sm tw:leading-[100%] tw:tracking-[.5px] tw:text-[#595959]"
26
+ >
27
+ {{ description }}
28
+ </span>
29
+ </label>
30
+
31
+ <v-text-field
32
+ v-bind="$attrs"
33
+ v-model="model"
34
+ :hide-details="hideDetails"
35
+ variant="outlined"
36
+ :class="{
37
+ 'tw:w-1/2': !fullWidth,
38
+ 'tw:w-full': fullWidth,
39
+ }"
40
+ :id="inputId"
41
+ :rules="activeRules"
42
+ :type="
43
+ $attrs.type === 'password'
44
+ ? showPasswordText
45
+ ? 'text'
46
+ : 'password'
47
+ : $attrs.type
48
+ "
49
+ :append-icon="
50
+ $attrs.type === 'password'
51
+ ? showPasswordText
52
+ ? 'mdi-eye'
53
+ : 'mdi-eye-off'
54
+ : undefined
55
+ "
56
+ @click:append="showPasswordText = !showPasswordText"
57
+ />
58
+ </div>
59
+ </template>
60
+
61
+ <script setup lang="ts">
62
+ import { computed, ref, useId } from "vue"
63
+
64
+ const RULES = {
65
+ required: (value) => !!value || "Required.",
66
+ email: (value) => {
67
+ const pattern =
68
+ /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
69
+ return pattern.test(value) || "Invalid e-mail."
70
+ },
71
+ min8: (v) => v.length >= 8 || "Min 8 characters",
72
+ repeat: (value: string) => value === props.toRepeat || "Passwords must match",
73
+ }
74
+
75
+ // prevents attributes from being applied to the outer <div>
76
+ defineOptions({ inheritAttrs: false })
77
+
78
+ const props = defineProps<{
79
+ fullWidth?: boolean
80
+ inputLabel: string
81
+ description?: string
82
+ hideDetails?: boolean
83
+ rules?: Array<keyof typeof RULES>
84
+ toRepeat?: string
85
+ }>()
86
+
87
+ const model = defineModel<string>({ required: true })
88
+
89
+ const showPasswordText = ref(false)
90
+
91
+ const inputId = computed(() => `labelled-input_${useId()}`)
92
+
93
+ const activeRules = computed(() => props.rules?.map((rule) => RULES[rule]))
94
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <div
3
+ class="tw:h-full tw:flex-1 tw:flex tw:items-center tw:justify-center tw:px-6 tw:py-12"
4
+ >
5
+ <div class="tw:max-w-2xl tw:w-full">
6
+ <!-- Main Headline -->
7
+ <div class="tw:text-center tw:mb-12">
8
+ <slot name="header">
9
+ <h1
10
+ class="tw:text-4xl tw:font-bold tw:text-gray-800 tw:mb-4"
11
+ v-html="title"
12
+ ></h1>
13
+ </slot>
14
+ </div>
15
+
16
+ <!-- Content -->
17
+ <v-card class="tw:rounded-xl! tw:shadow-lg!">
18
+ <v-card-text class="tw:p-8!">
19
+ <slot />
20
+ </v-card-text>
21
+ </v-card>
22
+ </div>
23
+ </div>
24
+ </template>
25
+
26
+ <script setup lang="ts">
27
+ defineProps<{ title?: string }>()
28
+ </script>
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <svg
3
+ width="16"
4
+ height="16"
5
+ viewBox="0 0 16 16"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M8 0L6.59 1.41L12.17 7H0V9H12.17L6.59 14.59L8 16L16 8L8 0Z"
11
+ fill="black"
12
+ />
13
+ </svg>
14
+ </template>
@@ -0,0 +1,19 @@
1
+ import { $api } from "@raclettejs/core/frontend"
2
+
3
+ type InitProjectPayload = {
4
+ title: string
5
+ user: {
6
+ email: string
7
+ password: string
8
+ firstname: string
9
+ lastname?: string
10
+ }
11
+ }
12
+
13
+ export default () => {
14
+ const initProject = async (payload: InitProjectPayload) => {
15
+ return await $api.axios.post("pacifico__core/init-project", payload)
16
+ }
17
+
18
+ return { initProject }
19
+ }