orio-ui 0.1.0 → 1.0.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 (62) hide show
  1. package/nuxt.config.ts +10 -10
  2. package/package.json +12 -17
  3. package/src/module.ts +5 -5
  4. package/src/runtime/components/ControlElement.vue +2 -2
  5. package/src/runtime/components/DashedContainer.vue +1 -6
  6. package/src/runtime/components/Icon.vue +11 -11
  7. package/src/runtime/components/Input.vue +1 -6
  8. package/src/runtime/components/Modal.vue +1 -1
  9. package/src/runtime/components/Popover.vue +8 -1
  10. package/src/runtime/components/Selector.vue +22 -6
  11. package/src/runtime/components/Tag.vue +5 -1
  12. package/src/runtime/components/Textarea.vue +1 -6
  13. package/src/runtime/composables/index.ts +6 -1
  14. package/src/runtime/composables/useApi.ts +8 -2
  15. package/src/runtime/composables/useFuzzySearch.ts +3 -3
  16. package/src/runtime/composables/useModal.ts +3 -3
  17. package/src/runtime/index.ts +20 -20
  18. package/src/runtime/utils/icon-registry.ts +11 -11
  19. package/dist/module.cjs +0 -5
  20. package/dist/module.d.mts +0 -3
  21. package/dist/module.d.ts +0 -3
  22. package/dist/module.json +0 -12
  23. package/dist/module.mjs +0 -16
  24. package/dist/runtime/assets/css/animation.css +0 -1
  25. package/dist/runtime/assets/css/colors.css +0 -1
  26. package/dist/runtime/assets/css/cool-gradient-hover.css +0 -23
  27. package/dist/runtime/assets/css/main.css +0 -1
  28. package/dist/runtime/assets/css/scroll.css +0 -1
  29. package/dist/runtime/components/Button.vue +0 -102
  30. package/dist/runtime/components/CheckBox.vue +0 -93
  31. package/dist/runtime/components/ControlElement.vue +0 -39
  32. package/dist/runtime/components/DashedContainer.vue +0 -59
  33. package/dist/runtime/components/DatePicker.vue +0 -30
  34. package/dist/runtime/components/DateRangePicker.vue +0 -73
  35. package/dist/runtime/components/EmptyState.vue +0 -81
  36. package/dist/runtime/components/Icon.vue +0 -40
  37. package/dist/runtime/components/Input.vue +0 -48
  38. package/dist/runtime/components/LoadingSpinner.vue +0 -6
  39. package/dist/runtime/components/Modal.vue +0 -69
  40. package/dist/runtime/components/Popover.vue +0 -249
  41. package/dist/runtime/components/Selector.vue +0 -208
  42. package/dist/runtime/components/Tag.vue +0 -21
  43. package/dist/runtime/components/Textarea.vue +0 -53
  44. package/dist/runtime/components/view/Dates.vue +0 -59
  45. package/dist/runtime/components/view/Separator.vue +0 -26
  46. package/dist/runtime/components/view/Text.vue +0 -79
  47. package/dist/runtime/composables/index.d.ts +0 -4
  48. package/dist/runtime/composables/index.js +0 -4
  49. package/dist/runtime/composables/useApi.d.ts +0 -10
  50. package/dist/runtime/composables/useApi.js +0 -9
  51. package/dist/runtime/composables/useFuzzySearch.d.ts +0 -10
  52. package/dist/runtime/composables/useFuzzySearch.js +0 -22
  53. package/dist/runtime/composables/useModal.d.ts +0 -15
  54. package/dist/runtime/composables/useModal.js +0 -28
  55. package/dist/runtime/composables/useTheme.d.ts +0 -6
  56. package/dist/runtime/composables/useTheme.js +0 -23
  57. package/dist/runtime/index.d.ts +0 -20
  58. package/dist/runtime/index.js +0 -20
  59. package/dist/runtime/utils/icon-registry.d.ts +0 -2
  60. package/dist/runtime/utils/icon-registry.js +0 -26
  61. package/dist/types.d.mts +0 -7
  62. package/dist/types.d.ts +0 -7
@@ -1,4 +0,0 @@
1
- export { useApi } from "./useApi.js";
2
- export { useFuzzySearch } from "./useFuzzySearch.js";
3
- export { useModal } from "./useModal.js";
4
- export { useTheme } from "./useTheme.js";
@@ -1,10 +0,0 @@
1
- export type RequestBody = Record<string, unknown>;
2
- export type RequestMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
3
- export interface ApiOptions {
4
- method?: RequestMethod;
5
- body?: RequestBody;
6
- signal?: AbortSignal;
7
- query?: Record<string, unknown>;
8
- }
9
- export declare function useApi<T = unknown>(url: string): Promise<T>;
10
- export declare function useApi<T = unknown>(url: string, options: ApiOptions): Promise<T>;
@@ -1,9 +0,0 @@
1
- import { $fetch } from "ofetch";
2
- export async function useApi(url, options) {
3
- return await $fetch(url, {
4
- method: options?.method || "GET",
5
- body: options?.body,
6
- signal: options?.signal,
7
- query: options?.query
8
- });
9
- }
@@ -1,10 +0,0 @@
1
- import { type MaybeRef } from 'vue';
2
- import { useFuse, type FuseOptions } from '@vueuse/integrations/useFuse';
3
- /**
4
- * Search using Fuse.js fuzzy search
5
- * @param dataSource - Array of strings or objects to search
6
- * @param search - Search query string
7
- * @param options - Fuse.js options (e.g., { keys: ['name'] })
8
- */
9
- export declare function useFuzzySearch(dataSource: MaybeRef<string[]>, search: MaybeRef<string>): ReturnType<typeof useFuse>;
10
- export declare function useFuzzySearch<T extends object>(dataSource: MaybeRef<T[]>, search: MaybeRef<string>, options: FuseOptions<T>): ReturnType<typeof useFuse>;
@@ -1,22 +0,0 @@
1
- import { computed, unref } from "vue";
2
- import { useFuse } from "@vueuse/integrations/useFuse";
3
- export function useFuzzySearch(dataSource, search, options) {
4
- const isObjectArray = !!options;
5
- if (!isObjectArray) {
6
- const wrappedData = computed(() => {
7
- const data = unref(dataSource);
8
- return data.map((str) => ({ value: str }));
9
- });
10
- const { results } = useFuse(search, wrappedData, {
11
- fuseOptions: { keys: ["value"] },
12
- matchAllWhenSearchEmpty: true
13
- });
14
- return computed(() => results.value.map(({ item }) => item.value));
15
- } else {
16
- const { results } = useFuse(search, dataSource, {
17
- fuseOptions: options,
18
- matchAllWhenSearchEmpty: true
19
- });
20
- return computed(() => results.value.map(({ item }) => item));
21
- }
22
- }
@@ -1,15 +0,0 @@
1
- export interface OriginRect {
2
- x: number;
3
- y: number;
4
- width: number;
5
- height: number;
6
- }
7
- export interface ModalProps {
8
- show: Boolean;
9
- origin: OriginRect | null;
10
- 'onUpdate:show': (state: boolean) => void;
11
- }
12
- export declare function useModal(): {
13
- modalProps: import("vue").Ref<any, any>;
14
- openModal: (event?: MouseEvent) => void;
15
- };
@@ -1,28 +0,0 @@
1
- import { ref } from "vue";
2
- export function useModal() {
3
- const modalProps = ref({
4
- show: false,
5
- origin: null,
6
- "onUpdate:show": (state) => updateShow(state)
7
- });
8
- function updateShow(state) {
9
- modalProps.value.show = state;
10
- }
11
- function openModal(event) {
12
- modalProps.value.origin = null;
13
- if (!event) {
14
- modalProps.value.show = true;
15
- return;
16
- }
17
- const target = event.target;
18
- const rect = target.getBoundingClientRect();
19
- modalProps.value.origin = {
20
- x: rect.left,
21
- y: rect.top,
22
- width: rect.width,
23
- height: rect.height
24
- };
25
- modalProps.value.show = true;
26
- }
27
- return { modalProps, openModal };
28
- }
@@ -1,6 +0,0 @@
1
- export declare function useTheme(): {
2
- theme: import("@vueuse/shared").RemovableRef<string>;
3
- setTheme: (name: string) => void;
4
- mode: import("@vueuse/shared").RemovableRef<string>;
5
- setMode: (name: string) => void;
6
- };
@@ -1,23 +0,0 @@
1
- import { onMounted } from "vue";
2
- import { useLocalStorage } from "@vueuse/core";
3
- export function useTheme() {
4
- const theme = useLocalStorage("orio-theme", "navy");
5
- const mode = useLocalStorage("orio-mode", "dark");
6
- function setTheme(name) {
7
- theme.value = name;
8
- if (typeof document !== "undefined") {
9
- document.documentElement.setAttribute("data-theme", name);
10
- }
11
- }
12
- function setMode(name) {
13
- mode.value = name;
14
- if (typeof document !== "undefined") {
15
- document.documentElement.setAttribute("data-mode", name);
16
- }
17
- }
18
- onMounted(() => {
19
- setTheme(theme.value);
20
- setMode(mode.value);
21
- });
22
- return { theme, setTheme, mode, setMode };
23
- }
@@ -1,20 +0,0 @@
1
- export { default as Button } from './components/Button.vue.js';
2
- export { default as Input } from './components/Input.vue.js';
3
- export { default as Textarea } from './components/Textarea.vue.js';
4
- export { default as CheckBox } from './components/CheckBox.vue.js';
5
- export { default as DatePicker } from './components/DatePicker.vue.js';
6
- export { default as DateRangePicker } from './components/DateRangePicker.vue.js';
7
- export { default as Selector } from './components/Selector.vue.js';
8
- export { default as Tag } from './components/Tag.vue.js';
9
- export { default as Icon } from './components/Icon.vue.js';
10
- export { default as LoadingSpinner } from './components/LoadingSpinner.vue.js';
11
- export { default as Modal } from './components/Modal.vue.js';
12
- export { default as Popover } from './components/Popover.vue.js';
13
- export { default as EmptyState } from './components/EmptyState.vue.js';
14
- export { default as DashedContainer } from './components/DashedContainer.vue.js';
15
- export { default as ControlElement } from './components/ControlElement.vue.js';
16
- export { default as ViewText } from './components/view/Text.vue.js';
17
- export { default as ViewDates } from './components/view/Dates.vue.js';
18
- export { default as ViewSeparator } from './components/view/Separator.vue.js';
19
- export * from './composables/index.js';
20
- export { iconRegistry, type IconName } from './utils/icon-registry.js';
@@ -1,20 +0,0 @@
1
- export { default as Button } from "./components/Button.vue";
2
- export { default as Input } from "./components/Input.vue";
3
- export { default as Textarea } from "./components/Textarea.vue";
4
- export { default as CheckBox } from "./components/CheckBox.vue";
5
- export { default as DatePicker } from "./components/DatePicker.vue";
6
- export { default as DateRangePicker } from "./components/DateRangePicker.vue";
7
- export { default as Selector } from "./components/Selector.vue";
8
- export { default as Tag } from "./components/Tag.vue";
9
- export { default as Icon } from "./components/Icon.vue";
10
- export { default as LoadingSpinner } from "./components/LoadingSpinner.vue";
11
- export { default as Modal } from "./components/Modal.vue";
12
- export { default as Popover } from "./components/Popover.vue";
13
- export { default as EmptyState } from "./components/EmptyState.vue";
14
- export { default as DashedContainer } from "./components/DashedContainer.vue";
15
- export { default as ControlElement } from "./components/ControlElement.vue";
16
- export { default as ViewText } from "./components/view/Text.vue";
17
- export { default as ViewDates } from "./components/view/Dates.vue";
18
- export { default as ViewSeparator } from "./components/view/Separator.vue";
19
- export * from "./composables/index.js";
20
- export { iconRegistry } from "./utils/icon-registry.js";
@@ -1,2 +0,0 @@
1
- export declare const iconRegistry: Record<string, string>;
2
- export type IconName = keyof typeof iconRegistry;
@@ -1,26 +0,0 @@
1
- export const iconRegistry = {
2
- // Loading spinner (line-md:loading-loop)
3
- "loading-loop": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="2" r="0"><animate attributeName="r" begin="0" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="2" r="0" transform="rotate(45 12 12)"><animate attributeName="r" begin="0.125s" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="2" r="0" transform="rotate(90 12 12)"><animate attributeName="r" begin="0.25s" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="2" r="0" transform="rotate(135 12 12)"><animate attributeName="r" begin="0.375s" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="2" r="0" transform="rotate(180 12 12)"><animate attributeName="r" begin="0.5s" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="2" r="0" transform="rotate(225 12 12)"><animate attributeName="r" begin="0.625s" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="2" r="0" transform="rotate(270 12 12)"><animate attributeName="r" begin="0.75s" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle><circle cx="12" cy="2" r="0" transform="rotate(315 12 12)"><animate attributeName="r" begin="0.875s" calcMode="spline" dur="1s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"/></circle></svg>`,
4
- // Chevron down (mdi-light:chevron-down)
5
- "chevron-down": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6z"/></svg>`,
6
- // Chevron up
7
- "chevron-up": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"/></svg>`,
8
- // Edit (material-symbols:edit-sharp)
9
- "edit": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M3 21v-4.25L16.2 3.575q.3-.275.663-.425t.762-.15t.775.15t.65.45L20.425 5q.3.275.438.65T21 6.4q0 .4-.137.763t-.438.662L7.25 21zM17.6 7.8L19 6.4L17.6 5l-1.4 1.4z"/></svg>`,
10
- // Check / Checkmark
11
- "check": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"/></svg>`,
12
- // Plus / Add
13
- "plus": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></svg>`,
14
- // Calendar
15
- "calendar": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m0 16H5V10h14zm0-12H5V6h14zM7 12h5v5H7z"/></svg>`,
16
- // Close / X
17
- "close": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>`,
18
- // Search / Magnifying glass
19
- "search": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5A6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5S14 7.01 14 9.5S11.99 14 9.5 14"/></svg>`,
20
- // Upload
21
- "upload": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M9 16h6v-6h4l-7-7l-7 7h4zm-4 2h14v2H5z"/></svg>`,
22
- // Download
23
- "download": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M19 9h-4V3H9v6H5l7 7zM5 18v2h14v-2z"/></svg>`,
24
- // Delete / Trash
25
- "delete": `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12l1.41 1.41L13.41 14l2.12 2.12l-1.41 1.41L12 15.41l-2.12 2.12l-1.41-1.41L10.59 14zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"/></svg>`
26
- };
package/dist/types.d.mts DELETED
@@ -1,7 +0,0 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module.js'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module.js'
package/dist/types.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { NuxtModule } from '@nuxt/schema'
2
-
3
- import type { default as Module } from './module'
4
-
5
- export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
6
-
7
- export { default } from './module'