@ngbplatform/ui 1.3.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.
Files changed (217) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +44 -0
  3. package/package.json +61 -0
  4. package/public/favicon.svg +6 -0
  5. package/public/silent-check-sso.html +8 -0
  6. package/src/assets/ngb_logo.svg +17 -0
  7. package/src/assets/ngb_logo_color.svg +17 -0
  8. package/src/index.ts +1023 -0
  9. package/src/ngb/README.md +27 -0
  10. package/src/ngb/accounting/NgbAccountingPeriodClosingPage.vue +1157 -0
  11. package/src/ngb/accounting/NgbChartOfAccountEditor.vue +590 -0
  12. package/src/ngb/accounting/NgbChartOfAccountsPage.vue +420 -0
  13. package/src/ngb/accounting/NgbGeneralJournalEntryEditPage.vue +796 -0
  14. package/src/ngb/accounting/NgbGeneralJournalEntryLinesEditor.vue +454 -0
  15. package/src/ngb/accounting/NgbGeneralJournalEntryListPage.vue +186 -0
  16. package/src/ngb/accounting/api.ts +79 -0
  17. package/src/ngb/accounting/generalJournalEntry.ts +127 -0
  18. package/src/ngb/accounting/generalJournalEntryApi.ts +112 -0
  19. package/src/ngb/accounting/generalJournalEntryTypes.ts +155 -0
  20. package/src/ngb/accounting/navigation.ts +83 -0
  21. package/src/ngb/accounting/periodClosing.ts +75 -0
  22. package/src/ngb/accounting/periodClosingApi.ts +60 -0
  23. package/src/ngb/accounting/periodClosingTypes.ts +73 -0
  24. package/src/ngb/accounting/types.ts +57 -0
  25. package/src/ngb/api/audit.ts +23 -0
  26. package/src/ngb/api/catalogs.ts +50 -0
  27. package/src/ngb/api/contracts.ts +285 -0
  28. package/src/ngb/api/documents.ts +170 -0
  29. package/src/ngb/api/http.ts +446 -0
  30. package/src/ngb/api/lookups.ts +14 -0
  31. package/src/ngb/api/types.ts +6 -0
  32. package/src/ngb/auth/index.ts +13 -0
  33. package/src/ngb/auth/keycloak.ts +374 -0
  34. package/src/ngb/auth/router.ts +35 -0
  35. package/src/ngb/auth/types.ts +12 -0
  36. package/src/ngb/auth/useAuthStore.ts +209 -0
  37. package/src/ngb/command-palette/NgbCommandPaletteDialog.vue +342 -0
  38. package/src/ngb/command-palette/NgbCommandPaletteEmptyState.vue +55 -0
  39. package/src/ngb/command-palette/NgbCommandPaletteFooterHints.vue +29 -0
  40. package/src/ngb/command-palette/api.ts +10 -0
  41. package/src/ngb/command-palette/config.ts +16 -0
  42. package/src/ngb/command-palette/presentation.ts +85 -0
  43. package/src/ngb/command-palette/search.ts +130 -0
  44. package/src/ngb/command-palette/staticItems.ts +243 -0
  45. package/src/ngb/command-palette/storage.ts +45 -0
  46. package/src/ngb/command-palette/store.ts +716 -0
  47. package/src/ngb/command-palette/types.ts +120 -0
  48. package/src/ngb/command-palette/useCommandPaletteHotkeys.ts +27 -0
  49. package/src/ngb/command-palette/useCommandPalettePageContext.ts +18 -0
  50. package/src/ngb/components/NgbConfirmDialog.vue +63 -0
  51. package/src/ngb/components/NgbDialog.vue +44 -0
  52. package/src/ngb/components/NgbDrawer.vue +156 -0
  53. package/src/ngb/components/NgbHeaderActionCluster.vue +140 -0
  54. package/src/ngb/components/NgbModalShell.vue +99 -0
  55. package/src/ngb/components/NgbToolbar.vue +14 -0
  56. package/src/ngb/components/forms/NgbFormLayout.vue +13 -0
  57. package/src/ngb/components/forms/NgbFormRow.vue +21 -0
  58. package/src/ngb/components/forms/NgbFormSection.vue +16 -0
  59. package/src/ngb/components/forms/NgbValidationSummary.vue +18 -0
  60. package/src/ngb/components/navigation/NgbNavigationTree.vue +68 -0
  61. package/src/ngb/components/navigation/NgbTreeNode.vue +94 -0
  62. package/src/ngb/components/register/NgbColumnChooser.vue +101 -0
  63. package/src/ngb/components/register/NgbRegisterGrid.vue +473 -0
  64. package/src/ngb/components/register/registerTypes.ts +51 -0
  65. package/src/ngb/components/register/useRegisterColumnResize.ts +99 -0
  66. package/src/ngb/components/register/useRegisterColumnState.ts +220 -0
  67. package/src/ngb/components/register/useRegisterRows.ts +209 -0
  68. package/src/ngb/components/register/useRegisterViewport.ts +56 -0
  69. package/src/ngb/editor/NgbDocumentEffectsPage.vue +512 -0
  70. package/src/ngb/editor/NgbDocumentFlowPage.vue +409 -0
  71. package/src/ngb/editor/NgbDocumentPrintPage.vue +712 -0
  72. package/src/ngb/editor/NgbEditorDiscardDialog.vue +40 -0
  73. package/src/ngb/editor/NgbEntityAuditSidebar.vue +288 -0
  74. package/src/ngb/editor/NgbEntityEditor.vue +250 -0
  75. package/src/ngb/editor/NgbEntityEditorDrawerActions.vue +88 -0
  76. package/src/ngb/editor/NgbEntityEditorHeader.vue +114 -0
  77. package/src/ngb/editor/catalogNavigation.ts +13 -0
  78. package/src/ngb/editor/config.ts +252 -0
  79. package/src/ngb/editor/documentCopyDraft.ts +245 -0
  80. package/src/ngb/editor/documentEffects.ts +43 -0
  81. package/src/ngb/editor/documentEffectsDateFormatting.ts +18 -0
  82. package/src/ngb/editor/documentNavigation.ts +115 -0
  83. package/src/ngb/editor/documentStatus.ts +45 -0
  84. package/src/ngb/editor/entityEditorErrors.ts +162 -0
  85. package/src/ngb/editor/entityEditorPersistence.ts +241 -0
  86. package/src/ngb/editor/extensions.ts +40 -0
  87. package/src/ngb/editor/types.ts +295 -0
  88. package/src/ngb/editor/useConfiguredEntityEditorDocumentActions.ts +183 -0
  89. package/src/ngb/editor/useDocumentEditorDrawerState.ts +152 -0
  90. package/src/ngb/editor/useEditorDrawerState.ts +88 -0
  91. package/src/ngb/editor/useEntityEditorBusinessContext.ts +97 -0
  92. package/src/ngb/editor/useEntityEditorCapabilities.ts +190 -0
  93. package/src/ngb/editor/useEntityEditorCommandPalette.ts +154 -0
  94. package/src/ngb/editor/useEntityEditorCommitHandlers.ts +102 -0
  95. package/src/ngb/editor/useEntityEditorHeaderActions.ts +253 -0
  96. package/src/ngb/editor/useEntityEditorLeaveGuard.ts +66 -0
  97. package/src/ngb/editor/useEntityEditorNavigationActions.ts +235 -0
  98. package/src/ngb/editor/useEntityEditorOutputs.ts +59 -0
  99. package/src/ngb/editor/useEntityEditorPageActions.ts +57 -0
  100. package/src/ngb/editor/useRouteQueryEditorDrawer.ts +173 -0
  101. package/src/ngb/env/runtimeConfig.ts +25 -0
  102. package/src/ngb/lookup/config.ts +42 -0
  103. package/src/ngb/lookup/defaultConfig.ts +136 -0
  104. package/src/ngb/lookup/navigation.ts +76 -0
  105. package/src/ngb/lookup/prefetch.ts +40 -0
  106. package/src/ngb/lookup/store.ts +261 -0
  107. package/src/ngb/metadata/NgbDocumentListFiltersDrawer.vue +78 -0
  108. package/src/ngb/metadata/NgbDocumentPeriodFilter.vue +53 -0
  109. package/src/ngb/metadata/NgbEntityForm.vue +84 -0
  110. package/src/ngb/metadata/NgbEntityFormFieldsBlock.vue +110 -0
  111. package/src/ngb/metadata/NgbEntityListPageHeader.vue +80 -0
  112. package/src/ngb/metadata/NgbFilterFieldControl.vue +104 -0
  113. package/src/ngb/metadata/NgbMetadataCatalogEditPage.vue +42 -0
  114. package/src/ngb/metadata/NgbMetadataCatalogListPage.vue +269 -0
  115. package/src/ngb/metadata/NgbMetadataDocumentEditPage.vue +68 -0
  116. package/src/ngb/metadata/NgbMetadataDocumentListPage.vue +353 -0
  117. package/src/ngb/metadata/NgbMetadataFieldRenderer.vue +124 -0
  118. package/src/ngb/metadata/NgbMetadataLookupControl.vue +92 -0
  119. package/src/ngb/metadata/NgbRecycleBinFilter.vue +53 -0
  120. package/src/ngb/metadata/NgbRegisterPageLayout.vue +143 -0
  121. package/src/ngb/metadata/config.ts +28 -0
  122. package/src/ngb/metadata/dataTypes.ts +27 -0
  123. package/src/ngb/metadata/entityForm.ts +114 -0
  124. package/src/ngb/metadata/entityModel.ts +34 -0
  125. package/src/ngb/metadata/entityValueFormatting.ts +83 -0
  126. package/src/ngb/metadata/fieldRendererState.ts +84 -0
  127. package/src/ngb/metadata/filtering.ts +153 -0
  128. package/src/ngb/metadata/lookup.ts +25 -0
  129. package/src/ngb/metadata/monthPagedListQuery.ts +108 -0
  130. package/src/ngb/metadata/normalization.ts +100 -0
  131. package/src/ngb/metadata/referenceHydration.ts +99 -0
  132. package/src/ngb/metadata/register.ts +135 -0
  133. package/src/ngb/metadata/routePages.ts +86 -0
  134. package/src/ngb/metadata/store.ts +35 -0
  135. package/src/ngb/metadata/types.ts +276 -0
  136. package/src/ngb/metadata/useMetadataListFilters.ts +306 -0
  137. package/src/ngb/metadata/useMetadataRegisterPageData.ts +246 -0
  138. package/src/ngb/metadata/useValidationFocus.ts +49 -0
  139. package/src/ngb/primitives/NgbBadge.vue +31 -0
  140. package/src/ngb/primitives/NgbButton.vue +53 -0
  141. package/src/ngb/primitives/NgbCheckbox.vue +33 -0
  142. package/src/ngb/primitives/NgbDatePicker.vue +141 -0
  143. package/src/ngb/primitives/NgbIcon.vue +545 -0
  144. package/src/ngb/primitives/NgbInput.vue +57 -0
  145. package/src/ngb/primitives/NgbLookup.vue +264 -0
  146. package/src/ngb/primitives/NgbMonthPicker.vue +132 -0
  147. package/src/ngb/primitives/NgbMultiSelect.vue +179 -0
  148. package/src/ngb/primitives/NgbPeriodPicker.vue +125 -0
  149. package/src/ngb/primitives/NgbPickerNavButton.vue +31 -0
  150. package/src/ngb/primitives/NgbPickerPopover.vue +79 -0
  151. package/src/ngb/primitives/NgbRadioGroup.vue +53 -0
  152. package/src/ngb/primitives/NgbSelect.vue +108 -0
  153. package/src/ngb/primitives/NgbStatusIcon.vue +63 -0
  154. package/src/ngb/primitives/NgbSwitch.vue +42 -0
  155. package/src/ngb/primitives/NgbTabs.vue +116 -0
  156. package/src/ngb/primitives/NgbToastHost.vue +49 -0
  157. package/src/ngb/primitives/NgbTooltip.vue +27 -0
  158. package/src/ngb/primitives/iconNames.ts +83 -0
  159. package/src/ngb/primitives/toast.ts +66 -0
  160. package/src/ngb/primitives/useAsyncComboboxQuery.ts +85 -0
  161. package/src/ngb/primitives/useFloatingDropdownPosition.ts +129 -0
  162. package/src/ngb/reporting/NgbReportComposerCollectionSection.vue +106 -0
  163. package/src/ngb/reporting/NgbReportComposerPanel.vue +1187 -0
  164. package/src/ngb/reporting/NgbReportDateRangeFilter.vue +54 -0
  165. package/src/ngb/reporting/NgbReportPage.vue +1124 -0
  166. package/src/ngb/reporting/NgbReportSheet.vue +467 -0
  167. package/src/ngb/reporting/api.ts +35 -0
  168. package/src/ngb/reporting/composer.ts +904 -0
  169. package/src/ngb/reporting/config.ts +120 -0
  170. package/src/ngb/reporting/defaultConfig.ts +15 -0
  171. package/src/ngb/reporting/lookupFilters.ts +43 -0
  172. package/src/ngb/reporting/navigation.ts +181 -0
  173. package/src/ngb/reporting/pageHelpers.ts +73 -0
  174. package/src/ngb/reporting/pageSession.ts +92 -0
  175. package/src/ngb/reporting/paging.ts +66 -0
  176. package/src/ngb/reporting/types.ts +333 -0
  177. package/src/ngb/router/backNavigation.ts +122 -0
  178. package/src/ngb/router/queryParams.ts +129 -0
  179. package/src/ngb/router/queryState.ts +121 -0
  180. package/src/ngb/router/routeAliases.ts +66 -0
  181. package/src/ngb/router/routeParams.ts +15 -0
  182. package/src/ngb/router/shareLink.ts +39 -0
  183. package/src/ngb/security/NgbAccessAuditPanel.vue +32 -0
  184. package/src/ngb/security/NgbAccessDeniedState.vue +27 -0
  185. package/src/ngb/security/NgbEffectiveAccessPanel.vue +60 -0
  186. package/src/ngb/security/NgbPermissionMatrix.vue +160 -0
  187. package/src/ngb/security/NgbRoleEditorPage.vue +319 -0
  188. package/src/ngb/security/NgbRolesPage.vue +125 -0
  189. package/src/ngb/security/NgbUserEditorPage.vue +615 -0
  190. package/src/ngb/security/NgbUsersPage.vue +125 -0
  191. package/src/ngb/security/api.ts +91 -0
  192. package/src/ngb/security/audit.ts +21 -0
  193. package/src/ngb/security/permissions.ts +65 -0
  194. package/src/ngb/security/types.ts +157 -0
  195. package/src/ngb/security/useAccessStore.ts +69 -0
  196. package/src/ngb/site/NgbDashboardAsOfToolbar.vue +100 -0
  197. package/src/ngb/site/NgbDashboardStatusBanner.vue +91 -0
  198. package/src/ngb/site/NgbLogo.vue +44 -0
  199. package/src/ngb/site/NgbPageHeader.vue +49 -0
  200. package/src/ngb/site/NgbSiteShell.vue +286 -0
  201. package/src/ngb/site/NgbSiteSidebar.vue +270 -0
  202. package/src/ngb/site/NgbTopBar.vue +425 -0
  203. package/src/ngb/site/NgbTrendChart.vue +224 -0
  204. package/src/ngb/site/dashboardData.ts +324 -0
  205. package/src/ngb/site/mainMenuStore.ts +49 -0
  206. package/src/ngb/site/types.ts +31 -0
  207. package/src/ngb/site/useDashboardPageState.ts +98 -0
  208. package/src/ngb/site/useTheme.ts +95 -0
  209. package/src/ngb/utils/clone.ts +43 -0
  210. package/src/ngb/utils/dateValues.ts +107 -0
  211. package/src/ngb/utils/errorMessage.ts +14 -0
  212. package/src/ngb/utils/guid.ts +21 -0
  213. package/src/ngb/utils/stableValue.ts +21 -0
  214. package/src/ngb/utils/storage.ts +135 -0
  215. package/src/styles/tailwind.css +165 -0
  216. package/src/vite/publicAssets.ts +104 -0
  217. package/vite-public-assets.js +68 -0
@@ -0,0 +1,545 @@
1
+ <template>
2
+ <svg
3
+ :width="size"
4
+ :height="size"
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ stroke="currentColor"
8
+ stroke-width="1.7"
9
+ stroke-linecap="round"
10
+ stroke-linejoin="round"
11
+ aria-hidden="true"
12
+ class="block"
13
+ >
14
+ <!-- Arrow left -->
15
+ <template v-if="name === 'arrow-left'">
16
+ <path d="M10 6l-6 6 6 6" />
17
+ <path d="M4 12h16" />
18
+ </template>
19
+
20
+ <!-- Arrow right -->
21
+ <template v-else-if="name === 'arrow-right'">
22
+ <path d="M14 6l6 6-6 6" />
23
+ <path d="M4 12h16" />
24
+ </template>
25
+
26
+ <!-- Plus -->
27
+ <template v-else-if="name === 'plus'">
28
+ <path d="M12 5v14" />
29
+ <path d="M5 12h14" />
30
+ </template>
31
+
32
+ <!-- Minus -->
33
+ <template v-else-if="name === 'minus'">
34
+ <path d="M5 12h14" />
35
+ </template>
36
+
37
+ <!-- Trash -->
38
+ <template v-else-if="name === 'trash'">
39
+ <path d="M3 6h18" />
40
+ <path d="M8 6V4h8v2" />
41
+ <path d="M6 6l1 16h10l1-16" />
42
+ <path d="M10 11v7" />
43
+ <path d="M14 11v7" />
44
+ </template>
45
+
46
+ <!-- Trash restore (unmark) -->
47
+ <template v-else-if="name === 'trash-restore'">
48
+ <path d="M3 6h18" />
49
+ <path d="M8 6V4h8v2" />
50
+ <path d="M6 6l1 16h10l1-16" />
51
+ <path d="M12 18v-6" />
52
+ <path d="M9.5 14.5 12 12l2.5 2.5" />
53
+ </template>
54
+
55
+ <!-- Check (post) -->
56
+ <template v-else-if="name === 'check'">
57
+ <path d="M20 6 9 17l-5-5" />
58
+ </template>
59
+
60
+ <!-- Undo (unpost) -->
61
+ <template v-else-if="name === 'undo'">
62
+ <path d="M9 14 4 9l5-5" />
63
+ <path d="M4 9h10a6 6 0 0 1 0 12h-1" />
64
+ </template>
65
+
66
+ <!-- Panel left -->
67
+ <template v-else-if="name === 'panel-left'">
68
+ <rect x="3" y="4" width="18" height="16" rx="2" />
69
+ <path d="M9 4v16" />
70
+ </template>
71
+
72
+ <!-- Panel right (open compact page) -->
73
+ <template v-else-if="name === 'panel-right'">
74
+ <rect x="3" y="4" width="18" height="16" rx="2" />
75
+ <path d="M15 4v16" />
76
+ </template>
77
+
78
+ <!-- Grip vertical -->
79
+ <template v-else-if="name === 'grip-vertical'">
80
+ <circle cx="9" cy="7" r="1" fill="currentColor" stroke="none" />
81
+ <circle cx="15" cy="7" r="1" fill="currentColor" stroke="none" />
82
+ <circle cx="9" cy="12" r="1" fill="currentColor" stroke="none" />
83
+ <circle cx="15" cy="12" r="1" fill="currentColor" stroke="none" />
84
+ <circle cx="9" cy="17" r="1" fill="currentColor" stroke="none" />
85
+ <circle cx="15" cy="17" r="1" fill="currentColor" stroke="none" />
86
+ </template>
87
+
88
+ <!-- Bell -->
89
+ <template v-else-if="name === 'bell'">
90
+ <path d="M18 8a6 6 0 0 0-12 0c0 7-3 8-3 8h18s-3-1-3-8" />
91
+ <path d="M13.73 21a2 2 0 0 1-3.46 0" />
92
+ </template>
93
+
94
+ <!-- Help circle -->
95
+ <template v-else-if="name === 'help-circle'">
96
+ <circle cx="12" cy="12" r="9" />
97
+ <path d="M9.5 9.5a2.5 2.5 0 0 1 5 0c0 1.8-2 2-2 3.5" />
98
+ <path d="M12 17h.01" />
99
+ </template>
100
+
101
+ <!-- Settings -->
102
+ <template v-else-if="name === 'settings'">
103
+ <!-- Feather Icons: settings (cog) -->
104
+ <circle cx="12" cy="12" r="3" />
105
+ <path
106
+ d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.6 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"
107
+ />
108
+ </template>
109
+
110
+ <!-- Cogs -->
111
+ <template v-else-if="name === 'cogs'">
112
+ <circle cx="9" cy="15" r="3.25" />
113
+ <path d="M9 9.5v1.35M9 19.15v1.35M3.5 15h1.35M13.15 15h1.35" />
114
+ <path d="M5.1 11.1l.95.95M11.95 17.95l.95.95M5.1 18.9l.95-.95M11.95 12.05l.95-.95" />
115
+
116
+ <circle cx="16.75" cy="8" r="2.35" />
117
+ <path d="M16.75 4.3v1.05M16.75 10.65v1.05M13.05 8h1.05M19.4 8h1.05" />
118
+ <path d="M14.15 5.4l.75.75M18.35 9.6l.75.75M14.15 10.6l.75-.75M18.35 6.4l.75-.75" />
119
+ </template>
120
+
121
+ <!-- Sun -->
122
+ <template v-else-if="name === 'sun'">
123
+ <circle cx="12" cy="12" r="3.5" />
124
+ <path d="M12 2v2.5M12 19.5V22" />
125
+ <path d="M4.2 4.2l1.8 1.8M18 18l1.8 1.8" />
126
+ <path d="M2 12h2.5M19.5 12H22" />
127
+ <path d="M4.2 19.8 6 18M18 6l1.8-1.8" />
128
+ </template>
129
+
130
+ <!-- Moon -->
131
+ <template v-else-if="name === 'moon'">
132
+ <!-- Feather Icons: moon -->
133
+ <path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
134
+ </template>
135
+
136
+ <!-- Home -->
137
+ <template v-else-if="name === 'home'">
138
+ <path d="M3 11l9-8 9 8" />
139
+ <path d="M5 10v10h5v-6h4v6h5V10" />
140
+ </template>
141
+
142
+ <!-- Grid -->
143
+ <template v-else-if="name === 'grid'">
144
+ <rect x="3" y="3" width="7" height="7" rx="1" />
145
+ <rect x="14" y="3" width="7" height="7" rx="1" />
146
+ <rect x="3" y="14" width="7" height="7" rx="1" />
147
+ <rect x="14" y="14" width="7" height="7" rx="1" />
148
+ </template>
149
+
150
+ <!-- List -->
151
+ <template v-else-if="name === 'list'">
152
+ <path d="M9 6h11" />
153
+ <path d="M9 12h11" />
154
+ <path d="M9 18h11" />
155
+ <circle cx="5" cy="6" r="1.2" fill="currentColor" stroke="none" />
156
+ <circle cx="5" cy="12" r="1.2" fill="currentColor" stroke="none" />
157
+ <circle cx="5" cy="18" r="1.2" fill="currentColor" stroke="none" />
158
+ </template>
159
+
160
+ <!-- File text -->
161
+ <template v-else-if="name === 'file-text'">
162
+ <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
163
+ <path d="M14 2v6h6" />
164
+ <path d="M8 13h8" />
165
+ <path d="M8 17h8" />
166
+ <path d="M8 9h3" />
167
+ </template>
168
+
169
+ <!-- Bar chart -->
170
+ <template v-else-if="name === 'bar-chart'">
171
+ <path d="M12 20V10" />
172
+ <path d="M18 20V4" />
173
+ <path d="M6 20v-6" />
174
+ <path d="M4 20h16" />
175
+ </template>
176
+
177
+ <!-- Calculator -->
178
+ <template v-else-if="name === 'calculator'">
179
+ <rect x="5" y="3" width="14" height="18" rx="2" />
180
+ <path d="M8 7h8" />
181
+ <path d="M8 11h2" />
182
+ <path d="M14 11h2" />
183
+ <path d="M8 15h2" />
184
+ <path d="M14 15h2" />
185
+ <path d="M8 19h2" />
186
+ <path d="M14 19h2" />
187
+ </template>
188
+
189
+ <!-- Book open -->
190
+ <template v-else-if="name === 'book-open'">
191
+ <path d="M12 7a4 4 0 0 0-4-2H4v14h4a4 4 0 0 1 4 2" />
192
+ <path d="M12 7a4 4 0 0 1 4-2h4v14h-4a4 4 0 0 0-4 2" />
193
+ </template>
194
+
195
+ <!-- Receipt -->
196
+ <template v-else-if="name === 'receipt'">
197
+ <path d="M6 3h12v18l-2.5-1.8L13 21l-2.5-1.8L8 21l-2-1.8V3z" />
198
+ <path d="M9 8h6" />
199
+ <path d="M9 12h6" />
200
+ <path d="M9 16h4" />
201
+ </template>
202
+
203
+ <!-- Users -->
204
+ <template v-else-if="name === 'users'">
205
+ <path d="M16 21v-1.5a3.5 3.5 0 0 0-3.5-3.5h-1A3.5 3.5 0 0 0 8 19.5V21" />
206
+ <circle cx="12" cy="10" r="3.2" />
207
+ <path d="M21 21v-1a3 3 0 0 0-2.4-2.95" />
208
+ <path d="M3 21v-1A3 3 0 0 1 5.4 17.05" />
209
+ <path d="M17.5 7.4a2.7 2.7 0 1 1 0 5.2" />
210
+ <path d="M6.5 7.4a2.7 2.7 0 1 0 0 5.2" />
211
+ </template>
212
+
213
+ <!-- User -->
214
+ <template v-else-if="name === 'user'">
215
+ <circle cx="12" cy="8.5" r="3.2" />
216
+ <path d="M5.5 20.5v-1.1A4.9 4.9 0 0 1 10.4 14.5h3.2a4.9 4.9 0 0 1 4.9 4.9v1.1" />
217
+ </template>
218
+
219
+ <!-- Building 2 -->
220
+ <template v-else-if="name === 'building-2'">
221
+ <rect x="4" y="3" width="10" height="18" rx="1.8" />
222
+ <path d="M14 8h6v13h-6" />
223
+ <path d="M7 7h1" />
224
+ <path d="M10 7h1" />
225
+ <path d="M7 11h1" />
226
+ <path d="M10 11h1" />
227
+ <path d="M7 15h1" />
228
+ <path d="M10 15h1" />
229
+ <path d="M8.5 21v-4h2v4" />
230
+ </template>
231
+
232
+ <!-- Coins -->
233
+ <template v-else-if="name === 'coins'">
234
+ <ellipse cx="9" cy="8" rx="4" ry="2" />
235
+ <path d="M5 8v4.5c0 1.1 1.8 2 4 2s4-.9 4-2V8" />
236
+ <ellipse cx="15.5" cy="13" rx="4" ry="2" />
237
+ <path d="M11.5 13v4.5c0 1.1 1.8 2 4 2s4-.9 4-2V13" />
238
+ </template>
239
+
240
+ <!-- Wallet -->
241
+ <template v-else-if="name === 'wallet'">
242
+ <path d="M4 7.5A2.5 2.5 0 0 1 6.5 5H18a2 2 0 0 1 2 2v2H6.5A2.5 2.5 0 0 1 4 6.5v9A2.5 2.5 0 0 0 6.5 18H20v-8H6.5A2.5 2.5 0 0 1 4 7.5z" />
243
+ <circle cx="16" cy="14" r="1" fill="currentColor" stroke="none" />
244
+ </template>
245
+
246
+ <!-- Wrench -->
247
+ <template v-else-if="name === 'wrench'">
248
+ <path
249
+ d="M7 10h3V7L6.5 3.5a6 6 0 0 1 8 8l6 6a2 2 0 0 1-3 3l-6-6a6 6 0 0 1-8-8L7 10z"
250
+ />
251
+ </template>
252
+
253
+ <!-- Clipboard list -->
254
+ <template v-else-if="name === 'clipboard-list'">
255
+ <rect x="6" y="4" width="12" height="17" rx="2" />
256
+ <path d="M9 4.5h6V7H9z" />
257
+ <path d="M10 11h5" />
258
+ <path d="M10 15h5" />
259
+ <circle cx="8" cy="11" r="1" fill="currentColor" stroke="none" />
260
+ <circle cx="8" cy="15" r="1" fill="currentColor" stroke="none" />
261
+ </template>
262
+
263
+ <!-- Check square -->
264
+ <template v-else-if="name === 'check-square'">
265
+ <rect x="4" y="4" width="16" height="16" rx="2" />
266
+ <path d="M8 12.2 10.7 15 16 9.8" />
267
+ </template>
268
+
269
+ <!-- Tag -->
270
+ <template v-else-if="name === 'tag'">
271
+ <path d="M20 10.5 11.5 19a2 2 0 0 1-2.8 0L3 13.3V4h9.3l5.7 5.7a2 2 0 0 1 0 2.8z" />
272
+ <circle cx="8" cy="8" r="1.2" fill="currentColor" stroke="none" />
273
+ </template>
274
+
275
+ <!-- Landmark -->
276
+ <template v-else-if="name === 'landmark'">
277
+ <path d="M3 9h18" />
278
+ <path d="M5 9v8" />
279
+ <path d="M9 9v8" />
280
+ <path d="M15 9v8" />
281
+ <path d="M19 9v8" />
282
+ <path d="M2 20h20" />
283
+ <path d="M12 3 3 7v2h18V7l-9-4z" />
284
+ </template>
285
+
286
+ <!-- Calendar check -->
287
+ <template v-else-if="name === 'calendar-check'">
288
+ <rect x="3" y="5" width="18" height="16" rx="2" />
289
+ <path d="M8 3v4" />
290
+ <path d="M16 3v4" />
291
+ <path d="M3 10h18" />
292
+ <path d="M8.5 15.2 10.8 17.5 15.5 12.8" />
293
+ </template>
294
+
295
+ <!-- Scale -->
296
+ <template v-else-if="name === 'scale'">
297
+ <path d="M12 4v14" />
298
+ <path d="M7 7h10" />
299
+ <path d="M5 7 2.5 12h5L5 7z" />
300
+ <path d="M19 7 16.5 12h5L19 7z" />
301
+ <path d="M9 21h6" />
302
+ </template>
303
+
304
+ <!-- Git merge -->
305
+ <template v-else-if="name === 'git-merge'">
306
+ <circle cx="7" cy="6" r="2" />
307
+ <circle cx="17" cy="18" r="2" />
308
+ <circle cx="17" cy="6" r="2" />
309
+ <path d="M9 6h6" />
310
+ <path d="M15 6a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4" />
311
+ </template>
312
+
313
+ <!-- Shield -->
314
+ <template v-else-if="name === 'shield'">
315
+ <path d="M12 2l8 4v6c0 5-3.5 9.5-8 10-4.5-.5-8-5-8-10V6z" />
316
+ </template>
317
+
318
+ <!-- Shield check -->
319
+ <template v-else-if="name === 'shield-check'">
320
+ <path d="M12 2l8 4v6c0 5-3.5 9.5-8 10-4.5-.5-8-5-8-10V6z" />
321
+ <path d="M8.8 12.2 10.9 14.3 15.6 9.6" />
322
+ </template>
323
+
324
+ <!-- Heart pulse -->
325
+ <template v-else-if="name === 'heart-pulse'">
326
+ <path d="M11.98 20.25c-4.6-2.9-8.23-6-8.23-10.1A4.9 4.9 0 0 1 8.63 5.25c1.4 0 2.72.6 3.6 1.66a4.66 4.66 0 0 1 3.58-1.66 4.9 4.9 0 0 1 4.94 4.9c0 4.08-3.65 7.2-8.27 10.1l-.25.16-.25-.16Z" />
327
+ <path d="M6.9 12h2.2l1.25-2.4 2.15 5.1 1.82-3.1h2.78" />
328
+ </template>
329
+
330
+ <!-- Inspect with check -->
331
+ <template v-else-if="name === 'inspect-check'">
332
+ <circle cx="10.25" cy="10.25" r="6.75" />
333
+ <path d="M7.75 10.35l2.05 2.05 4.05-4.05" />
334
+ <path d="M15.2 15.2 20 20" />
335
+ </template>
336
+
337
+ <!-- Selected month -->
338
+ <template v-else-if="name === 'selected-check'">
339
+ <rect x="3.6" y="3.6" width="16.8" height="16.8" rx="2.6" />
340
+ <path d="M8 12.15 10.8 14.95 16.1 9.65" />
341
+ </template>
342
+
343
+ <!-- Close month -->
344
+ <template v-else-if="name === 'close-month'">
345
+ <path d="M12 2.6 18.9 5.75v5.35c0 4.8-2.95 8.8-6.9 10.3-3.95-1.5-6.9-5.5-6.9-10.3V5.75L12 2.6z" />
346
+ <path d="M8.7 11.95 11 14.25l4.4-4.4" />
347
+ </template>
348
+
349
+ <!-- Chevrons left -->
350
+ <template v-else-if="name === 'chevrons-left'">
351
+ <path d="M11 19l-7-7 7-7" />
352
+ <path d="M20 19l-7-7 7-7" />
353
+ </template>
354
+
355
+ <!-- Chevrons right -->
356
+ <template v-else-if="name === 'chevrons-right'">
357
+ <path d="M13 5l7 7-7 7" />
358
+ <path d="M4 5l7 7-7 7" />
359
+ </template>
360
+
361
+ <!-- Search -->
362
+ <template v-else-if="name === 'search'">
363
+ <circle cx="11" cy="11" r="7" />
364
+ <path d="M20 20l-3.5-3.5" />
365
+ </template>
366
+
367
+ <!-- Filter -->
368
+ <template v-else-if="name === 'filter'">
369
+ <path d="M3.5 5.5h17l-6.5 7v6.5l-4 2v-8.5l-6.5-7Z" />
370
+ </template>
371
+
372
+ <!-- Composer -->
373
+ <template v-else-if="name === 'composer'">
374
+ <path d="M3.5 6.5h12.5" />
375
+ <path d="M18 6.5h2.5" />
376
+ <rect x="16" y="4.6" width="2.4" height="3.8" rx="0.9" />
377
+
378
+ <path d="M3.5 12h4.8" />
379
+ <path d="M10.7 12h9.8" />
380
+ <rect x="8.3" y="10.1" width="2.4" height="3.8" rx="0.9" />
381
+
382
+ <path d="M3.5 17.5h9.3" />
383
+ <path d="M15.2 17.5h5.3" />
384
+ <rect x="12.8" y="15.6" width="2.4" height="3.8" rx="0.9" />
385
+ </template>
386
+
387
+ <!-- Play -->
388
+ <template v-else-if="name === 'play'">
389
+ <path d="M9 7.5v9l7-4.5-7-4.5Z" fill="currentColor" stroke="none" />
390
+ </template>
391
+
392
+ <!-- Refresh -->
393
+ <template v-else-if="name === 'refresh'">
394
+ <path d="M21 12a9 9 0 1 1-3.1-6.8" />
395
+ <path d="M21 3v6h-6" />
396
+ </template>
397
+
398
+ <!-- Open in new -->
399
+ <template v-else-if="name === 'open-in-new'">
400
+ <path d="M14 3h7v7" />
401
+ <path d="M10 14 21 3" />
402
+ <path d="M21 14v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7" />
403
+ </template>
404
+
405
+ <!-- Load variant -->
406
+ <template v-else-if="name === 'load-variant'">
407
+ <path d="M12 4v9.5" />
408
+ <path d="M8.8 10.3 12 13.5l3.2-3.2" />
409
+ <path d="M5.5 15.25v2.5A1.75 1.75 0 0 0 7.25 19.5h9.5a1.75 1.75 0 0 0 1.75-1.75v-2.5" />
410
+ </template>
411
+
412
+ <!-- X -->
413
+ <template v-else-if="name === 'x'">
414
+ <path d="M6 6l12 12M18 6L6 18" />
415
+ </template>
416
+
417
+ <!-- Circle X -->
418
+ <template v-else-if="name === 'circle-x'">
419
+ <circle cx="12" cy="12" r="9" />
420
+ <path d="M9 9l6 6M15 9l-6 6" />
421
+ </template>
422
+
423
+ <!-- History -->
424
+ <template v-else-if="name === 'history'">
425
+ <path d="M3 12a9 9 0 1 0 3-6.7" />
426
+ <path d="M3 4v5h5" />
427
+ <path d="M12 7v5l3 2" />
428
+ </template>
429
+
430
+ <!-- Eye -->
431
+ <template v-else-if="name === 'eye'">
432
+ <path d="M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z" />
433
+ <circle cx="12" cy="12" r="3" />
434
+ </template>
435
+
436
+ <!-- Eye off -->
437
+ <template v-else-if="name === 'eye-off'">
438
+ <path d="M3 3l18 18" />
439
+ <path d="M10.6 10.6a2 2 0 0 0 2.8 2.8" />
440
+ <path d="M9.9 5.2A10.7 10.7 0 0 1 12 5c6 0 9.5 7 9.5 7a17 17 0 0 1-2.8 3.7" />
441
+ <path d="M6.1 6.8A17.5 17.5 0 0 0 2.5 12s3.5 7 9.5 7c1.7 0 3.2-.4 4.5-1" />
442
+ </template>
443
+
444
+ <!-- Effects flow -->
445
+ <template v-else-if="name === 'effects-flow'">
446
+ <path d="M4 8h12" />
447
+ <path d="M13 5 16 8l-3 3" />
448
+ <path d="M20 16H8" />
449
+ <path d="M11 13 8 16l3 3" />
450
+ </template>
451
+
452
+ <!-- File apply -->
453
+ <template v-else-if="name === 'file-apply'">
454
+ <path d="M12 3v8" />
455
+ <path d="M8.8 8.8 12 12l3.2-3.2" />
456
+ <path d="M4 14.5h4.2a2.1 2.1 0 0 1 1.6.75l1.1 1.25a1.4 1.4 0 0 0 1.05.5h.1a1.4 1.4 0 0 0 1.05-.5l1.1-1.25a2.1 2.1 0 0 1 1.6-.75H20" />
457
+ <path d="M4 14.5v3A1.5 1.5 0 0 0 5.5 19h13a1.5 1.5 0 0 0 1.5-1.5v-3" />
458
+ </template>
459
+
460
+ <!-- Edit -->
461
+ <template v-else-if="name === 'edit'">
462
+ <path d="M3 21l3.75-.75L19 8a2.12 2.12 0 0 0-3-3L3.75 17.25 3 21z" />
463
+ <path d="M14.5 6.5l3 3" />
464
+ </template>
465
+
466
+ <!-- Document flow -->
467
+ <template v-else-if="name === 'document-flow'">
468
+ <rect x="3.5" y="4" width="12.5" height="4.5" rx="1.35" />
469
+ <path d="M6.25 8.5v3.25a1.75 1.75 0 0 0 1.75 1.75H10" />
470
+ <path d="M10 13.5h1.75" />
471
+ <rect x="11.75" y="11.25" width="8.75" height="4.25" rx="1.25" />
472
+ <path d="M10 13.5v3.25A1.75 1.75 0 0 0 11.75 18H13.5" />
473
+ <rect x="13.5" y="15.75" width="7" height="4.25" rx="1.25" />
474
+ <path d="M5.75 5.75h4.5" />
475
+ <path d="M13.5 13.25h3.25" />
476
+ <path d="M15 17.75h2.75" />
477
+ </template>
478
+
479
+ <!-- Share -->
480
+ <template v-else-if="name === 'share'">
481
+ <circle cx="18" cy="5" r="2.2" />
482
+ <circle cx="6" cy="12" r="2.2" />
483
+ <circle cx="18" cy="19" r="2.2" />
484
+ <path d="M8 11 15.8 6.3" />
485
+ <path d="M8 13l7.8 4.7" />
486
+ </template>
487
+
488
+ <!-- More vertical -->
489
+ <template v-else-if="name === 'more-vertical'">
490
+ <circle cx="12" cy="5" r="1.45" fill="currentColor" stroke="none" />
491
+ <circle cx="12" cy="12" r="1.45" fill="currentColor" stroke="none" />
492
+ <circle cx="12" cy="19" r="1.45" fill="currentColor" stroke="none" />
493
+ </template>
494
+
495
+ <!-- Copy -->
496
+ <template v-else-if="name === 'copy'">
497
+ <rect x="9" y="9" width="10" height="11" rx="1.8" />
498
+ <path d="M7 15H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v1" />
499
+ </template>
500
+
501
+ <!-- Printer -->
502
+ <template v-else-if="name === 'printer'">
503
+ <path d="M7 8V4h10v4" />
504
+ <rect x="7" y="14" width="10" height="6.5" rx="1.3" />
505
+ <rect x="4" y="8" width="16" height="7.5" rx="2" />
506
+ <circle cx="17" cy="11.75" r="1" fill="currentColor" stroke="none" />
507
+ </template>
508
+
509
+ <!-- Save -->
510
+ <template v-else-if="name === 'save'">
511
+ <!-- floppy-ish -->
512
+ <path d="M5 3h12l4 4v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z" />
513
+ <path d="M7 3v6h10V3" />
514
+ <path d="M7 21v-7h10v7" />
515
+ </template>
516
+
517
+ <!-- Download -->
518
+ <template v-else-if="name === 'download'">
519
+ <path d="M12 4v10" />
520
+ <path d="M8.5 10.5 12 14l3.5-3.5" />
521
+ <path d="M4 18.5h16" />
522
+ </template>
523
+
524
+ <!-- Log out -->
525
+ <template v-else-if="name === 'log-out'">
526
+ <path d="M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h4" />
527
+ <path d="M14 16l4-4-4-4" />
528
+ <path d="M8 12h10" />
529
+ </template>
530
+ </svg>
531
+ </template>
532
+
533
+ <script setup lang="ts">
534
+ import type { NgbIconName } from './iconNames'
535
+
536
+ withDefaults(
537
+ defineProps<{
538
+ name: NgbIconName
539
+ size?: number
540
+ }>(),
541
+ {
542
+ size: 18,
543
+ },
544
+ )
545
+ </script>
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <div class="w-full">
3
+ <label v-if="label" class="block text-xs font-semibold text-ngb-muted mb-1">
4
+ {{ label }}
5
+ </label>
6
+ <input
7
+ :type="type"
8
+ :value="modelValue"
9
+ :placeholder="placeholder"
10
+ :disabled="disabled"
11
+ :readonly="readonly"
12
+ :title="title || undefined"
13
+ @input="$emit('update:modelValue', $event.target.value)"
14
+ :class="[inputClass, disabled ? 'opacity-60 cursor-not-allowed' : '']"
15
+ />
16
+ <div v-if="hint" class="mt-1 text-xs text-ngb-muted">{{ hint }}</div>
17
+ </div>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import { computed } from 'vue'
22
+
23
+ type InputVariant = 'default' | 'grid'
24
+
25
+ const props = withDefaults(defineProps<{
26
+ modelValue?: string | number
27
+ label?: string
28
+ hint?: string
29
+ placeholder?: string
30
+ type?: string
31
+ disabled?: boolean
32
+ readonly?: boolean
33
+ title?: string
34
+ variant?: InputVariant
35
+ }>(), {
36
+ modelValue: '',
37
+ label: '',
38
+ hint: '',
39
+ placeholder: '',
40
+ type: 'text',
41
+ disabled: false,
42
+ readonly: false,
43
+ title: '',
44
+ variant: 'default',
45
+ })
46
+
47
+ defineEmits<{
48
+ (e: 'update:modelValue', value: string): void
49
+ }>()
50
+
51
+ const inputClass = computed(() => {
52
+ if (props.variant === 'grid') {
53
+ return 'h-8 w-full rounded-none border border-transparent bg-transparent px-2 text-sm text-ngb-text placeholder:text-ngb-muted/70 ngb-focus'
54
+ }
55
+ return 'h-9 w-full rounded-[var(--ngb-radius)] border border-ngb-border bg-ngb-card px-3 text-sm text-ngb-text placeholder:text-ngb-muted/70 ngb-focus'
56
+ })
57
+ </script>