v-uixy 1.3.1 → 1.5.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.
- package/package.json +1 -1
- package/templates/assets/css/main.css +4 -0
- package/templates/components/Alert/Alert.types.ts +4 -0
- package/templates/components/Alert/AlertItem.component.vue +2 -4
- package/templates/components/Alert/index.ts +6 -1
- package/templates/components/Avatar/Avatar.component.vue +7 -3
- package/templates/components/Avatar/Avatar.styles.ts +3 -3
- package/templates/components/Breadcrumb/Breadcrumb.component.vue +116 -0
- package/templates/components/Breadcrumb/Breadcrumb.styles.ts +40 -0
- package/templates/components/Breadcrumb/Breadcrumb.types.ts +30 -0
- package/templates/components/Breadcrumb/index.ts +17 -0
- package/templates/components/Button/Button.styles.ts +3 -3
- package/templates/components/Calendar/Calendar.component.vue +76 -17
- package/templates/components/Calendar/Calendar.styles.ts +15 -3
- package/templates/components/Calendar/Calendar.types.ts +9 -0
- package/templates/components/Chart/Chart.component.vue +308 -0
- package/templates/components/Chart/Chart.types.ts +18 -0
- package/templates/components/Chart/index.ts +13 -0
- package/templates/components/Checkbox/Checkbox.styles.ts +1 -1
- package/templates/components/ColorPicker/ColorPicker.component.vue +4 -4
- package/templates/components/Command/Command.component.vue +6 -6
- package/templates/components/Command/Command.types.ts +1 -0
- package/templates/components/DatePicker/DatePicker.component.vue +219 -0
- package/templates/components/DatePicker/DatePicker.styles.ts +74 -0
- package/templates/components/DatePicker/DatePicker.types.ts +18 -0
- package/templates/components/DatePicker/DatePicker.utils.ts +46 -0
- package/templates/components/DatePicker/TimeWheel.vue +145 -0
- package/templates/components/DatePicker/TimeWheelColumn.vue +147 -0
- package/templates/components/DatePicker/index.ts +11 -0
- package/templates/components/DateRangePicker/DateRangePicker.component.vue +304 -0
- package/templates/components/DateRangePicker/DateRangePicker.types.ts +23 -0
- package/templates/components/DateRangePicker/index.ts +11 -0
- package/templates/components/FileUpload/FileUpload.component.vue +306 -0
- package/templates/components/FileUpload/FileUpload.styles.ts +74 -0
- package/templates/components/FileUpload/FileUpload.types.ts +31 -0
- package/templates/components/FileUpload/index.ts +15 -0
- package/templates/components/Input/Input.component.vue +27 -27
- package/templates/components/Input/Input.styles.ts +5 -5
- package/templates/components/Input/Input.types.ts +1 -0
- package/templates/components/InputOTP/InputOTP.component.vue +4 -2
- package/templates/components/InputOTP/InputOTP.types.ts +1 -0
- package/templates/components/Modal/Modal.component.vue +28 -4
- package/templates/components/Modal/Modal.types.ts +3 -1
- package/templates/components/Popover/Popover.component.vue +33 -2
- package/templates/components/Popover/Popover.types.ts +1 -0
- package/templates/components/SegmentedControl/SegmentedControl.component.vue +85 -0
- package/templates/components/SegmentedControl/SegmentedControl.styles.ts +55 -0
- package/templates/components/SegmentedControl/SegmentedControl.types.ts +15 -0
- package/templates/components/SegmentedControl/index.ts +11 -0
- package/templates/components/Select/Select.component.vue +253 -108
- package/templates/components/Select/Select.styles.ts +6 -6
- package/templates/components/Select/Select.types.ts +12 -0
- package/templates/components/Select/SelectTreeItem.vue +154 -0
- package/templates/components/Select/composables/useSelect.composable.ts +260 -42
- package/templates/components/Tabs/Tabs.component.vue +11 -2
- package/templates/components/Tabs/Tabs.types.ts +1 -0
- package/templates/components/Textarea/Textarea.component.vue +23 -32
- package/templates/components/Textarea/Textarea.styles.ts +4 -4
- package/templates/components/Textarea/Textarea.types.ts +1 -0
- package/templates/components/TimePicker/TimePicker.component.vue +21 -18
- package/templates/components/TimePicker/TimePicker.styles.ts +1 -1
- package/templates/components/TimePicker/TimePicker.types.ts +1 -0
- package/templates/components.json +37 -1
- package/templates/composables/usePosition.ts +17 -2
|
@@ -39,12 +39,27 @@ export function usePosition({ direction = "bottom" }: UsePositionOptions) {
|
|
|
39
39
|
const tooltipRect = refElement.value.getBoundingClientRect();
|
|
40
40
|
const targetRect = target.value.getBoundingClientRect();
|
|
41
41
|
const winW = window.innerWidth;
|
|
42
|
+
const winH = window.innerHeight;
|
|
42
43
|
|
|
43
44
|
let top: number;
|
|
44
45
|
const scrollY = hasFixedParent(target.value) ? 0 : window.scrollY;
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
const spaceBelow = winH - targetRect.bottom;
|
|
48
|
+
const spaceAbove = targetRect.top;
|
|
49
|
+
const fitsBelow = spaceBelow >= tooltipRect.height + 6;
|
|
50
|
+
const fitsAbove = spaceAbove >= tooltipRect.height + 6;
|
|
51
|
+
|
|
52
|
+
const effectiveDirection =
|
|
47
53
|
direction === "top"
|
|
54
|
+
? fitsAbove || !fitsBelow
|
|
55
|
+
? "top"
|
|
56
|
+
: "bottom"
|
|
57
|
+
: fitsBelow || !fitsAbove
|
|
58
|
+
? "bottom"
|
|
59
|
+
: "top";
|
|
60
|
+
|
|
61
|
+
top =
|
|
62
|
+
effectiveDirection === "top"
|
|
48
63
|
? targetRect.top - tooltipRect.height - 6 + scrollY
|
|
49
64
|
: targetRect.bottom + 6 + scrollY;
|
|
50
65
|
|
|
@@ -80,7 +95,7 @@ export function usePosition({ direction = "bottom" }: UsePositionOptions) {
|
|
|
80
95
|
window.removeEventListener("resize", updatePosition);
|
|
81
96
|
}
|
|
82
97
|
},
|
|
83
|
-
{ flush: "post" }
|
|
98
|
+
{ flush: "post" },
|
|
84
99
|
);
|
|
85
100
|
|
|
86
101
|
onBeforeUnmount(() => {
|