@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.
Files changed (108) hide show
  1. package/.github/workflows/auto-publish.yml +64 -0
  2. package/.github/workflows/release.yml +59 -0
  3. package/README.md +60 -0
  4. package/app.config.ts +70 -0
  5. package/components/Admin/Base.vue +144 -0
  6. package/components/Admin/Header.vue +32 -0
  7. package/components/Admin/Page.vue +65 -0
  8. package/components/Admin/PageHeader.vue +31 -0
  9. package/components/App/Button.vue +59 -0
  10. package/components/App/DevEnvironmentBar.vue +43 -0
  11. package/components/App/Dropdown.vue +286 -0
  12. package/components/App/EmptyState.vue +433 -0
  13. package/components/App/LoadingState.vue +40 -0
  14. package/components/App/PageLoadingSpinner.vue +118 -0
  15. package/components/App/PreviewDock.vue +64 -0
  16. package/components/App/SwitchColorTheme.vue +51 -0
  17. package/components/App/Tag.vue +193 -0
  18. package/components/DataTable.vue +713 -0
  19. package/components/Forms/DatePicker.vue +255 -0
  20. package/components/Forms/Input.vue +75 -0
  21. package/components/Forms/Select.vue +100 -0
  22. package/components/Forms/SelectServer.vue +726 -0
  23. package/components/Layout/Admin.vue +32 -0
  24. package/components/Layout/Auth.vue +29 -0
  25. package/components/Layout/SidebarWithAppColumn.vue +388 -0
  26. package/components/Layout/TopBar.vue +113 -0
  27. package/components/MobileBlocker.vue +85 -0
  28. package/components/MobileLoginPicker.vue +83 -0
  29. package/components/Modal/Base.vue +29 -0
  30. package/components/Modal/DeleteConfirm.vue +48 -0
  31. package/components/Modal.vue +103 -0
  32. package/components/Nav/Tabs.vue +55 -0
  33. package/components/PermissionsTree.vue +272 -0
  34. package/components/Table/Database.vue +183 -0
  35. package/components/Table/DownloadDropdown.vue +111 -0
  36. package/components/Table/Enterprise.vue +540 -0
  37. package/components/Table/FilterDropdown.vue +226 -0
  38. package/components/Table/Grid.vue +62 -0
  39. package/components/Table/Kanban.vue +188 -0
  40. package/components/Table/List.vue +128 -0
  41. package/components/Table/PreviewTimeline.vue +118 -0
  42. package/components/Table/Standard.vue +1217 -0
  43. package/components/Table/index.vue +974 -0
  44. package/components/TableExportable.vue +172 -0
  45. package/components/TableFilter.vue +93 -0
  46. package/components/Toast/Alert.vue +113 -0
  47. package/components/Toast/Container.vue +34 -0
  48. package/components/Toast/Notification.vue +45 -0
  49. package/components/Toast/Process.vue +88 -0
  50. package/composables/useApi.js +95 -0
  51. package/composables/useApp.ts +46 -0
  52. package/composables/useAuth.js +82 -0
  53. package/composables/useContext.js +44 -0
  54. package/composables/useDate.js +241 -0
  55. package/composables/useDevice.js +21 -0
  56. package/composables/useDockedPreviews.js +56 -0
  57. package/composables/useDownload.js +87 -0
  58. package/composables/useEntity.js +82 -0
  59. package/composables/useForm.js +119 -0
  60. package/composables/useInnertiaMode.ts +25 -0
  61. package/composables/useMobileGuard.ts +81 -0
  62. package/composables/useNotifications.js +22 -0
  63. package/composables/usePermissions.js +23 -0
  64. package/composables/useRealtime.js +123 -0
  65. package/composables/useRequestInterceptors.js +27 -0
  66. package/composables/useRoles.js +53 -0
  67. package/composables/useRutFormatter.js +39 -0
  68. package/composables/useTable.ts +94 -0
  69. package/composables/useTablePreferences.ts +33 -0
  70. package/composables/useTenant.js +27 -0
  71. package/composables/useTimeAgo.js +37 -0
  72. package/composables/useToast.js +69 -0
  73. package/composables/useUserRealtime.js +17 -0
  74. package/composables/useUsers.js +111 -0
  75. package/css/themes/autumn.css +401 -0
  76. package/css/themes/bubblegum.css +408 -0
  77. package/css/themes/cashmere.css +412 -0
  78. package/css/themes/harvest.css +416 -0
  79. package/css/themes/moon.css +140 -0
  80. package/css/themes/ocean.css +273 -0
  81. package/css/themes/olive.css +413 -0
  82. package/css/themes/retro.css +431 -0
  83. package/css/themes/theme.css +725 -0
  84. package/error.vue +78 -0
  85. package/middleware/01.detect-subdomain.global.ts +43 -0
  86. package/middleware/02.validate-tenant.global.ts +67 -0
  87. package/middleware/03.apps.global.ts +88 -0
  88. package/middleware/auth.ts +9 -0
  89. package/middleware/guest.ts +9 -0
  90. package/nuxt.config.ts +42 -0
  91. package/package.json +60 -0
  92. package/pages/tenant-error.vue +50 -0
  93. package/plugins/api-auth.ts +12 -0
  94. package/plugins/api-tenant.client.ts +21 -0
  95. package/plugins/appearance.ts +8 -0
  96. package/plugins/auth-init.ts +34 -0
  97. package/plugins/dark-state.client.ts +29 -0
  98. package/plugins/dockedPreviewsSync.client.js +17 -0
  99. package/plugins/preline.client.ts +68 -0
  100. package/plugins/theme.client.ts +7 -0
  101. package/plugins/vue-query.ts +29 -0
  102. package/public/init-theme.js +15 -0
  103. package/spark.css +721 -0
  104. package/stores/auth.js +130 -0
  105. package/stores/dockedPreviews.js +34 -0
  106. package/stores/notifications.js +24 -0
  107. package/stores/tenant.js +54 -0
  108. 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>