@frigear-nu/ui 0.0.0-stage → 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 (50) hide show
  1. package/README.md +5 -2
  2. package/dist/module.d.mts +5 -0
  3. package/dist/module.json +12 -0
  4. package/dist/module.mjs +52 -0
  5. package/dist/runtime/components/Admin/AdminPageHeader.d.vue.ts +21 -0
  6. package/dist/runtime/components/Admin/AdminPageHeader.vue +45 -0
  7. package/dist/runtime/components/Admin/AdminPageHeader.vue.d.ts +21 -0
  8. package/dist/runtime/components/App/AppPageHeader.d.vue.ts +23 -0
  9. package/dist/runtime/components/App/AppPageHeader.vue +58 -0
  10. package/dist/runtime/components/App/AppPageHeader.vue.d.ts +23 -0
  11. package/dist/runtime/components/ConfirmDialog.d.vue.ts +15 -0
  12. package/dist/runtime/components/ConfirmDialog.vue +32 -0
  13. package/dist/runtime/components/ConfirmDialog.vue.d.ts +15 -0
  14. package/dist/runtime/components/global/CurrencyInput.d.vue.ts +10 -0
  15. package/dist/runtime/components/global/CurrencyInput.vue +39 -0
  16. package/dist/runtime/components/global/CurrencyInput.vue.d.ts +10 -0
  17. package/dist/runtime/components/global/DateInput.d.vue.ts +17 -0
  18. package/dist/runtime/components/global/DateInput.vue +62 -0
  19. package/dist/runtime/components/global/DateInput.vue.d.ts +17 -0
  20. package/dist/runtime/components/global/IconInput.d.vue.ts +19 -0
  21. package/dist/runtime/components/global/IconInput.vue +194 -0
  22. package/dist/runtime/components/global/IconInput.vue.d.ts +19 -0
  23. package/dist/runtime/components/global/IntervalInput.d.vue.ts +10 -0
  24. package/dist/runtime/components/global/IntervalInput.vue +51 -0
  25. package/dist/runtime/components/global/IntervalInput.vue.d.ts +10 -0
  26. package/dist/runtime/components/global/MonacoCodeEditor.d.vue.ts +20 -0
  27. package/dist/runtime/components/global/MonacoCodeEditor.vue +79 -0
  28. package/dist/runtime/components/global/MonacoCodeEditor.vue.d.ts +20 -0
  29. package/dist/runtime/components/global/MoneyInput.d.vue.ts +25 -0
  30. package/dist/runtime/components/global/MoneyInput.vue +65 -0
  31. package/dist/runtime/components/global/MoneyInput.vue.d.ts +25 -0
  32. package/dist/runtime/components/global/SwitchToggle.d.vue.ts +10 -0
  33. package/dist/runtime/components/global/SwitchToggle.vue +9 -0
  34. package/dist/runtime/components/global/SwitchToggle.vue.d.ts +10 -0
  35. package/dist/runtime/components/global/TagInput.d.vue.ts +20 -0
  36. package/dist/runtime/components/global/TagInput.vue +15 -0
  37. package/dist/runtime/components/global/TagInput.vue.d.ts +20 -0
  38. package/dist/runtime/components/global/UrlInput.d.vue.ts +12 -0
  39. package/dist/runtime/components/global/UrlInput.vue +28 -0
  40. package/dist/runtime/components/global/UrlInput.vue.d.ts +12 -0
  41. package/dist/runtime/composables/index.d.ts +1 -0
  42. package/dist/runtime/composables/index.js +1 -0
  43. package/dist/runtime/composables/useConfirmDialog.d.ts +6 -0
  44. package/dist/runtime/composables/useConfirmDialog.js +11 -0
  45. package/dist/runtime/i18n/lang/da.json +25 -0
  46. package/dist/runtime/i18n/lang/en.json +25 -0
  47. package/dist/runtime/utils/table.d.ts +11 -0
  48. package/dist/runtime/utils/table.js +23 -0
  49. package/dist/types.d.mts +7 -0
  50. package/package.json +72 -3
@@ -0,0 +1,12 @@
1
+ type __VLS_ModelProps = {
2
+ modelValue?: string;
3
+ };
4
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ "update:modelValue": (value: string | undefined) => any;
6
+ success: (args_0: string) => any;
7
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
8
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
9
+ onSuccess?: ((args_0: string) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1 @@
1
+ export * from './useConfirmDialog.ts.js';
@@ -0,0 +1 @@
1
+ export * from "./useConfirmDialog.ts";
@@ -0,0 +1,6 @@
1
+ export interface ConfirmDialogOptions {
2
+ title: string;
3
+ description?: string;
4
+ confirmText?: string;
5
+ }
6
+ export declare const useConfirmDialog: () => (options: ConfirmDialogOptions) => Promise<boolean>;
@@ -0,0 +1,11 @@
1
+ import { LazyConfirmDialog } from "#components";
2
+ export const useConfirmDialog = () => {
3
+ const overlay = useOverlay();
4
+ return (options) => {
5
+ const modal = overlay.create(LazyConfirmDialog, {
6
+ destroyOnClose: true,
7
+ props: options
8
+ });
9
+ return modal.open();
10
+ };
11
+ };
@@ -0,0 +1,25 @@
1
+ {
2
+ "common": {
3
+ "or": "Eller",
4
+ "close": "Luk",
5
+ "information": "Information",
6
+ "back": "Tilbage",
7
+ "current": "Nuværende",
8
+ "visit": "Besøg",
9
+ "refresh": "Opdater",
10
+ "expiresIn": "Udløber om {time}s"
11
+ },
12
+ "actions": {
13
+ "selectFiles": "Vælg filer",
14
+ "removeAllFiles": "Fjern alle filer",
15
+ "view": "Vis",
16
+ "backTo": "Tilbage til",
17
+ "save": "Gem",
18
+ "select": "Vælg",
19
+ "change": "Skift",
20
+ "cancel": "Annullér"
21
+ },
22
+ "locale": {
23
+ "switch": "Vælg sprog (nu: {name})"
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "common": {
3
+ "or": "Or",
4
+ "close": "Close",
5
+ "information": "Information",
6
+ "back": "Back",
7
+ "current": "Current",
8
+ "visit": "Visit",
9
+ "refresh": "Refresh",
10
+ "expiresIn": "Expires in {time}s"
11
+ },
12
+ "actions": {
13
+ "selectFiles": "Select files",
14
+ "removeAllFiles": "Remove all files",
15
+ "view": "Show",
16
+ "backTo": "Back to",
17
+ "save": "Save",
18
+ "select": "Select",
19
+ "change": "Change",
20
+ "cancel": "Cancel"
21
+ },
22
+ "locale": {
23
+ "switch": "Choose language (now: {name})"
24
+ }
25
+ }
@@ -0,0 +1,11 @@
1
+ import type { TableColumn, DropdownMenuItem } from '@nuxt/ui';
2
+ import type { Row } from '@tanstack/vue-table';
3
+ export type ColumnDefinerProps<T, TData = TableColumn<T>> = Partial<Omit<TData, 'id'>> & Pick<TData, 'id'>;
4
+ export declare const defineColumn: <Type = unknown, TData = TableColumn<Type>>(columnDef: ColumnDefinerProps<Type, TData> | string) => TData;
5
+ type RowAction<T> = Omit<DropdownMenuItem, 'onSelect'> & {
6
+ onSelect: (row: Row<T>) => void | Promise<void>;
7
+ };
8
+ export declare const defineRowActions: <T>(row: Row<T>, action: RowAction<T>) => {
9
+ onSelect: () => void | Promise<void>;
10
+ };
11
+ export {};
@@ -0,0 +1,23 @@
1
+ import defu from "defu";
2
+ import { titleCase } from "scule";
3
+ export const defineColumn = (columnDef) => {
4
+ let def;
5
+ if (typeof columnDef !== "object") {
6
+ def = {
7
+ id: columnDef
8
+ };
9
+ } else {
10
+ def = columnDef;
11
+ }
12
+ return defu(def, {
13
+ id: crypto.randomUUID(),
14
+ header: def.id ? titleCase(def.id) : void 0,
15
+ cell: ({ row }) => row.original[def.id]
16
+ });
17
+ };
18
+ export const defineRowActions = (row, action) => {
19
+ return {
20
+ ...action,
21
+ onSelect: () => action.onSelect(row)
22
+ };
23
+ };
@@ -0,0 +1,7 @@
1
+ import type { NuxtModule } from '@nuxt/schema'
2
+
3
+ import type { default as Module } from './module.mjs'
4
+
5
+ export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
+
7
+ export { default } from './module.mjs'
package/package.json CHANGED
@@ -1,6 +1,75 @@
1
1
  {
2
2
  "name": "@frigear-nu/ui",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.0.4",
4
+ "description": "Shared UI components and composables for Frigear Nuxt applications, built on Nuxt UI.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/frigear-nu/frigear-nu.git",
9
+ "directory": "packages/ui"
10
+ },
11
+ "type": "module",
12
+ "private": false,
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/types.d.mts",
16
+ "import": "./dist/module.mjs",
17
+ "default": "./dist/module.mjs"
18
+ },
19
+ "./components/*": "./dist/runtime/components/global/*.vue",
20
+ "./composables": "./dist/runtime/composables/index.js",
21
+ "./composables/*": "./dist/runtime/composables/*.js"
22
+ },
23
+ "main": "./dist/module.mjs",
24
+ "workspaces": [
25
+ "playground"
26
+ ],
27
+ "files": [
28
+ "dist"
29
+ ],
30
+ "dependencies": {
31
+ "@nuxt/kit": "^4.6.0",
32
+ "@vueuse/core": "^13.5.0",
33
+ "cron-parser": "^5.10.0",
34
+ "defu": "^6.1.4",
35
+ "yaml": "^2.7.1",
36
+ "nuxt-monaco-editor": "^1.4.1",
37
+ "monaco-editor": "^0.56.0",
38
+ "@tanstack/vue-table": "^8.21.3",
39
+ "scule": "^1.3.0",
40
+ "tailwindcss": "^4.3.3"
41
+ },
42
+ "devDependencies": {
43
+ "@nuxt/ui": "^4.10.0",
44
+ "@frigear-nu/eslint-config": "0.0.0",
45
+ "eslint": "^10.8.1",
46
+ "nuxt": "^4.6.0",
47
+ "vitest": "^5.0.0",
48
+ "@nuxt/module-builder": "^1.0.3",
49
+ "typescript": "^6.0.3",
50
+ "vue-tsc": "^3.3.11",
51
+ "@nuxt/schema": "^4.6.0"
52
+ },
53
+ "peerDependencies": {
54
+ "@nuxt/ui": "^4.10.0",
55
+ "nuxt": "^3.0.0 || ^4.0.0",
56
+ "vue": "3.x"
57
+ },
58
+ "scripts": {
59
+ "postinstall": "nuxt-module-build build --stub && nuxt prepare",
60
+ "build": "nuxt-module-build build",
61
+ "dev:playground": "nuxt dev playground",
62
+ "build:playground": "nuxt build playground",
63
+ "lint": "eslint .",
64
+ "lint:fix": "eslint . --fix",
65
+ "test": "vitest run",
66
+ "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground"
67
+ },
68
+ "typesVersions": {
69
+ "*": {
70
+ ".": [
71
+ "./dist/types.d.mts"
72
+ ]
73
+ }
74
+ }
6
75
  }