@innertia-solutions/innertia-nuxt 0.1.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.
- package/.github/workflows/auto-publish.yml +64 -0
- package/.github/workflows/release.yml +59 -0
- package/README.md +60 -0
- package/app.config.ts +70 -0
- package/components/Admin/Base.vue +144 -0
- package/components/Admin/Header.vue +32 -0
- package/components/Admin/Page.vue +65 -0
- package/components/Admin/PageHeader.vue +31 -0
- package/components/App/Button.vue +59 -0
- package/components/App/DevEnvironmentBar.vue +43 -0
- package/components/App/Dropdown.vue +286 -0
- package/components/App/EmptyState.vue +433 -0
- package/components/App/LoadingState.vue +40 -0
- package/components/App/PageLoadingSpinner.vue +118 -0
- package/components/App/PreviewDock.vue +64 -0
- package/components/App/SwitchColorTheme.vue +51 -0
- package/components/App/Tag.vue +193 -0
- package/components/DataTable.vue +713 -0
- package/components/Forms/DatePicker.vue +255 -0
- package/components/Forms/Input.vue +75 -0
- package/components/Forms/Select.vue +100 -0
- package/components/Forms/SelectServer.vue +726 -0
- package/components/Layout/Admin.vue +32 -0
- package/components/Layout/Auth.vue +29 -0
- package/components/Layout/SidebarWithAppColumn.vue +388 -0
- package/components/Layout/TopBar.vue +113 -0
- package/components/MobileBlocker.vue +85 -0
- package/components/MobileLoginPicker.vue +83 -0
- package/components/Modal/Base.vue +29 -0
- package/components/Modal/DeleteConfirm.vue +48 -0
- package/components/Modal.vue +103 -0
- package/components/Nav/Tabs.vue +55 -0
- package/components/PermissionsTree.vue +272 -0
- package/components/Table/Database.vue +183 -0
- package/components/Table/DownloadDropdown.vue +111 -0
- package/components/Table/Enterprise.vue +540 -0
- package/components/Table/FilterDropdown.vue +226 -0
- package/components/Table/Grid.vue +62 -0
- package/components/Table/Kanban.vue +188 -0
- package/components/Table/List.vue +128 -0
- package/components/Table/PreviewTimeline.vue +118 -0
- package/components/Table/Standard.vue +1217 -0
- package/components/Table/index.vue +974 -0
- package/components/TableExportable.vue +172 -0
- package/components/TableFilter.vue +93 -0
- package/components/Toast/Alert.vue +113 -0
- package/components/Toast/Container.vue +34 -0
- package/components/Toast/Notification.vue +45 -0
- package/components/Toast/Process.vue +88 -0
- package/composables/useApi.js +95 -0
- package/composables/useApp.ts +46 -0
- package/composables/useAuth.js +82 -0
- package/composables/useContext.js +44 -0
- package/composables/useDate.js +241 -0
- package/composables/useDevice.js +21 -0
- package/composables/useDockedPreviews.js +56 -0
- package/composables/useDownload.js +87 -0
- package/composables/useEntity.js +82 -0
- package/composables/useForm.js +119 -0
- package/composables/useInnertiaMode.ts +25 -0
- package/composables/useMobileGuard.ts +81 -0
- package/composables/useNotifications.js +22 -0
- package/composables/usePermissions.js +23 -0
- package/composables/useRealtime.js +123 -0
- package/composables/useRequestInterceptors.js +27 -0
- package/composables/useRoles.js +53 -0
- package/composables/useRutFormatter.js +39 -0
- package/composables/useTable.ts +94 -0
- package/composables/useTablePreferences.ts +33 -0
- package/composables/useTenant.js +27 -0
- package/composables/useTimeAgo.js +37 -0
- package/composables/useToast.js +69 -0
- package/composables/useUserRealtime.js +17 -0
- package/composables/useUsers.js +111 -0
- package/css/themes/autumn.css +401 -0
- package/css/themes/bubblegum.css +408 -0
- package/css/themes/cashmere.css +412 -0
- package/css/themes/harvest.css +416 -0
- package/css/themes/moon.css +140 -0
- package/css/themes/ocean.css +273 -0
- package/css/themes/olive.css +413 -0
- package/css/themes/retro.css +431 -0
- package/css/themes/theme.css +725 -0
- package/error.vue +78 -0
- package/middleware/01.detect-subdomain.global.ts +43 -0
- package/middleware/02.validate-tenant.global.ts +67 -0
- package/middleware/03.apps.global.ts +88 -0
- package/middleware/auth.ts +9 -0
- package/middleware/guest.ts +9 -0
- package/nuxt.config.ts +42 -0
- package/package.json +60 -0
- package/pages/tenant-error.vue +50 -0
- package/plugins/api-auth.ts +12 -0
- package/plugins/api-tenant.client.ts +21 -0
- package/plugins/appearance.ts +8 -0
- package/plugins/auth-init.ts +34 -0
- package/plugins/dark-state.client.ts +29 -0
- package/plugins/dockedPreviewsSync.client.js +17 -0
- package/plugins/preline.client.ts +68 -0
- package/plugins/theme.client.ts +7 -0
- package/plugins/vue-query.ts +29 -0
- package/public/init-theme.js +15 -0
- package/spark.css +721 -0
- package/stores/auth.js +130 -0
- package/stores/dockedPreviews.js +34 -0
- package/stores/notifications.js +24 -0
- package/stores/tenant.js +54 -0
- package/stores/toast.js +129 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
text: {
|
|
4
|
+
type: String,
|
|
5
|
+
required: true,
|
|
6
|
+
},
|
|
7
|
+
size: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: false,
|
|
10
|
+
default: "sm",
|
|
11
|
+
validator: (value) => ["xs", "sm", "md", "lg"].includes(value),
|
|
12
|
+
},
|
|
13
|
+
severity: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: false,
|
|
16
|
+
default: "secondary",
|
|
17
|
+
validator: (value) =>
|
|
18
|
+
["primary", "secondary", "success", "danger", "warning", "info"].includes(
|
|
19
|
+
value
|
|
20
|
+
),
|
|
21
|
+
},
|
|
22
|
+
outlined: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
required: false,
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
icon: {
|
|
28
|
+
type: Object,
|
|
29
|
+
required: false,
|
|
30
|
+
default: null,
|
|
31
|
+
},
|
|
32
|
+
iconPosition: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false,
|
|
35
|
+
default: "left",
|
|
36
|
+
validator: (value) => ["left", "right"].includes(value),
|
|
37
|
+
},
|
|
38
|
+
class: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: false,
|
|
41
|
+
default: "",
|
|
42
|
+
},
|
|
43
|
+
iconClass: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: false,
|
|
46
|
+
default: "",
|
|
47
|
+
},
|
|
48
|
+
textClass: {
|
|
49
|
+
type: String,
|
|
50
|
+
required: false,
|
|
51
|
+
default: "",
|
|
52
|
+
},
|
|
53
|
+
tooltip: {
|
|
54
|
+
type: String,
|
|
55
|
+
required: false,
|
|
56
|
+
default: "",
|
|
57
|
+
},
|
|
58
|
+
tooltipPosition: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: false,
|
|
61
|
+
default: "top",
|
|
62
|
+
validator: (value) =>
|
|
63
|
+
["top", "bottom", "left", "right", "auto"].includes(value),
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Computed classes for sizes
|
|
68
|
+
const sizeClasses = computed(() => {
|
|
69
|
+
const sizes = {
|
|
70
|
+
xs: "px-1.5 py-0.5 text-xs",
|
|
71
|
+
sm: "px-2 py-1.5 text-xs",
|
|
72
|
+
md: "px-2.5 py-1.5 text-sm",
|
|
73
|
+
lg: "px-3 py-2 text-sm",
|
|
74
|
+
};
|
|
75
|
+
return sizes[props.size] || sizes.sm;
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// Computed classes for icon sizes
|
|
79
|
+
const iconSizeClasses = computed(() => {
|
|
80
|
+
const sizes = {
|
|
81
|
+
xs: "size-2.5",
|
|
82
|
+
sm: "size-3",
|
|
83
|
+
md: "size-3.5",
|
|
84
|
+
lg: "size-4",
|
|
85
|
+
};
|
|
86
|
+
return sizes[props.size] || sizes.sm;
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// Computed classes for severity colors
|
|
90
|
+
const severityClasses = computed(() => {
|
|
91
|
+
const base = "font-light rounded-md";
|
|
92
|
+
|
|
93
|
+
if (props.outlined) {
|
|
94
|
+
const variants = {
|
|
95
|
+
primary:
|
|
96
|
+
"border border-blue-600 text-blue-600 bg-blue-50 dark:border-blue-500 dark:text-blue-500 dark:bg-blue-900/20",
|
|
97
|
+
secondary:
|
|
98
|
+
"border border-card-line text-muted-foreground-1 bg-card",
|
|
99
|
+
success:
|
|
100
|
+
"border border-green-600 text-green-600 bg-green-50 dark:border-green-500 dark:text-green-500 dark:bg-green-900/20",
|
|
101
|
+
danger:
|
|
102
|
+
"border border-red-600 text-red-600 bg-red-50 dark:border-red-500 dark:text-red-500 dark:bg-red-900/20",
|
|
103
|
+
warning:
|
|
104
|
+
"border border-yellow-500 text-yellow-600 bg-yellow-40 dark:border-yellow-500 dark:text-yellow-500 dark:bg-yellow-900/20",
|
|
105
|
+
info: "border border-cyan-600 text-cyan-600 bg-cyan-50 dark:border-cyan-500 dark:text-cyan-500 dark:bg-cyan-900/20",
|
|
106
|
+
};
|
|
107
|
+
return `${base} ${variants[props.severity] || variants.secondary}`;
|
|
108
|
+
} else {
|
|
109
|
+
const variants = {
|
|
110
|
+
primary: "bg-blue-600 text-white dark:bg-blue-600",
|
|
111
|
+
secondary:
|
|
112
|
+
"bg-gray-100 text-gray-800 dark:bg-neutral-700 dark:text-neutral-200",
|
|
113
|
+
success: "bg-green-600 text-white dark:bg-green-600",
|
|
114
|
+
danger: "bg-red-600 text-white dark:bg-red-600",
|
|
115
|
+
warning: "bg-yellow-600 text-white dark:bg-yellow-600",
|
|
116
|
+
info: "bg-cyan-600 text-white dark:bg-cyan-600",
|
|
117
|
+
};
|
|
118
|
+
return `${base} ${variants[props.severity] || variants.secondary}`;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// Tooltip attributes
|
|
123
|
+
const tooltipClasses = computed(() => {
|
|
124
|
+
if (!props.tooltip) return "";
|
|
125
|
+
|
|
126
|
+
const placement = `[--placement:${props.tooltipPosition}]`;
|
|
127
|
+
return `hs-tooltip ${placement} inline-block`;
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const tagClasses = computed(() => {
|
|
131
|
+
const baseClasses = `${sizeClasses.value} ${severityClasses.value} inline-flex items-center gap-x-1 ${props.class}`;
|
|
132
|
+
|
|
133
|
+
if (props.tooltip) {
|
|
134
|
+
return `${baseClasses} hs-tooltip-toggle`;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return baseClasses;
|
|
138
|
+
});
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<template>
|
|
142
|
+
<div v-if="tooltip" :class="tooltipClasses">
|
|
143
|
+
<span :class="tagClasses">
|
|
144
|
+
<!-- Icon Left -->
|
|
145
|
+
<component
|
|
146
|
+
v-if="icon && iconPosition === 'left'"
|
|
147
|
+
:is="icon"
|
|
148
|
+
:class="`${iconSizeClasses} ${iconClass}`"
|
|
149
|
+
/>
|
|
150
|
+
|
|
151
|
+
<!-- Tag Text -->
|
|
152
|
+
<slot name="text">
|
|
153
|
+
<span :class="textClass">{{ text }}</span>
|
|
154
|
+
</slot>
|
|
155
|
+
|
|
156
|
+
<!-- Icon Right -->
|
|
157
|
+
<component
|
|
158
|
+
v-if="icon && iconPosition === 'right'"
|
|
159
|
+
:is="icon"
|
|
160
|
+
:class="`${iconSizeClasses} ${iconClass}`"
|
|
161
|
+
/>
|
|
162
|
+
|
|
163
|
+
<!-- Tooltip Content -->
|
|
164
|
+
<span
|
|
165
|
+
class="hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 transition-opacity inline-block absolute invisible z-10 py-1 px-2 bg-gray-900 text-xs font-medium text-white rounded-md shadow-2xs dark:bg-neutral-700"
|
|
166
|
+
role="tooltip"
|
|
167
|
+
>
|
|
168
|
+
{{ tooltip }}
|
|
169
|
+
</span>
|
|
170
|
+
</span>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
<span v-else :class="tagClasses">
|
|
174
|
+
<!-- Icon Left -->
|
|
175
|
+
<component
|
|
176
|
+
v-if="icon && iconPosition === 'left'"
|
|
177
|
+
:is="icon"
|
|
178
|
+
:class="`${iconSizeClasses} ${iconClass}`"
|
|
179
|
+
/>
|
|
180
|
+
|
|
181
|
+
<!-- Tag Text -->
|
|
182
|
+
<slot name="text">
|
|
183
|
+
<span :class="textClass">{{ text }}</span>
|
|
184
|
+
</slot>
|
|
185
|
+
|
|
186
|
+
<!-- Icon Right -->
|
|
187
|
+
<component
|
|
188
|
+
v-if="icon && iconPosition === 'right'"
|
|
189
|
+
:is="icon"
|
|
190
|
+
:class="`${iconSizeClasses} ${iconClass}`"
|
|
191
|
+
/>
|
|
192
|
+
</span>
|
|
193
|
+
</template>
|