@htlkg/components 0.0.2 → 0.0.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.
Files changed (60) hide show
  1. package/README.md +52 -0
  2. package/dist/AdminWrapper.vue_vue_type_script_setup_true_lang-B32IylcT.js +367 -0
  3. package/dist/AdminWrapper.vue_vue_type_script_setup_true_lang-B32IylcT.js.map +1 -0
  4. package/dist/Alert.vue_vue_type_script_setup_true_lang-DxPCS-Hx.js +263 -0
  5. package/dist/Alert.vue_vue_type_script_setup_true_lang-DxPCS-Hx.js.map +1 -0
  6. package/dist/DateRange.vue_vue_type_script_setup_true_lang-BLVg1Hah.js +580 -0
  7. package/dist/DateRange.vue_vue_type_script_setup_true_lang-BLVg1Hah.js.map +1 -0
  8. package/dist/ProductBadge.vue_vue_type_script_setup_true_lang-Cmr2f4Cy.js +187 -0
  9. package/dist/ProductBadge.vue_vue_type_script_setup_true_lang-Cmr2f4Cy.js.map +1 -0
  10. package/dist/_plugin-vue_export-helper-1tPrXgE0.js +11 -0
  11. package/dist/_plugin-vue_export-helper-1tPrXgE0.js.map +1 -0
  12. package/dist/components.css +15 -0
  13. package/dist/composables/index.js +32 -573
  14. package/dist/composables/index.js.map +1 -1
  15. package/dist/data/index.js +18 -0
  16. package/dist/data/index.js.map +1 -0
  17. package/dist/domain/index.js +8 -0
  18. package/dist/domain/index.js.map +1 -0
  19. package/dist/filterHelpers-DgRyoYSa.js +1386 -0
  20. package/dist/filterHelpers-DgRyoYSa.js.map +1 -0
  21. package/dist/forms/index.js +6 -0
  22. package/dist/forms/index.js.map +1 -0
  23. package/dist/index-DGO_pNgG.js +79 -0
  24. package/dist/index-DGO_pNgG.js.map +1 -0
  25. package/dist/index-QK97OdqQ.js +25 -0
  26. package/dist/index-QK97OdqQ.js.map +1 -0
  27. package/dist/index.js +67 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/navigation/index.js +8 -0
  30. package/dist/navigation/index.js.map +1 -0
  31. package/dist/overlays/index.js +8 -0
  32. package/dist/overlays/index.js.map +1 -0
  33. package/dist/stores/index.js +14 -0
  34. package/dist/stores/index.js.map +1 -0
  35. package/dist/useAdminPage-GhgXp0x8.js +1070 -0
  36. package/dist/useAdminPage-GhgXp0x8.js.map +1 -0
  37. package/dist/useTable-DutR1gkg.js +293 -0
  38. package/dist/useTable-DutR1gkg.js.map +1 -0
  39. package/package.json +43 -14
  40. package/src/composables/composables.md +109 -0
  41. package/src/composables/index.ts +69 -0
  42. package/src/composables/useAdminPage.ts +462 -0
  43. package/src/composables/useConfirmation.ts +358 -0
  44. package/src/composables/usePageContext.ts +171 -0
  45. package/src/composables/useStats.ts +361 -0
  46. package/src/composables/useTable.ts +26 -5
  47. package/src/composables/useWizard.ts +448 -0
  48. package/src/data/DataTable.vue +553 -0
  49. package/src/data/Table/Table.vue +295 -0
  50. package/src/data/columnHelpers.ts +503 -0
  51. package/src/data/data.md +106 -0
  52. package/src/data/filterHelpers.ts +358 -0
  53. package/src/data/index.ts +31 -0
  54. package/src/domain/domain.md +102 -0
  55. package/src/forms/JsonSchemaForm.vue +4 -1
  56. package/src/forms/forms.md +89 -0
  57. package/src/index.ts +4 -3
  58. package/src/navigation/navigation.md +80 -0
  59. package/src/overlays/overlays.md +86 -0
  60. package/src/stores/stores.md +82 -0
@@ -0,0 +1,86 @@
1
+ # Overlays Module
2
+
3
+ Modal dialogs, notifications, alerts, and drawers.
4
+
5
+ ## Components
6
+
7
+ ### Alert
8
+
9
+ Visual alerts for information, success, warnings, and errors.
10
+
11
+ ```vue
12
+ <script setup>
13
+ import { Alert } from '@htlkg/components/overlays';
14
+ </script>
15
+
16
+ <template>
17
+ <Alert
18
+ type="success"
19
+ title="Success!"
20
+ message="Operation completed."
21
+ dismissible
22
+ @dismiss="handleDismiss"
23
+ />
24
+ </template>
25
+ ```
26
+
27
+ ### Modal
28
+
29
+ Dialog overlays for confirmations, forms, and content.
30
+
31
+ ```vue
32
+ <script setup>
33
+ import { ref } from 'vue';
34
+ import { Modal } from '@htlkg/components/overlays';
35
+
36
+ const isOpen = ref(false);
37
+ </script>
38
+
39
+ <template>
40
+ <Modal v-model:open="isOpen" title="Confirm Action">
41
+ <p>Are you sure?</p>
42
+ <template #footer>
43
+ <button @click="isOpen = false">Cancel</button>
44
+ <button @click="confirm">Confirm</button>
45
+ </template>
46
+ </Modal>
47
+ </template>
48
+ ```
49
+
50
+ ### Notification
51
+
52
+ Toast-style notifications for temporary messages.
53
+
54
+ ```vue
55
+ <script setup>
56
+ import { Notification } from '@htlkg/components/overlays';
57
+ </script>
58
+
59
+ <template>
60
+ <Notification
61
+ type="info"
62
+ message="Changes saved"
63
+ :duration="3000"
64
+ position="top-right"
65
+ />
66
+ </template>
67
+ ```
68
+
69
+ ### Drawer
70
+
71
+ Side panel overlays for additional content.
72
+
73
+ ```vue
74
+ <script setup>
75
+ import { ref } from 'vue';
76
+ import { Drawer } from '@htlkg/components/overlays';
77
+
78
+ const isOpen = ref(false);
79
+ </script>
80
+
81
+ <template>
82
+ <Drawer v-model:open="isOpen" position="right" title="Details">
83
+ <DetailContent />
84
+ </Drawer>
85
+ </template>
86
+ ```
@@ -0,0 +1,82 @@
1
+ # Stores Module
2
+
3
+ Pinia stores for global component state.
4
+
5
+ ## Available Stores
6
+
7
+ ### useNotificationStore
8
+
9
+ Global notification state.
10
+
11
+ ```vue
12
+ <script setup>
13
+ import { useNotificationStore } from '@htlkg/components/stores';
14
+
15
+ const notifications = useNotificationStore();
16
+
17
+ notifications.add({
18
+ type: 'success',
19
+ message: 'Operation completed',
20
+ duration: 3000,
21
+ });
22
+
23
+ notifications.remove(id);
24
+ notifications.clear();
25
+ </script>
26
+ ```
27
+
28
+ ### useModalStore
29
+
30
+ Global modal state for managing multiple modals.
31
+
32
+ ```vue
33
+ <script setup>
34
+ import { useModalStore } from '@htlkg/components/stores';
35
+
36
+ const modals = useModalStore();
37
+
38
+ modals.open('confirm', { title: 'Confirm', message: 'Are you sure?' });
39
+ modals.close('confirm');
40
+ modals.isOpen('confirm'); // boolean
41
+ </script>
42
+ ```
43
+
44
+ ### useLoadingStore
45
+
46
+ Global loading state.
47
+
48
+ ```vue
49
+ <script setup>
50
+ import { useLoadingStore } from '@htlkg/components/stores';
51
+
52
+ const loading = useLoadingStore();
53
+
54
+ loading.start('fetchUsers');
55
+ loading.stop('fetchUsers');
56
+ loading.isLoading('fetchUsers'); // boolean
57
+ loading.anyLoading; // boolean - true if any loading
58
+ </script>
59
+ ```
60
+
61
+ ## Store Setup
62
+
63
+ Register stores in your app:
64
+
65
+ ```typescript
66
+ // main.ts
67
+ import { createPinia } from 'pinia';
68
+
69
+ const pinia = createPinia();
70
+ app.use(pinia);
71
+ ```
72
+
73
+ ## Astro Integration
74
+
75
+ Use with nanostores for Astro SSR:
76
+
77
+ ```typescript
78
+ import { useStore } from '@nanostores/vue';
79
+ import { notificationStore } from '@htlkg/components/stores';
80
+
81
+ const notifications = useStore(notificationStore);
82
+ ```