@quidgest/ui 0.32.0 → 0.32.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 (68) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/json/api.json +198 -28
  3. package/dist/ui.css +291 -108
  4. package/dist/ui.esm.js +989 -966
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.scss +433 -105
  7. package/lib/components/QAlert/QAlert.d.ts.map +1 -1
  8. package/lib/components/QAlert/QAlert.vue.js +13 -3
  9. package/lib/components/QAlert/types.d.ts +12 -0
  10. package/lib/components/QAlert/types.d.ts.map +1 -1
  11. package/lib/components/QBadge/QBadge.d.ts.map +1 -1
  12. package/lib/components/QBadge/QBadge.vue.js +20 -12
  13. package/lib/components/QBadge/types.d.ts +11 -0
  14. package/lib/components/QBadge/types.d.ts.map +1 -1
  15. package/lib/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
  16. package/lib/components/QDateTimePicker/QDateTimePicker.vue.js +596 -574
  17. package/lib/components/QDefaultsProvider/QDefaultsProvider.vue.js +4 -2
  18. package/lib/components/QDefaultsProvider/types.d.ts +10 -0
  19. package/lib/components/QDefaultsProvider/types.d.ts.map +1 -1
  20. package/lib/components/QDrawer/QDrawer.d.ts.map +1 -1
  21. package/lib/components/QDrawer/QDrawer.vue.js +204 -201
  22. package/lib/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
  23. package/lib/components/QDropdownMenu/QDropdownMenuContent.vue.js +95 -83
  24. package/lib/components/QField/types.d.ts +4 -4
  25. package/lib/components/QGauge/QGauge.d.ts.map +1 -1
  26. package/lib/components/QGauge/QGauge.vue.js +149 -121
  27. package/lib/components/QGauge/types.d.ts +16 -1
  28. package/lib/components/QGauge/types.d.ts.map +1 -1
  29. package/lib/components/QInputGroup/QInputGroup.d.ts +8 -7
  30. package/lib/components/QInputGroup/QInputGroup.d.ts.map +1 -1
  31. package/lib/components/QInputGroup/QInputGroup.vue.js +82 -43
  32. package/lib/components/QLabel/QLabel.d.ts.map +1 -1
  33. package/lib/components/QLabel/QLabel.vue.js +1 -0
  34. package/lib/components/QList/QListItem.d.ts.map +1 -1
  35. package/lib/components/QList/QListItem.vue.js +39 -32
  36. package/lib/components/QMeter/types.d.ts +3 -0
  37. package/lib/components/QMeter/types.d.ts.map +1 -1
  38. package/lib/components/QOverlay/QOverlay.d.ts.map +1 -1
  39. package/lib/components/QOverlay/QOverlay.vue.js +88 -85
  40. package/lib/components/QPhoneField/QPhoneField.d.ts +6 -0
  41. package/lib/components/QPhoneField/QPhoneField.d.ts.map +1 -1
  42. package/lib/components/QPhoneField/QPhoneField.vue.js +1 -1
  43. package/lib/components/QPhoneField/index.d.ts +3 -0
  44. package/lib/components/QPhoneField/index.d.ts.map +1 -1
  45. package/lib/components/QProgress/QProgress.d.ts.map +1 -1
  46. package/lib/components/QProgress/QProgress.vue.js +66 -47
  47. package/lib/components/QProgress/types.d.ts +3 -0
  48. package/lib/components/QProgress/types.d.ts.map +1 -1
  49. package/lib/components/QRadioGroup/QRadioGroup.d.ts +1 -1
  50. package/lib/components/QRadioGroup/index.d.ts +3 -3
  51. package/lib/components/QSelect/QSelect.d.ts +6 -0
  52. package/lib/components/QSelect/QSelect.d.ts.map +1 -1
  53. package/lib/components/QSelect/index.d.ts +3 -0
  54. package/lib/components/QSelect/index.d.ts.map +1 -1
  55. package/lib/components/QToast/QToaster.d.ts.map +1 -1
  56. package/lib/components/QToast/QToaster.vue.js +61 -58
  57. package/lib/composables/defaults.d.ts +25 -1
  58. package/lib/composables/defaults.d.ts.map +1 -1
  59. package/lib/composables/defaults.js +15 -7
  60. package/lib/composables/useColor/index.d.ts +2 -0
  61. package/lib/composables/useColor/index.d.ts.map +1 -1
  62. package/lib/composables/useColor/index.js +25 -19
  63. package/lib/composables/useColor/types.d.ts +12 -0
  64. package/lib/composables/useColor/types.d.ts.map +1 -1
  65. package/lib/utils/bidi.d.ts +27 -0
  66. package/lib/utils/bidi.d.ts.map +1 -0
  67. package/lib/utils/bidi.js +15 -0
  68. package/package.json +1 -1
@@ -32,43 +32,49 @@ function b(e, t, r = n(e.background)) {
32
32
  return _(t, r);
33
33
  }
34
34
  function x(e, t) {
35
- let r = n(t.background);
36
- if (!e) return r;
37
- if (f(e)) return g(e), r;
38
- try {
39
- return n(C(e, t));
40
- } catch {
41
- return g(e), r;
35
+ if (e) {
36
+ if (f(e)) {
37
+ g(e);
38
+ return;
39
+ }
40
+ try {
41
+ return n(C(e, t));
42
+ } catch {
43
+ g(e);
44
+ return;
45
+ }
42
46
  }
43
47
  }
44
48
  function S(r, i) {
45
- let s = m(() => h(r)), c = p(), l = m(() => s.value ? d(s.value) : !1);
49
+ let l = m(() => h(r)), _ = p(), S = m(() => l.value ? d(l.value) : !1);
46
50
  return {
47
- isUtilityColor: l,
51
+ isUtilityColor: S,
48
52
  style: m(() => {
49
- let r = s.value;
53
+ let r = l.value;
50
54
  if (!r) return;
51
- if (!l.value && f(r)) {
55
+ if (!S.value && f(r)) {
52
56
  g(r);
53
57
  return;
54
58
  }
55
- let d = c.current.value.scheme, p = C(r, d), m;
59
+ let d = _.current.value.scheme, p = C(r, d), m;
56
60
  try {
57
61
  m = n(p);
58
62
  } catch {
59
63
  g(r);
60
64
  return;
61
65
  }
62
- let _ = y(r, l.value, d, m), S = h(i), w = x(S, d), T = b(d, m, w), E = T.hoverColor ?? p, D = S ? [w] : [w, n(d.container)], O = v(p, m, D, o), k = v(E, n(E), D, a), A = u(m, w);
66
+ let w = y(r, S.value, d, m), T = x(h(i), d), E = T ?? n(d.background), D = b(d, m, E), O = D.hoverColor ?? p, k = T ? [E] : [E, n(d.container)], A = v(p, m, k, o), j = v(O, n(O), k, a), M = u(m, E), N = s(m, E, c(o));
63
67
  return {
64
68
  mainColor: p,
65
69
  mainColorRgb: t(m),
66
- onMainColor: _,
67
- textColor: O,
68
- hoverTextColor: k,
69
- tintColor: e(A),
70
- tintColorRgb: t(A),
71
- ...T
70
+ onMainColor: w,
71
+ textColor: A,
72
+ hoverTextColor: j,
73
+ tintColor: e(M),
74
+ tintColorRgb: t(M),
75
+ surfaceColor: T && e(T),
76
+ tonalSurfaceColor: e(N),
77
+ ...D
72
78
  };
73
79
  })
74
80
  };
@@ -42,6 +42,18 @@ export interface QColorStyle {
42
42
  * The RGB representation of the tint color, to combine with an alpha channel.
43
43
  */
44
44
  tintColorRgb: string;
45
+ /**
46
+ * The `surface` passed to `useColor`, resolved against the scheme, for a component to pass on
47
+ * to what it renders. `undefined` without a surface, or with one that cannot be parsed (which
48
+ * warns once here, instead of again in each child).
49
+ */
50
+ surfaceColor?: string;
51
+ /**
52
+ * The tonal fill as the browser paints it: the color blended 12% over the surface, or over the
53
+ * theme background without one. `textColor` is measured on it, and so are the children of a
54
+ * tonal component, such as the buttons in a tonal `QAlert`.
55
+ */
56
+ tonalSurfaceColor: string;
45
57
  /**
46
58
  * Optional color to be used when the component is in hover state.
47
59
  * The main color moved away from the surface by `COLOR_SCHEME_DARKEN_AMOUNT`,
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useColor/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAA;IAEtB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAEpC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CAC3C"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useColor/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAA;IAEtB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;OAIG;IACH,iBAAiB,EAAE,MAAM,CAAA;IAEzB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAEpC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CAC3C"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Isolates a number left to right, as the `q-number` mixin does: in a right-to-left text, a plain
3
+ * `-10` shows as `10-`.
4
+ *
5
+ * @param text - The number, as text.
6
+ * @returns The number between LRI and PDI.
7
+ */
8
+ export declare function isolateLeftToRight(text: string): string;
9
+ /**
10
+ * Isolates a text in the direction of its first letter, as the `q-own-direction` mixin does:
11
+ * Arabic or Hebrew reads right to left, and a text with no letter, such as `-20%`, left to right.
12
+ *
13
+ * @param text - The text.
14
+ * @returns The text between FSI and PDI.
15
+ */
16
+ export declare function isolateFirstStrong(text: string): string;
17
+ /**
18
+ * The direction of a text from its first strong character, as `unicode-bidi: plaintext` and FSI
19
+ * find it: for SVG text, where WebKit honors neither, but does honor `direction`. Arabic or Hebrew
20
+ * reads right to left, and so does a text that starts with a right-to-left mark (RLM, ALM); a text
21
+ * with no letter or mark, such as `-20%`, reads left to right.
22
+ *
23
+ * @param text - The text.
24
+ * @returns `rtl` when its first letter or mark is right to left, else `ltr`.
25
+ */
26
+ export declare function firstStrongDirection(text: string): 'ltr' | 'rtl';
27
+ //# sourceMappingURL=bidi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bidi.d.ts","sourceRoot":"","sources":["../../src/utils/bidi.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAgBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAGhE"}
@@ -0,0 +1,15 @@
1
+ //#region src/utils/bidi.ts
2
+ var e = String.fromCodePoint(8294), t = String.fromCodePoint(8296), n = String.fromCodePoint(8297);
3
+ function r(t) {
4
+ return `${e}${t}${n}`;
5
+ }
6
+ function i(e) {
7
+ return `${t}${e}${n}`;
8
+ }
9
+ var a = /[\p{L}\u200E\u200F\u061C]/u, o = /[\p{Script=Arabic}\p{Script=Hebrew}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Nko}\p{Script=Samaritan}\p{Script=Mandaic}\p{Script=Adlam}\p{Script=Hanifi_Rohingya}\u200F\u061C]/u;
10
+ function s(e) {
11
+ let t = a.exec(e)?.[0];
12
+ return t && o.test(t) ? "rtl" : "ltr";
13
+ }
14
+ //#endregion
15
+ export { s as firstStrongDirection, i as isolateFirstStrong, r as isolateLeftToRight };
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.32.0",
4
+ "version": "0.32.1",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",