@quidgest/ui 0.14.9 → 0.14.11

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 (47) hide show
  1. package/dist/manifest/components.json +1 -0
  2. package/dist/ui.css +30 -4
  3. package/dist/ui.esm.js +1228 -1028
  4. package/dist/ui.js +22 -22
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +90 -74
  7. package/dist/ui.scss +30 -5
  8. package/esm/components/QCombobox/QCombobox.d.ts +5 -0
  9. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  10. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +16 -0
  11. package/esm/components/QDropdownMenu/QDropdownMenu.d.ts.map +1 -0
  12. package/esm/components/QDropdownMenu/QDropdownMenu.vue.js +38 -0
  13. package/esm/components/QDropdownMenu/QDropdownMenu.vue2.js +4 -0
  14. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +148 -0
  15. package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -0
  16. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +153 -0
  17. package/esm/components/QDropdownMenu/QDropdownMenuContent.vue2.js +4 -0
  18. package/esm/components/QDropdownMenu/index.d.ts +4 -0
  19. package/esm/components/QDropdownMenu/index.d.ts.map +1 -0
  20. package/esm/components/QDropdownMenu/index.js +6 -0
  21. package/esm/components/QDropdownMenu/types.d.ts +95 -0
  22. package/esm/components/QDropdownMenu/types.d.ts.map +1 -0
  23. package/esm/components/QDropdownMenu/types.js +8 -0
  24. package/esm/components/QList/QList.d.ts +74 -0
  25. package/esm/components/QList/QList.d.ts.map +1 -1
  26. package/esm/components/QList/QList.vue.js +118 -100
  27. package/esm/components/QList/QListItem.d.ts +2 -0
  28. package/esm/components/QList/QListItem.d.ts.map +1 -1
  29. package/esm/components/QList/QListItem.vue.js +32 -30
  30. package/esm/components/QList/types.d.ts +0 -7
  31. package/esm/components/QList/types.d.ts.map +1 -1
  32. package/esm/components/QOverlay/QOverlay.d.ts +1 -0
  33. package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
  34. package/esm/components/QOverlay/QOverlay.vue.js +87 -82
  35. package/esm/components/QOverlay/types.d.ts +4 -0
  36. package/esm/components/QOverlay/types.d.ts.map +1 -1
  37. package/esm/components/QSelect/QSelect.d.ts +5 -0
  38. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  39. package/esm/components/index.d.ts +1 -0
  40. package/esm/components/index.d.ts.map +1 -1
  41. package/esm/components/index.js +44 -42
  42. package/esm/composables/overlay.d.ts +4 -0
  43. package/esm/composables/overlay.d.ts.map +1 -1
  44. package/esm/composables/overlay.js +69 -62
  45. package/esm/index.d.ts +1 -0
  46. package/package.json +2 -33
  47. /package/{LICENSE.md → LICENSE} +0 -0
@@ -1,130 +1,137 @@
1
- function M(t, i, n, e) {
2
- const d = (e == null ? void 0 : e.offset) ?? 0, o = (e == null ? void 0 : e.placement) ?? "bottom", u = t.getBoundingClientRect(), s = i.getBoundingClientRect(), g = n == null ? void 0 : n.getBoundingClientRect(), r = b(u, s, o, d), h = k(u, s, r), f = C(h, r, d), m = p(f, s, r);
3
- let a;
1
+ function $(t, i, n, e) {
2
+ const o = (e == null ? void 0 : e.offset) ?? 0, r = (e == null ? void 0 : e.crossOffset) ?? 0, g = (e == null ? void 0 : e.placement) ?? "bottom", s = t.getBoundingClientRect(), u = i.getBoundingClientRect(), d = n == null ? void 0 : n.getBoundingClientRect(), h = C(s, u, g, o), l = I(s, u, h), b = y(l, h, o), p = O(b, h, r), c = A(p, u, h);
3
+ let w;
4
4
  if (e != null && e.arrow) {
5
- if (!g)
5
+ if (!d)
6
6
  throw new Error("[Quidgest UI] The arrow element must exist to compute its position");
7
- a = A(m, u, s, g, r);
7
+ w = k(c, s, u, d, h);
8
8
  }
9
- return { overlayCoords: m, arrowCoords: a, placement: r };
9
+ return { overlayCoords: c, arrowCoords: w, placement: h };
10
10
  }
11
- function b(t, i, n, e) {
12
- const d = c(t, i, n, e);
13
- if (x(d)) {
14
- const o = w(n), s = {
11
+ function C(t, i, n, e) {
12
+ const o = a(t, i, n, e);
13
+ if (x(o)) {
14
+ const r = f(n), s = {
15
15
  top: "bottom",
16
16
  bottom: "top",
17
17
  left: "right",
18
18
  right: "left"
19
- }[o], g = c(
19
+ }[r], u = a(
20
20
  t,
21
21
  i,
22
22
  s,
23
23
  e
24
24
  );
25
- if (x(g))
25
+ if (x(u))
26
26
  return n;
27
- const r = O(n);
28
- return r ? `${s}-${r}` : s;
27
+ const d = S(n);
28
+ return d ? `${s}-${d}` : s;
29
29
  }
30
30
  return n;
31
31
  }
32
- function p(t, i, n) {
33
- const e = l(n), d = (u, s, g) => Math.min(Math.max(u, s), g), o = { ...t };
34
- return e === "x" ? o.x = d(t.x, 8, window.innerWidth - i.width - 8) : o.y = d(t.y, 8, window.innerHeight - i.height - 8), o;
32
+ function A(t, i, n) {
33
+ const e = m(n), o = (g, s, u) => Math.min(Math.max(g, s), u), r = { ...t };
34
+ return e === "x" ? r.x = o(t.x, 8, window.innerWidth - i.width - 8) : r.y = o(t.y, 8, window.innerHeight - i.height - 8), r;
35
35
  }
36
- function C(t, i, n) {
37
- const e = w(i);
36
+ function y(t, i, n) {
37
+ const e = f(i);
38
38
  return {
39
39
  x: t.x + (e === "left" ? -n : e === "right" ? n : 0),
40
40
  y: t.y + (e === "top" ? -n : e === "bottom" ? n : 0)
41
41
  };
42
42
  }
43
- function A(t, i, n, e, d) {
44
- if (l(d) === "y") {
45
- const u = i.top + i.height / 2, s = t.y + n.height / 2, g = s - u, r = n.height / 2 - g - e.height / 2 + 2;
46
- if (r > 0 && r < n.height - e.height)
43
+ function O(t, i, n) {
44
+ const e = f(i);
45
+ return {
46
+ x: t.x + (e === "top" || e === "bottom" ? n : 0),
47
+ y: t.y + (e === "right" || e === "left" ? n : 0)
48
+ };
49
+ }
50
+ function k(t, i, n, e, o) {
51
+ if (m(o) === "y") {
52
+ const g = i.top + i.height / 2, s = t.y + n.height / 2, u = s - g, d = n.height / 2 - u - e.height / 2 + 2;
53
+ if (d > 0 && d < n.height - e.height)
47
54
  return {
48
- y: r
55
+ y: d
49
56
  };
50
57
  } else {
51
- const u = i.left + i.width / 2, s = t.x + n.width / 2, g = s - u, r = n.width / 2 - g - e.width / 2 + 2;
52
- if (r > 0 && r < n.width - e.width)
58
+ const g = i.left + i.width / 2, s = t.x + n.width / 2, u = s - g, d = n.width / 2 - u - e.width / 2 + 2;
59
+ if (d > 0 && d < n.width - e.width)
53
60
  return {
54
- x: r
61
+ x: d
55
62
  };
56
63
  }
57
64
  }
58
- function k(t, i, n) {
59
- const [e, d] = n.split("-"), o = t.x + t.width / 2 - i.width / 2, u = t.y + t.height / 2 - i.height / 2;
65
+ function I(t, i, n) {
66
+ const [e, o] = n.split("-"), r = t.x + t.width / 2 - i.width / 2, g = t.y + t.height / 2 - i.height / 2;
60
67
  let s;
61
68
  switch (e) {
62
69
  case "top":
63
- s = { x: o, y: t.y - i.height };
70
+ s = { x: r, y: t.y - i.height };
64
71
  break;
65
72
  case "bottom":
66
- s = { x: o, y: t.y + t.height };
73
+ s = { x: r, y: t.y + t.height };
67
74
  break;
68
75
  case "left":
69
- s = { x: t.x - i.width, y: u };
76
+ s = { x: t.x - i.width, y: g };
70
77
  break;
71
78
  case "right":
72
- s = { x: t.x + t.width, y: u };
79
+ s = { x: t.x + t.width, y: g };
73
80
  break;
74
81
  default:
75
82
  throw new Error(`[Quidgest UI] Invalid placement value: ${n}`);
76
83
  }
77
- if (!d)
84
+ if (!o)
78
85
  return s;
79
- const r = l(n) === "y" ? "height" : "width", h = l(n), f = t[r] / 2 - i[r] / 2;
80
- switch (d) {
86
+ const d = m(n) === "y" ? "height" : "width", h = m(n), l = t[d] / 2 - i[d] / 2;
87
+ switch (o) {
81
88
  case "start":
82
- s[h] -= f;
89
+ s[h] -= l;
83
90
  break;
84
91
  case "end":
85
- s[h] += f;
92
+ s[h] += l;
86
93
  break;
87
94
  default:
88
- throw new Error(`[Quidgest UI] Invalid alignment value: ${d}`);
95
+ throw new Error(`[Quidgest UI] Invalid alignment value: ${o}`);
89
96
  }
90
97
  return s;
91
98
  }
92
- function c(t, i, n, e) {
93
- const d = w(n);
94
- let o = 0;
95
- switch (d) {
99
+ function a(t, i, n, e) {
100
+ const o = f(n);
101
+ let r = 0;
102
+ switch (o) {
96
103
  case "top":
97
- o = t.top - (i.height + e);
104
+ r = t.top - (i.height + e);
98
105
  break;
99
106
  case "bottom":
100
- o = window.innerHeight - t.bottom - (i.height + e);
107
+ r = window.innerHeight - t.bottom - (i.height + e);
101
108
  break;
102
109
  case "left":
103
- o = t.left - (i.width + e);
110
+ r = t.left - (i.width + e);
104
111
  break;
105
112
  case "right":
106
- o = window.innerWidth - t.right - (i.width + e);
113
+ r = window.innerWidth - t.right - (i.width + e);
107
114
  break;
108
115
  default:
109
- throw new Error(`[Quidgest UI] Invalid side value: ${d}`);
116
+ throw new Error(`[Quidgest UI] Invalid side value: ${o}`);
110
117
  }
111
- return o;
118
+ return r;
112
119
  }
113
- function y(t) {
120
+ function M(t) {
114
121
  return t === "x" ? "y" : "x";
115
122
  }
116
- function I(t) {
117
- const i = w(t);
123
+ function P(t) {
124
+ const i = f(t);
118
125
  return ["left", "right"].includes(i) ? "x" : "y";
119
126
  }
120
- function l(t) {
121
- return y(I(t));
127
+ function m(t) {
128
+ return M(P(t));
122
129
  }
123
- function w(t) {
130
+ function f(t) {
124
131
  const [i] = t.split("-");
125
132
  return i;
126
133
  }
127
- function O(t) {
134
+ function S(t) {
128
135
  const [, i] = t.split("-");
129
136
  return i;
130
137
  }
@@ -132,11 +139,11 @@ function x(t) {
132
139
  return t < 0;
133
140
  }
134
141
  export {
135
- M as computePosition,
136
- l as getAlignmentAxis,
137
- O as getAlignmentFromPlacement,
138
- I as getMainAxis,
139
- y as getOppositeAxis,
140
- w as getSideFromPlacement,
142
+ $ as computePosition,
143
+ m as getAlignmentAxis,
144
+ S as getAlignmentFromPlacement,
145
+ P as getMainAxis,
146
+ M as getOppositeAxis,
147
+ f as getSideFromPlacement,
141
148
  x as isOutOfBounds
142
149
  };
package/esm/index.d.ts CHANGED
@@ -17,6 +17,7 @@ declare module '@vue/runtime-core' {
17
17
  QCollapsible: typeof import('@quidgest/ui/components')['QCollapsible']
18
18
  QCombobox: typeof import('@quidgest/ui/components')['QCombobox']
19
19
  QDialog: typeof import('@quidgest/ui/components')['QDialog']
20
+ QDropdownMenu: typeof import('@quidgest/ui/components')['QDropdownMenu']
20
21
  QField: typeof import('@quidgest/ui/components')['QField']
21
22
  QIcon: typeof import('@quidgest/ui/components')['QIcon']
22
23
  QIconFont: typeof import('@quidgest/ui/components')['QIconFont']
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "@quidgest/ui",
3
3
  "description": "Quidgest's UI framework",
4
- "version": "0.14.9",
4
+ "version": "0.14.11",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",
8
8
  "license": "MIT",
9
- "engines": {
10
- "node": ">=22.0.0"
11
- },
12
9
  "keywords": [
13
10
  "vue",
14
11
  "component-library",
@@ -57,39 +54,18 @@
57
54
  "@storybook/theming": "^8.4.7",
58
55
  "@storybook/vue3": "^8.4.7",
59
56
  "@storybook/vue3-vite": "^8.4.7",
60
- "@tsconfig/node20": "^20.1.4",
61
- "@types/node": "^22.10.5",
62
- "@typescript-eslint/eslint-plugin": "^8.19.0",
63
- "@typescript-eslint/parser": "^8.19.0",
64
57
  "@vitejs/plugin-vue": "^5.2.1",
65
- "@vitest/coverage-v8": "^2.1.8",
66
- "@vitest/eslint-plugin": "^1.1.24",
67
- "@vitest/ui": "^2.1.8",
68
- "@vue/eslint-config-prettier": "^10.1.0",
69
- "@vue/eslint-config-typescript": "^14.2.0",
70
58
  "@vue/test-utils": "^2.4.6",
71
59
  "@vue/tsconfig": "^0.7.0",
72
60
  "acorn-walk": "^8.3.4",
73
61
  "autoprefixer": "^10.4.20",
74
62
  "cssnano": "^7.0.6",
75
- "eslint": "^9.17.0",
76
- "eslint-plugin-prettier": "^5.2.1",
77
- "eslint-plugin-storybook": "^0.11.2",
78
- "eslint-plugin-vue": "^9.32.0",
79
- "happy-dom": "^16.3.0",
80
- "husky": "^9.1.7",
81
- "lint-staged": "^15.3.0",
82
63
  "postcss": "^8.4.49",
83
- "prettier": "^3.4.2",
84
- "rimraf": "^6.0.1",
85
64
  "sass": "^1.83.1",
86
65
  "storybook": "^8.4.7",
87
- "stylelint": "^16.12.0",
88
- "stylelint-config-sass-guidelines": "^12.1.0",
89
66
  "typescript": "~5.6.3",
90
67
  "vite": "^6.0.7",
91
68
  "vite-plugin-dts": "^4.4.0",
92
- "vitest": "^2.1.8",
93
69
  "vue-eslint-parser": "^9.4.3",
94
70
  "vue-tsc": "^2.2.0"
95
71
  },
@@ -102,14 +78,7 @@
102
78
  "build:dist": "vite build",
103
79
  "build:esm": "node build/esm.js",
104
80
  "build:css": "node build/css.js",
105
- "type-check": "vue-tsc --noEmit -p tsconfig.dev.json --composite false",
106
- "format": "prettier . --check",
107
- "format:fix": "prettier . --write",
108
- "lint": "eslint --max-warnings 0 .",
109
- "lint:fix": "eslint . --fix",
110
- "lint:style": "stylelint \"**/*.scss\"",
111
- "test": "vitest",
112
- "test:coverage": "vitest run --coverage",
81
+ "type-check": "vue-tsc --noEmit --composite false",
113
82
  "storybook": "storybook dev -p 6006",
114
83
  "build:storybook": "storybook build"
115
84
  }
File without changes