orio-ui 1.0.1 → 1.0.2
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.
- package/README.md +9 -7
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +3 -0
- package/dist/module.d.ts +3 -0
- package/dist/module.json +12 -0
- package/dist/module.mjs +24 -0
- package/dist/runtime/assets/css/animation.css +1 -0
- package/dist/runtime/assets/css/colors.css +1 -0
- package/{src/runtime/assets/css/cool-gradient-hover.scss → dist/runtime/assets/css/cool-gradient-hover.css} +4 -14
- package/dist/runtime/assets/css/main.css +1 -0
- package/dist/runtime/assets/css/scroll.css +1 -0
- package/{src → dist}/runtime/components/Button.vue +38 -46
- package/dist/runtime/components/CheckBox.vue +93 -0
- package/{src → dist}/runtime/components/ControlElement.vue +13 -16
- package/{src → dist}/runtime/components/DashedContainer.vue +6 -7
- package/dist/runtime/components/DatePicker.vue +30 -0
- package/{src → dist}/runtime/components/DateRangePicker.vue +14 -15
- package/{src → dist}/runtime/components/EmptyState.vue +22 -28
- package/{src → dist}/runtime/components/Icon.vue +1 -12
- package/{src → dist}/runtime/components/Input.vue +18 -24
- package/{src → dist}/runtime/components/Modal.vue +1 -43
- package/{src → dist}/runtime/components/Popover.vue +1 -1
- package/{src → dist}/runtime/components/Selector.vue +36 -52
- package/dist/runtime/components/Tag.vue +21 -0
- package/{src → dist}/runtime/components/Textarea.vue +18 -24
- package/{src → dist}/runtime/components/view/Dates.vue +1 -3
- package/{src → dist}/runtime/components/view/Separator.vue +1 -5
- package/{src → dist}/runtime/components/view/Text.vue +38 -42
- package/dist/runtime/composables/index.d.ts +4 -0
- package/dist/runtime/composables/index.js +6 -0
- package/dist/runtime/composables/useApi.d.ts +10 -0
- package/dist/runtime/composables/useApi.js +9 -0
- package/dist/runtime/composables/useFuzzySearch.d.ts +10 -0
- package/dist/runtime/composables/useFuzzySearch.js +22 -0
- package/dist/runtime/composables/useModal.d.ts +15 -0
- package/dist/runtime/composables/useModal.js +28 -0
- package/dist/runtime/composables/useTheme.d.ts +6 -0
- package/dist/runtime/composables/useTheme.js +23 -0
- package/dist/runtime/index.d.ts +20 -0
- package/dist/runtime/index.js +20 -0
- package/dist/runtime/utils/icon-registry.d.ts +2 -0
- package/{src/runtime/utils/icon-registry.ts → dist/runtime/utils/icon-registry.js} +5 -20
- package/dist/types.d.mts +7 -0
- package/dist/types.d.ts +7 -0
- package/package.json +11 -15
- package/nuxt.config.ts +0 -38
- package/src/module.ts +0 -16
- package/src/runtime/assets/css/animation.css +0 -88
- package/src/runtime/assets/css/colors.css +0 -142
- package/src/runtime/assets/css/main.css +0 -11
- package/src/runtime/assets/css/scroll.css +0 -46
- package/src/runtime/components/CheckBox.vue +0 -103
- package/src/runtime/components/DatePicker.vue +0 -84
- package/src/runtime/components/Tag.vue +0 -49
- package/src/runtime/composables/index.ts +0 -9
- package/src/runtime/composables/useApi.ts +0 -32
- package/src/runtime/composables/useFuzzySearch.ts +0 -51
- package/src/runtime/composables/useModal.ts +0 -47
- package/src/runtime/composables/useTheme.ts +0 -31
- package/src/runtime/index.ts +0 -25
- /package/{src → dist}/runtime/components/LoadingSpinner.vue +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ref } from 'vue';
|
|
2
|
-
|
|
3
|
-
export interface OriginRect {
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
width: number;
|
|
7
|
-
height: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface ModalProps {
|
|
11
|
-
show: boolean;
|
|
12
|
-
origin: OriginRect | null;
|
|
13
|
-
'onUpdate:show': (state: boolean) => void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function useModal() {
|
|
17
|
-
const modalProps = ref<ModalProps>({
|
|
18
|
-
show: false,
|
|
19
|
-
origin: null,
|
|
20
|
-
'onUpdate:show': (state: boolean) => updateShow(state),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
function updateShow(state: boolean) {
|
|
24
|
-
modalProps.value.show = state;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function openModal(event?: MouseEvent) {
|
|
28
|
-
modalProps.value.origin = null;
|
|
29
|
-
if (!event) {
|
|
30
|
-
modalProps.value.show = true;
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const target = event.target as HTMLElement;
|
|
34
|
-
const rect = target.getBoundingClientRect();
|
|
35
|
-
|
|
36
|
-
modalProps.value.origin = {
|
|
37
|
-
x: rect.left,
|
|
38
|
-
y: rect.top,
|
|
39
|
-
width: rect.width,
|
|
40
|
-
height: rect.height,
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
modalProps.value.show = true;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return { modalProps, openModal };
|
|
47
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { onMounted } from 'vue';
|
|
2
|
-
import { useLocalStorage } from '@vueuse/core';
|
|
3
|
-
|
|
4
|
-
export function useTheme() {
|
|
5
|
-
// Namespace storage keys to avoid conflicts with consumer apps
|
|
6
|
-
const theme = useLocalStorage<string>('orio-theme', 'navy');
|
|
7
|
-
const mode = useLocalStorage<string>('orio-mode', 'dark');
|
|
8
|
-
|
|
9
|
-
function setTheme(name: string) {
|
|
10
|
-
theme.value = name;
|
|
11
|
-
// Only set DOM attributes on client side
|
|
12
|
-
if (typeof document !== 'undefined') {
|
|
13
|
-
document.documentElement.setAttribute('data-theme', name);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function setMode(name: string) {
|
|
18
|
-
mode.value = name;
|
|
19
|
-
// Only set DOM attributes on client side
|
|
20
|
-
if (typeof document !== 'undefined') {
|
|
21
|
-
document.documentElement.setAttribute('data-mode', name);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
onMounted(() => {
|
|
26
|
-
setTheme(theme.value);
|
|
27
|
-
setMode(mode.value);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return { theme, setTheme, mode, setMode };
|
|
31
|
-
}
|
package/src/runtime/index.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Export all components
|
|
2
|
-
export { default as Button } from './components/Button.vue';
|
|
3
|
-
export { default as Input } from './components/Input.vue';
|
|
4
|
-
export { default as Textarea } from './components/Textarea.vue';
|
|
5
|
-
export { default as CheckBox } from './components/CheckBox.vue';
|
|
6
|
-
export { default as DatePicker } from './components/DatePicker.vue';
|
|
7
|
-
export { default as DateRangePicker } from './components/DateRangePicker.vue';
|
|
8
|
-
export { default as Selector } from './components/Selector.vue';
|
|
9
|
-
export { default as Tag } from './components/Tag.vue';
|
|
10
|
-
export { default as Icon } from './components/Icon.vue';
|
|
11
|
-
export { default as LoadingSpinner } from './components/LoadingSpinner.vue';
|
|
12
|
-
export { default as Modal } from './components/Modal.vue';
|
|
13
|
-
export { default as Popover } from './components/Popover.vue';
|
|
14
|
-
export { default as EmptyState } from './components/EmptyState.vue';
|
|
15
|
-
export { default as DashedContainer } from './components/DashedContainer.vue';
|
|
16
|
-
export { default as ControlElement } from './components/ControlElement.vue';
|
|
17
|
-
export { default as ViewText } from './components/view/Text.vue';
|
|
18
|
-
export { default as ViewDates } from './components/view/Dates.vue';
|
|
19
|
-
export { default as ViewSeparator } from './components/view/Separator.vue';
|
|
20
|
-
|
|
21
|
-
// Export all composables
|
|
22
|
-
export * from './composables';
|
|
23
|
-
|
|
24
|
-
// Export utils
|
|
25
|
-
export { iconRegistry, type IconName } from './utils/icon-registry';
|
|
File without changes
|