@quidgest/ui 0.17.9 → 0.19.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 (135) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/dist/json/api.json +302 -143
  3. package/dist/manifest/components.json +4 -1
  4. package/dist/ui.css +460 -167
  5. package/dist/ui.esm.js +618 -631
  6. package/dist/ui.js +490 -504
  7. package/dist/ui.min.css +1 -1
  8. package/dist/ui.min.js +490 -504
  9. package/dist/ui.scss +439 -167
  10. package/esm/components/QAccordion/QAccordionItem.vue.js +1 -0
  11. package/esm/components/QCarousel/QCarousel.vue.js +1 -1
  12. package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
  13. package/esm/components/QCheckbox/QCheckbox.vue.js +2 -0
  14. package/esm/components/QCollapsible/QCollapsible.d.ts +2 -1
  15. package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
  16. package/esm/components/QCollapsible/QCollapsible.vue.js +50 -47
  17. package/esm/components/QCollapsible/constants.d.ts +6 -0
  18. package/esm/components/QCollapsible/constants.d.ts.map +1 -1
  19. package/esm/components/QCollapsible/constants.js +3 -2
  20. package/esm/components/QCollapsible/index.d.ts +6 -0
  21. package/esm/components/QCollapsible/index.d.ts.map +1 -1
  22. package/esm/components/QCollapsible/types.d.ts +11 -1
  23. package/esm/components/QCollapsible/types.d.ts.map +1 -1
  24. package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
  25. package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +505 -597
  26. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +32 -16
  27. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
  28. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +179 -86
  29. package/esm/components/QDropdownMenu/types.d.ts +6 -0
  30. package/esm/components/QDropdownMenu/types.d.ts.map +1 -1
  31. package/esm/components/QField/types.d.ts +3 -0
  32. package/esm/components/QField/types.d.ts.map +1 -1
  33. package/esm/components/QGrid/QCol.vue.js +1 -1
  34. package/esm/components/QLabel/QLabel.d.ts.map +1 -1
  35. package/esm/components/QLabel/QLabel.vue.js +19 -17
  36. package/esm/components/QLabel/types.d.ts +3 -0
  37. package/esm/components/QLabel/types.d.ts.map +1 -1
  38. package/esm/components/{QGroupBox/QGroupBox.d.ts → QSection/QSection.d.ts} +4 -4
  39. package/esm/components/QSection/QSection.d.ts.map +1 -0
  40. package/esm/components/{QGroupBox/QGroupBox.vue.js → QSection/QSection.vue.js} +8 -8
  41. package/esm/components/QSection/QSection2.vue.js +5 -0
  42. package/esm/components/{QGroupBox → QSection}/index.d.ts +8 -8
  43. package/esm/components/QSection/index.d.ts.map +1 -0
  44. package/esm/components/QSection/index.js +6 -0
  45. package/esm/components/QSection/types.d.ts +32 -0
  46. package/esm/components/QSection/types.d.ts.map +1 -0
  47. package/esm/components/QSidebar/QSidebar.d.ts +53 -6
  48. package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
  49. package/esm/components/QSidebar/QSidebar.vue.js +76 -106
  50. package/esm/components/QSidebar/QSidebarAnchor.d.ts +24 -210
  51. package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
  52. package/esm/components/QSidebar/QSidebarAnchor.vue.js +47 -59
  53. package/esm/components/QSidebar/QSidebarItem.d.ts +213 -0
  54. package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -0
  55. package/esm/components/QSidebar/QSidebarItem.vue.js +130 -0
  56. package/esm/components/QSidebar/QSidebarItem2.vue.js +5 -0
  57. package/esm/components/QSidebar/QSidebarPanel.d.ts +1 -7
  58. package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
  59. package/esm/components/QSidebar/QSidebarPanel.vue.js +4 -10
  60. package/esm/components/QSidebar/context.d.ts +108 -0
  61. package/esm/components/QSidebar/context.d.ts.map +1 -0
  62. package/esm/components/QSidebar/context.js +4 -0
  63. package/esm/components/QSidebar/index.d.ts +166 -8
  64. package/esm/components/QSidebar/index.d.ts.map +1 -1
  65. package/esm/components/QSidebar/index.js +3 -2
  66. package/esm/components/QSidebar/types.d.ts +77 -42
  67. package/esm/components/QSidebar/types.d.ts.map +1 -1
  68. package/esm/components/QTabs/QTab.d.ts +173 -0
  69. package/esm/components/QTabs/QTab.d.ts.map +1 -0
  70. package/esm/components/QTabs/QTab.vue.js +123 -0
  71. package/esm/components/QTabs/QTab2.vue.js +5 -0
  72. package/esm/components/QTabs/QTabs.d.ts +37 -0
  73. package/esm/components/QTabs/QTabs.d.ts.map +1 -0
  74. package/esm/components/QTabs/QTabs.vue.js +162 -0
  75. package/esm/components/QTabs/QTabs2.vue.js +5 -0
  76. package/esm/components/QTabs/constants.d.ts +5 -0
  77. package/esm/components/QTabs/constants.d.ts.map +1 -0
  78. package/esm/components/QTabs/context.d.ts +85 -0
  79. package/esm/components/QTabs/context.d.ts.map +1 -0
  80. package/esm/components/QTabs/context.js +4 -0
  81. package/esm/components/QTabs/index.d.ts +166 -0
  82. package/esm/components/QTabs/index.d.ts.map +1 -0
  83. package/esm/components/QTabs/index.js +7 -0
  84. package/esm/components/QTabs/types.d.ts +108 -0
  85. package/esm/components/QTabs/types.d.ts.map +1 -0
  86. package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.d.ts +7 -0
  87. package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.d.ts.map +1 -0
  88. package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator.vue.js +24 -0
  89. package/esm/components/__internal__/QRequiredIndicator/QRequiredIndicator2.vue.js +5 -0
  90. package/esm/components/__internal__/QRequiredIndicator/constants.d.ts +7 -0
  91. package/esm/components/__internal__/QRequiredIndicator/constants.d.ts.map +1 -0
  92. package/esm/components/__internal__/QRequiredIndicator/constants.js +4 -0
  93. package/esm/components/__internal__/QRequiredIndicator/index.d.ts +6 -0
  94. package/esm/components/__internal__/QRequiredIndicator/index.d.ts.map +1 -0
  95. package/esm/components/__internal__/QRequiredIndicator/index.js +6 -0
  96. package/esm/components/__internal__/QRequiredIndicator/types.d.ts +18 -0
  97. package/esm/components/__internal__/QRequiredIndicator/types.d.ts.map +1 -0
  98. package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts +10 -0
  99. package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts.map +1 -0
  100. package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.vue.js +31 -0
  101. package/esm/components/__internal__/QSafeTriangle/QSafeTriangle2.vue.js +5 -0
  102. package/esm/components/__internal__/QSafeTriangle/index.d.ts +10 -0
  103. package/esm/components/__internal__/QSafeTriangle/index.d.ts.map +1 -0
  104. package/esm/components/__internal__/QSafeTriangle/index.js +6 -0
  105. package/esm/components/__internal__/QSafeTriangle/types.d.ts +33 -0
  106. package/esm/components/__internal__/QSafeTriangle/types.d.ts.map +1 -0
  107. package/esm/components/index.d.ts +2 -1
  108. package/esm/components/index.d.ts.map +1 -1
  109. package/esm/components/index.js +41 -37
  110. package/esm/composables/useSafeTriangle/index.d.ts +31 -0
  111. package/esm/composables/useSafeTriangle/index.d.ts.map +1 -0
  112. package/esm/composables/useSafeTriangle/index.js +87 -0
  113. package/esm/index.d.ts +4 -1
  114. package/esm/utils/date.d.ts +36 -1
  115. package/esm/utils/date.d.ts.map +1 -1
  116. package/esm/utils/date.js +90 -1
  117. package/esm/utils/index.d.ts +1 -0
  118. package/esm/utils/index.d.ts.map +1 -1
  119. package/esm/utils/index.js +30 -24
  120. package/esm/utils/mask.d.ts +17 -0
  121. package/esm/utils/mask.d.ts.map +1 -0
  122. package/esm/utils/mask.js +154 -0
  123. package/esm/utils/safeTriangle.d.ts +68 -0
  124. package/esm/utils/safeTriangle.d.ts.map +1 -0
  125. package/esm/utils/safeTriangle.js +83 -0
  126. package/package.json +7 -6
  127. package/esm/components/QGroupBox/QGroupBox.d.ts.map +0 -1
  128. package/esm/components/QGroupBox/QGroupBox2.vue.js +0 -5
  129. package/esm/components/QGroupBox/index.d.ts.map +0 -1
  130. package/esm/components/QGroupBox/index.js +0 -6
  131. package/esm/components/QGroupBox/types.d.ts +0 -32
  132. package/esm/components/QGroupBox/types.d.ts.map +0 -1
  133. package/esm/composables/useInputMask/index.d.ts +0 -50
  134. package/esm/composables/useInputMask/index.d.ts.map +0 -1
  135. package/esm/composables/useInputMask/index.js +0 -408
@@ -0,0 +1,154 @@
1
+ //#region src/utils/mask.ts
2
+ function e(e) {
3
+ return /[\p{L}\s.'-]/u.test(e);
4
+ }
5
+ function t(e, t) {
6
+ let n = t;
7
+ for (; n < e.length;) {
8
+ let t = e[n];
9
+ if (t === "!") {
10
+ n += 2;
11
+ continue;
12
+ }
13
+ if (t === "#" || t === "n" || t === "A" || t === "a" || t === "W" || t === "p") return n;
14
+ n += 1;
15
+ }
16
+ return -1;
17
+ }
18
+ function n(e, t) {
19
+ let n = t;
20
+ for (; n < e.length && e[n] === " ";) n += 1;
21
+ let r = "", i = n;
22
+ for (; i < e.length && /[A-Za-z]/.test(e[i] ?? "");) {
23
+ let t = (e[i] ?? "").toUpperCase();
24
+ if (r.length === 0) {
25
+ if (t === "A" || t === "P") {
26
+ r = `${t}M`, i += 1, i < e.length && (e[i] ?? "").toUpperCase() === "M" && (i += 1);
27
+ break;
28
+ }
29
+ } else if (r.length === 1 && t === "M") {
30
+ r += "M", i += 1;
31
+ break;
32
+ }
33
+ i += 1;
34
+ }
35
+ for (; i < e.length && /[A-Za-z]/.test(e[i] ?? "");) i += 1;
36
+ return {
37
+ consumed: i - t,
38
+ text: r
39
+ };
40
+ }
41
+ function r(t, n) {
42
+ let r = 0, i = 0;
43
+ for (; i < n.length;) {
44
+ let a = n[i];
45
+ if (a === "p") return r;
46
+ if (a === "!") {
47
+ let e = n[i + 1];
48
+ e && t[r] === e && (r += 1), i += 2;
49
+ continue;
50
+ }
51
+ if (a === "#" || a === "n") {
52
+ if (/\d/.test(t[r] ?? "")) {
53
+ r += 1, i += 1;
54
+ continue;
55
+ }
56
+ return -1;
57
+ }
58
+ if (a === "A" || a === "a") {
59
+ if (e(t[r] ?? "")) {
60
+ r += 1, i += 1;
61
+ continue;
62
+ }
63
+ return -1;
64
+ }
65
+ if (a === "W") {
66
+ let a = n[i + 1];
67
+ if (e(t[r] ?? "") && t[r] !== a) {
68
+ r += 1;
69
+ continue;
70
+ }
71
+ i += 1;
72
+ continue;
73
+ }
74
+ if (t[r] === a) {
75
+ r += 1, i += 1;
76
+ continue;
77
+ }
78
+ if (a === " " && n[i + 1] === "p") {
79
+ let e = t[r];
80
+ if ((e === void 0 || e === " " || /[A-Za-z]/.test(e)) && (i += 1, n[i] === "p")) return r;
81
+ }
82
+ return -1;
83
+ }
84
+ return -1;
85
+ }
86
+ function i(e, t, i) {
87
+ let a = r(e, t);
88
+ return a < 0 || i <= a ? "" : n(e.slice(0, i), a).text;
89
+ }
90
+ function a(e, t) {
91
+ let n = t.toUpperCase();
92
+ if (n === "AM" || n === "PM") return !1;
93
+ let r = e.toUpperCase();
94
+ return t ? n.length === 1 && (n === "A" || n === "P") ? r === "M" : !1 : r === "A" || r === "P";
95
+ }
96
+ function o(t, n) {
97
+ return n === "#" || n === "n" ? /\d/.test(t) : n === "p" ? a(t, "") : n === "A" || n === "a" || n === "W" ? e(t) : t === n;
98
+ }
99
+ function s(e, n, r, s, c) {
100
+ let l = t(n, r);
101
+ if (l < 0) return !1;
102
+ let u = n[l];
103
+ return !u || u === "!" ? !1 : u === "p" ? a(e, s !== void 0 && c !== void 0 ? i(s, n, c) : "") : o(e, u);
104
+ }
105
+ function c(t, r) {
106
+ let i = "", a = 0, o = 0;
107
+ for (; o < r.length && a < t.length;) {
108
+ let c = r[o], l = t[a];
109
+ if (c === "!") {
110
+ let e = r[o + 1];
111
+ if (!e) break;
112
+ l === e ? (i += e, a++) : i += e, o += 2;
113
+ continue;
114
+ }
115
+ if (c === "#") if (/\d/.test(l)) i += l, a++;
116
+ else {
117
+ a++;
118
+ continue;
119
+ }
120
+ else if (c === "n") /\d/.test(l) && (i += l, a++);
121
+ else if (c === "A" || c === "a") if (e(l)) i += c === "A" ? l.toUpperCase() : l.toLowerCase(), a++;
122
+ else {
123
+ a++;
124
+ continue;
125
+ }
126
+ else if (c === "p") {
127
+ let e = n(t, a);
128
+ if (e.consumed === 0) break;
129
+ a += e.consumed, e.text && (i += e.text), o++;
130
+ continue;
131
+ } else if (c === "W") {
132
+ let n = r[o + 1], s = !1;
133
+ for (; a < t.length;) {
134
+ let r = t[a];
135
+ if (n && r === n && s) break;
136
+ if (e(r)) {
137
+ i += r, a++, s = !0;
138
+ continue;
139
+ }
140
+ if (n && r === n) break;
141
+ a++;
142
+ }
143
+ } else if (l === c) i += c, a++;
144
+ else if (/\d/.test(l)) i += c;
145
+ else if (s(l, r, o + 1, t, a)) {
146
+ i += c, o++;
147
+ continue;
148
+ } else a++;
149
+ o++;
150
+ }
151
+ return i;
152
+ }
153
+ //#endregion
154
+ export { c as applyMask };
@@ -0,0 +1,68 @@
1
+ import { Placement } from '../composables/overlay';
2
+ export type SafeTriangleGeometry = {
3
+ left: number;
4
+ top: number;
5
+ width: number;
6
+ height: number;
7
+ path: string;
8
+ };
9
+ export type SafeTriangleVertices = {
10
+ a: {
11
+ x: number;
12
+ y: number;
13
+ };
14
+ b: {
15
+ x: number;
16
+ y: number;
17
+ };
18
+ c: {
19
+ x: number;
20
+ y: number;
21
+ };
22
+ };
23
+ export type Point = {
24
+ x: number;
25
+ y: number;
26
+ };
27
+ /**
28
+ * Returns whether a point lies inside an axis-aligned rectangle.
29
+ */
30
+ export declare function isPointInRect(x: number, y: number, rect: DOMRect): boolean;
31
+ /**
32
+ * Returns whether a point lies inside the triangle defined by three vertices.
33
+ */
34
+ export declare function isPointInTriangle(x: number, y: number, a: {
35
+ x: number;
36
+ y: number;
37
+ }, b: {
38
+ x: number;
39
+ y: number;
40
+ }, c: {
41
+ x: number;
42
+ y: number;
43
+ }): boolean;
44
+ /**
45
+ * Picks left/right safe-triangle placement from where the submenu actually sits
46
+ * relative to its parent (handles overlay flip).
47
+ */
48
+ export declare function resolveSafeTrianglePlacement(preferred: Placement, parentRect: DOMRect | null, contentRect: DOMRect | null): Placement;
49
+ /**
50
+ * Builds safe triangle vertices for a submenu placement.
51
+ */
52
+ export declare function getSafeTriangleVertices(placement: Placement, contentRect: DOMRect, cursorX: number, cursorY: number): SafeTriangleVertices | null;
53
+ /**
54
+ * Builds SVG geometry for the safe triangle overlay.
55
+ */
56
+ export declare function getSafeTriangleGeometry(placement: Placement, contentRect: DOMRect, cursorX: number, cursorY: number): SafeTriangleGeometry | null;
57
+ /**
58
+ * Returns whether the pointer is inside any submenu body nested under a menu panel.
59
+ */
60
+ export declare function isPointerInsideMenuTree(x: number, y: number, contentRoot: HTMLElement | null): boolean;
61
+ /**
62
+ * Returns whether the pointer can traverse toward an open submenu.
63
+ *
64
+ * @param apex - Frozen pointer position from the parent menu (exit / last in-parent point).
65
+ * Leave detection uses the triangle from this apex to the submenu edge — not the current cursor.
66
+ */
67
+ export declare function isPointerMovingTowardSubmenu(clientX: number, clientY: number, parentRect: DOMRect | null, contentRect: DOMRect | null, placement: Placement, apex: Point | null, contentRoot?: HTMLElement | null): boolean;
68
+ //# sourceMappingURL=safeTriangle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safeTriangle.d.ts","sourceRoot":"","sources":["../../src/utils/safeTriangle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACZ,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IAClC,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3B,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3B,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3B,CAAA;AAED,MAAM,MAAM,KAAK,GAAG;IACnB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACT,CAAA;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAE1E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAChC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3B,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3B,CAAC,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GACzB,OAAO,CAYT;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC3C,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,OAAO,GAAG,IAAI,EAC1B,WAAW,EAAE,OAAO,GAAG,IAAI,GACzB,SAAS,CASX;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACtC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACb,oBAAoB,GAAG,IAAI,CAmB7B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACtC,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACb,oBAAoB,GAAG,IAAI,CA0C7B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACtC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,WAAW,EAAE,WAAW,GAAG,IAAI,GAC7B,OAAO,CAMT;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,OAAO,GAAG,IAAI,EAC1B,WAAW,EAAE,OAAO,GAAG,IAAI,EAC3B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,KAAK,GAAG,IAAI,EAClB,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,GAC9B,OAAO,CAYT"}
@@ -0,0 +1,83 @@
1
+ //#region src/utils/safeTriangle.ts
2
+ function e(e, t, n) {
3
+ return e >= n.left && e <= n.right && t >= n.top && t <= n.bottom;
4
+ }
5
+ function t(e, t, n, r, i) {
6
+ let a = (e, t, n, r, i, a) => (e - i) * (r - a) - (n - i) * (t - a), o = a(e, t, n.x, n.y, r.x, r.y), s = a(e, t, r.x, r.y, i.x, i.y), c = a(e, t, i.x, i.y, n.x, n.y);
7
+ return !((o < 0 || s < 0 || c < 0) && (o > 0 || s > 0 || c > 0));
8
+ }
9
+ function n(e, t, n) {
10
+ if (!t || !n) return e;
11
+ let r = (t.left + t.right) / 2, i = (n.left + n.right) / 2 >= r ? "right" : "left", a = e.split("-")[1];
12
+ return a ? `${i}-${a}` : i;
13
+ }
14
+ function r(e, t, n, r) {
15
+ switch (e.split("-")[0]) {
16
+ case "right": return {
17
+ a: {
18
+ x: t.left,
19
+ y: t.top
20
+ },
21
+ b: {
22
+ x: t.left,
23
+ y: t.bottom
24
+ },
25
+ c: {
26
+ x: n,
27
+ y: r
28
+ }
29
+ };
30
+ case "left": return {
31
+ a: {
32
+ x: t.right,
33
+ y: t.top
34
+ },
35
+ b: {
36
+ x: t.right,
37
+ y: t.bottom
38
+ },
39
+ c: {
40
+ x: n,
41
+ y: r
42
+ }
43
+ };
44
+ default: return null;
45
+ }
46
+ }
47
+ function i(e, t, n, r) {
48
+ let i = e.split("-")[0];
49
+ if (i === "right") {
50
+ if (n >= t.left) return null;
51
+ let e = n, i = t.top, a = t.left - n, o = t.height;
52
+ return a <= 0 || o <= 0 ? null : {
53
+ left: e,
54
+ top: i,
55
+ width: a,
56
+ height: o,
57
+ path: `M 0, ${r - i} L ${a}, ${o} L ${a}, 0 z`
58
+ };
59
+ }
60
+ if (i === "left") {
61
+ if (n <= t.right) return null;
62
+ let e = t.right, i = t.top, a = n - t.right, o = t.height;
63
+ return a <= 0 || o <= 0 ? null : {
64
+ left: e,
65
+ top: i,
66
+ width: a,
67
+ height: o,
68
+ path: `M ${a}, ${r - i} L 0, ${o} L 0, 0 z`
69
+ };
70
+ }
71
+ return null;
72
+ }
73
+ function a(t, n, r) {
74
+ return r ? Array.from(r.querySelectorAll(".q-dropdown-menu__body")).some((r) => e(t, n, r.getBoundingClientRect())) : !1;
75
+ }
76
+ function o(n, i, o, s, c, l, u) {
77
+ if (o && e(n, i, o) || s && e(n, i, s) || u && a(n, i, u)) return !0;
78
+ if (!s || !l) return !1;
79
+ let d = r(c, s, l.x, l.y);
80
+ return d ? t(n, i, d.a, d.b, d.c) : !1;
81
+ }
82
+ //#endregion
83
+ export { i as getSafeTriangleGeometry, r as getSafeTriangleVertices, e as isPointInRect, t as isPointInTriangle, a as isPointerInsideMenuTree, o as isPointerMovingTowardSubmenu, n as resolveSafeTrianglePlacement };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@quidgest/ui",
3
3
  "description": "Quidgest's UI framework",
4
- "version": "0.17.9",
4
+ "version": "0.19.0",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",
@@ -20,6 +20,7 @@
20
20
  "style": "dist/ui.css",
21
21
  "sideEffects": false,
22
22
  "files": [
23
+ "CHANGELOG.md",
23
24
  "dist",
24
25
  "esm"
25
26
  ],
@@ -45,10 +46,10 @@
45
46
  },
46
47
  "devDependencies": {
47
48
  "@fortawesome/fontawesome-free": "^6.7.2",
48
- "@storybook/addon-docs": "^10.5.0-alpha.9",
49
- "@storybook/addon-links": "^10.5.0-alpha.9",
50
- "@storybook/vue3": "^10.5.0-alpha.9",
51
- "@storybook/vue3-vite": "^10.5.0-alpha.9",
49
+ "@storybook/addon-docs": "^10.6.0-alpha.7",
50
+ "@storybook/addon-links": "^10.6.0-alpha.7",
51
+ "@storybook/vue3": "^10.6.0-alpha.7",
52
+ "@storybook/vue3-vite": "^10.6.0-alpha.7",
52
53
  "@vitejs/plugin-vue": "^6.0.7",
53
54
  "@vue/test-utils": "^2.4.6",
54
55
  "acorn": "^8.15.0",
@@ -56,7 +57,7 @@
56
57
  "autoprefixer": "^10.4.20",
57
58
  "cssnano": "^7.0.6",
58
59
  "postcss": "^8.5.1",
59
- "storybook": "^10.5.0-alpha.9",
60
+ "storybook": "^10.6.0-alpha.7",
60
61
  "terser": "^5.44.0",
61
62
  "vite": "^8.1.0",
62
63
  "vite-plugin-dts": "^4.5.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"QGroupBox.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QGroupBox/QGroupBox.vue"],"names":[],"mappings":"AAcA;AA6CC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,GAAG,CAAA;AA+BxC,iBAAS,cAAc;WAkCT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;wFAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,5 +0,0 @@
1
- import e from "./QGroupBox.vue.js";
2
- //#region src/components/QGroupBox/QGroupBox.vue
3
- var t = e;
4
- //#endregion
5
- export { t as default };
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QGroupBox/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;EAA8B,CAAA;AAG7C,OAAO,EAAE,SAAS,EAAE,CAAA;AAGpB,cAAc,SAAS,CAAA"}
@@ -1,6 +0,0 @@
1
- import { setupPropsProxy as e } from "../../utils/setupPropsProxy.js";
2
- import t from "./QGroupBox2.vue.js";
3
- //#region src/components/QGroupBox/index.ts
4
- var n = e(t);
5
- //#endregion
6
- export { n as QGroupBox };
@@ -1,32 +0,0 @@
1
- import { QBaseComponentProps } from '../../types/component';
2
- /**
3
- * QGroupBox visual style variants.
4
- */
5
- export type QGroupBoxVariant = 'default' | 'background' | 'minor' | 'minor-border-top' | 'title-background';
6
- export type QGroupBoxProps = QBaseComponentProps & {
7
- /**
8
- * The title of the group box.
9
- *
10
- * @category Content
11
- */
12
- title?: string;
13
- /**
14
- * If true, the group box has no borders.
15
- *
16
- * @category Presentation
17
- */
18
- borderless?: boolean;
19
- /**
20
- * The styling variant of the group box.
21
- *
22
- * @category Presentation
23
- */
24
- variant?: QGroupBoxVariant;
25
- /**
26
- * If true, the group box spans the full width of its container.
27
- *
28
- * @category Presentation
29
- */
30
- block?: boolean;
31
- };
32
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QGroupBox/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACzB,SAAS,GACT,YAAY,GACZ,OAAO,GACP,kBAAkB,GAClB,kBAAkB,CAAA;AAErB,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IAClD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAA;IAE1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CACf,CAAA"}
@@ -1,50 +0,0 @@
1
- type MaskPatternSource = string | (() => string);
2
- /**
3
- * Composable for handling input masking on text inputs.
4
- * Attaches `input` and `keydown` handlers to enforce a mask pattern.
5
- * @param getInputEl Getter for the input element reference to bind events to.
6
- * @param maskPattern Mask grammar string or getter from `convertDatePatternToMask`.
7
- */
8
- export declare function useInputMask(getInputEl: () => HTMLInputElement | null | undefined, maskPattern: MaskPatternSource): void;
9
- /**
10
- * Applies a mask pattern to an input value.
11
- * The mask supports:
12
- * - `#` / `n`: single numeric digit
13
- * - `A`: single alphabetic character, normalized to uppercase
14
- * - `a`: single alphabetic character, normalized to lowercase
15
- * - `p`: meridiem token (`AM` or `PM` only)
16
- * - `W`: variable-width alphabetic segment
17
- * - any other character: fixed separator/literal
18
- * @param value Raw user input.
19
- * @param maskPattern Mask to apply.
20
- * @returns Masked value normalized to the provided pattern.
21
- * @example
22
- * applyMask('1234567', '##/##/####') => '12/34/567'
23
- */
24
- export declare function applyMask(value: string, maskPattern: string): string;
25
- /**
26
- * Maps a cursor index from a source string to the equivalent position in a masked value.
27
- * Counts alphanumeric content so auto-inserted separators do not desync the caret.
28
- * @param sourceValue Value before masking or normalization.
29
- * @param targetValue Value after masking or normalization.
30
- * @param sourceCursor Cursor index in the source value.
31
- * @returns Cursor index in the target value.
32
- */
33
- export declare function resolveCursorPosition(sourceValue: string, targetValue: string, sourceCursor: number): number;
34
- /**
35
- * Clamps fully-typed numeric segments to valid ranges for the provided format.
36
- * @param value Masked user input.
37
- * @param format Date/time format pattern.
38
- * @returns Input with out-of-range numeric segments normalized.
39
- */
40
- export declare function clampNumericSegments(value: string, format: string): string;
41
- /**
42
- * Replaces the next editable character after `cursor` instead of inserting.
43
- * Keeps the masked value length unchanged when editing in the middle of existing text.
44
- */
45
- export declare function overwriteMaskedChar(value: string, cursor: number, char: string, visualMask: string[], maskPattern: string): {
46
- value: string;
47
- cursor: number;
48
- } | null;
49
- export {};
50
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useInputMask/index.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,GAAG,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAA;AAMhD;;;;;GAKG;AACH,wBAAgB,YAAY,CAC3B,UAAU,EAAE,MAAM,gBAAgB,GAAG,IAAI,GAAG,SAAS,EACrD,WAAW,EAAE,iBAAiB,QAwI9B;AAgBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CA6FpE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACpC,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GAClB,MAAM,CAgBR;AAyBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAoE1E;AA2JD;;;GAGG;AACH,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAAE,EACpB,WAAW,EAAE,MAAM,GACjB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA+B1C"}