@quidgest/ui 0.12.2 → 0.13.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 (43) hide show
  1. package/dist/manifest/components.json +2 -0
  2. package/dist/ui.css +166 -1
  3. package/dist/ui.esm.js +1045 -830
  4. package/dist/ui.js +6 -6
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +111 -93
  7. package/dist/ui.scss +122 -2
  8. package/esm/components/QBadge/QBadge.d.ts +72 -0
  9. package/esm/components/QBadge/QBadge.d.ts.map +1 -0
  10. package/esm/components/QBadge/QBadge.vue.js +87 -0
  11. package/esm/components/QBadge/QBadge.vue2.js +4 -0
  12. package/esm/components/QBadge/index.d.ts +119 -0
  13. package/esm/components/QBadge/index.d.ts.map +1 -0
  14. package/esm/components/QBadge/index.js +6 -0
  15. package/esm/components/QButton/index.d.ts +3 -0
  16. package/esm/components/QButton/index.d.ts.map +1 -1
  17. package/esm/components/QCombobox/QCombobox.d.ts +10 -10
  18. package/esm/components/QCombobox/index.d.ts +30 -30
  19. package/esm/components/QDialog/QDialog.d.ts +184 -0
  20. package/esm/components/QDialog/QDialog.d.ts.map +1 -0
  21. package/esm/components/QDialog/QDialog.vue.js +146 -0
  22. package/esm/components/QDialog/QDialog.vue2.js +4 -0
  23. package/esm/components/QDialog/index.d.ts +237 -0
  24. package/esm/components/QDialog/index.d.ts.map +1 -0
  25. package/esm/components/QDialog/index.js +6 -0
  26. package/esm/components/QList/index.d.ts +16 -16
  27. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  28. package/esm/components/QSelect/QSelect.vue.js +34 -34
  29. package/esm/components/QTextField/QTextField.d.ts +5 -5
  30. package/esm/components/QTextField/index.d.ts +11 -11
  31. package/esm/components/QTooltip/QTooltip.d.ts +15 -0
  32. package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
  33. package/esm/components/QTooltip/QTooltip.vue.js +44 -27
  34. package/esm/components/QTooltip/index.d.ts +20 -0
  35. package/esm/components/QTooltip/index.d.ts.map +1 -1
  36. package/esm/components/index.d.ts +2 -0
  37. package/esm/components/index.d.ts.map +1 -1
  38. package/esm/components/index.js +43 -39
  39. package/esm/index.d.ts +2 -0
  40. package/esm/utils/color.d.ts +7 -1
  41. package/esm/utils/color.d.ts.map +1 -1
  42. package/esm/utils/color.js +54 -9
  43. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import { Appearance, Placement, Trigger } from '../../composables/overlay';
2
2
  import { Selector } from '../../utils/getElement';
3
+ import { Icon } from '../QIcon';
3
4
 
4
5
  export type QTooltipProps = {
5
6
  /**
@@ -50,6 +51,10 @@ export type QTooltipProps = {
50
51
  * The text of the tooltip.
51
52
  */
52
53
  text: string;
54
+ /**
55
+ * The icon of the tooltip.
56
+ */
57
+ icon?: Icon;
53
58
  /**
54
59
  * The method to trigger the overlay.
55
60
  */
@@ -80,6 +85,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
80
85
  disabled: {
81
86
  type: import('vue').PropType<boolean>;
82
87
  };
88
+ icon: {
89
+ type: import('vue').PropType<Icon>;
90
+ default: undefined;
91
+ };
83
92
  id: {
84
93
  type: import('vue').PropType<string>;
85
94
  default: undefined;
@@ -132,6 +141,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
132
141
  disabled: {
133
142
  type: import('vue').PropType<boolean>;
134
143
  };
144
+ icon: {
145
+ type: import('vue').PropType<Icon>;
146
+ default: undefined;
147
+ };
135
148
  id: {
136
149
  type: import('vue').PropType<string>;
137
150
  default: undefined;
@@ -166,6 +179,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
166
179
  }>>, {
167
180
  class: string | unknown[];
168
181
  html: boolean;
182
+ icon: Icon;
169
183
  id: string;
170
184
  placement: Placement;
171
185
  appearance: Appearance;
@@ -179,6 +193,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
179
193
  'aria-describedby': string;
180
194
  };
181
195
  }): any;
196
+ default?(_: {}): any;
182
197
  }>;
183
198
  export default _default;
184
199
  type __VLS_WithTemplateSlots<T, S> = T & {
@@ -1 +1 @@
1
- {"version":3,"file":"QTooltip.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/QTooltip.vue"],"names":[],"mappings":"AA6BA;AASC,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,MAAM,EAAE,QAAQ,CAAA;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;CAC1B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoIF,wBAAwG;AAUxG,KAAK,uBAAuB,CAAC,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJF,wBAAwG;AAUxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -1,9 +1,10 @@
1
- import { defineComponent as i, mergeModels as s, useModel as c, openBlock as a, createElementBlock as t, Fragment as p, renderSlot as m, unref as l, createVNode as u, normalizeClass as f, withCtx as h, toDisplayString as y } from "vue";
2
- import { QOverlay as g } from "../QOverlay/index.js";
3
- import { useId as v } from "../../composables/uid.js";
4
- const _ = ["innerHTML"], b = { key: 1 }, k = /* @__PURE__ */ i({
1
+ import { defineComponent as s, mergeModels as p, useModel as m, openBlock as a, createElementBlock as o, Fragment as d, renderSlot as i, unref as t, createVNode as u, normalizeClass as f, withCtx as h, createBlock as y, normalizeProps as g, mergeProps as v, createCommentVNode as B, createTextVNode as b, toDisplayString as k } from "vue";
2
+ import { QOverlay as V } from "../QOverlay/index.js";
3
+ import { QIcon as w } from "../QIcon/index.js";
4
+ import { useId as x } from "../../composables/uid.js";
5
+ const M = ["innerHTML"], z = /* @__PURE__ */ s({
5
6
  __name: "QTooltip",
6
- props: /* @__PURE__ */ s({
7
+ props: /* @__PURE__ */ p({
7
8
  id: { default: void 0 },
8
9
  anchor: {},
9
10
  appearance: { default: "inverted" },
@@ -15,6 +16,7 @@ const _ = ["innerHTML"], b = { key: 1 }, k = /* @__PURE__ */ i({
15
16
  html: { type: Boolean, default: !0 },
16
17
  placement: { default: "right" },
17
18
  text: {},
19
+ icon: { default: void 0 },
18
20
  trigger: { default: "hover" },
19
21
  class: { default: void 0 }
20
22
  }, {
@@ -22,21 +24,21 @@ const _ = ["innerHTML"], b = { key: 1 }, k = /* @__PURE__ */ i({
22
24
  modelModifiers: {}
23
25
  }),
24
26
  emits: ["update:modelValue"],
25
- setup(o) {
26
- const e = o, n = c(o, "modelValue"), r = v(e.id);
27
- return (d, B) => (a(), t(
28
- p,
27
+ setup(l) {
28
+ const e = l, c = m(l, "modelValue"), r = x(e.id);
29
+ return (n, _) => (a(), o(
30
+ d,
29
31
  null,
30
32
  [
31
- m(d.$slots, "anchor", {
32
- props: { "aria-describedby": l(r) }
33
+ i(n.$slots, "anchor", {
34
+ props: { "aria-describedby": t(r) }
33
35
  }),
34
- u(l(g), {
35
- "model-value": n.value,
36
+ u(t(V), {
37
+ "model-value": c.value,
36
38
  anchor: e.anchor,
37
39
  role: "tooltip",
38
40
  "non-modal": "",
39
- id: l(r),
41
+ id: t(r),
40
42
  appearance: e.appearance,
41
43
  arrow: e.arrow,
42
44
  attach: e.attach,
@@ -48,19 +50,34 @@ const _ = ["innerHTML"], b = { key: 1 }, k = /* @__PURE__ */ i({
48
50
  trigger: e.trigger
49
51
  }, {
50
52
  default: h(() => [
51
- e.html ? (a(), t("span", {
52
- key: 0,
53
- innerHTML: e.text
54
- }, null, 8, _)) : (a(), t(
55
- "span",
56
- b,
57
- y(e.text),
58
- 1
59
- /* TEXT */
60
- ))
53
+ i(n.$slots, "default", {}, () => [
54
+ e.icon ? (a(), y(
55
+ t(w),
56
+ g(v({ key: 0 }, e.icon)),
57
+ null,
58
+ 16
59
+ /* FULL_PROPS */
60
+ )) : B("v-if", !0),
61
+ e.html ? (a(), o("span", {
62
+ key: 1,
63
+ innerHTML: e.text
64
+ }, null, 8, M)) : (a(), o(
65
+ d,
66
+ { key: 2 },
67
+ [
68
+ b(
69
+ k(e.text),
70
+ 1
71
+ /* TEXT */
72
+ )
73
+ ],
74
+ 64
75
+ /* STABLE_FRAGMENT */
76
+ ))
77
+ ])
61
78
  ]),
62
- _: 1
63
- /* STABLE */
79
+ _: 3
80
+ /* FORWARDED */
64
81
  }, 8, ["model-value", "anchor", "id", "appearance", "arrow", "attach", "inline", "class", "delay", "disabled", "placement", "trigger"])
65
82
  ],
66
83
  64
@@ -69,5 +86,5 @@ const _ = ["innerHTML"], b = { key: 1 }, k = /* @__PURE__ */ i({
69
86
  }
70
87
  });
71
88
  export {
72
- k as default
89
+ z as default
73
90
  };
@@ -20,6 +20,10 @@ declare const QTooltip: {
20
20
  disabled: {
21
21
  type: import('vue').PropType<boolean>;
22
22
  };
23
+ icon: {
24
+ type: import('vue').PropType<import('..').Icon>;
25
+ default: undefined;
26
+ };
23
27
  id: {
24
28
  type: import('vue').PropType<string>;
25
29
  default: undefined;
@@ -72,6 +76,10 @@ declare const QTooltip: {
72
76
  disabled: {
73
77
  type: import('vue').PropType<boolean>;
74
78
  };
79
+ icon: {
80
+ type: import('vue').PropType<import('..').Icon>;
81
+ default: undefined;
82
+ };
75
83
  id: {
76
84
  type: import('vue').PropType<string>;
77
85
  default: undefined;
@@ -106,6 +114,7 @@ declare const QTooltip: {
106
114
  }>>, {
107
115
  class: string | unknown[];
108
116
  html: boolean;
117
+ icon: import('..').Icon;
109
118
  id: string;
110
119
  placement: import('../../composables/overlay').Placement;
111
120
  appearance: import('../../composables/overlay').Appearance;
@@ -141,6 +150,10 @@ declare const QTooltip: {
141
150
  disabled: {
142
151
  type: import('vue').PropType<boolean>;
143
152
  };
153
+ icon: {
154
+ type: import('vue').PropType<import('..').Icon>;
155
+ default: undefined;
156
+ };
144
157
  id: {
145
158
  type: import('vue').PropType<string>;
146
159
  default: undefined;
@@ -175,6 +188,7 @@ declare const QTooltip: {
175
188
  }>>, {}, {}, {}, {}, {
176
189
  class: string | unknown[];
177
190
  html: boolean;
191
+ icon: import('..').Icon;
178
192
  id: string;
179
193
  placement: import('../../composables/overlay').Placement;
180
194
  appearance: import('../../composables/overlay').Appearance;
@@ -207,6 +221,10 @@ declare const QTooltip: {
207
221
  disabled: {
208
222
  type: import('vue').PropType<boolean>;
209
223
  };
224
+ icon: {
225
+ type: import('vue').PropType<import('..').Icon>;
226
+ default: undefined;
227
+ };
210
228
  id: {
211
229
  type: import('vue').PropType<string>;
212
230
  default: undefined;
@@ -241,6 +259,7 @@ declare const QTooltip: {
241
259
  }>>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
242
260
  class: string | unknown[];
243
261
  html: boolean;
262
+ icon: import('..').Icon;
244
263
  id: string;
245
264
  placement: import('../../composables/overlay').Placement;
246
265
  appearance: import('../../composables/overlay').Appearance;
@@ -255,6 +274,7 @@ declare const QTooltip: {
255
274
  'aria-describedby': string;
256
275
  };
257
276
  }): any;
277
+ default?(_: {}): any;
258
278
  };
259
279
  });
260
280
  export { QTooltip };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiD,CAAA;AAG/D,OAAO,EAAE,QAAQ,EAAE,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiD,CAAA;AAG/D,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,7 +1,9 @@
1
+ export * from './QBadge';
1
2
  export * from './QButton';
2
3
  export * from './QButtonGroup';
3
4
  export * from './QButtonToggle';
4
5
  export * from './QCombobox';
6
+ export * from './QDialog';
5
7
  export * from './QField';
6
8
  export * from './QIcon';
7
9
  export * from './QInputGroup';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA"}
@@ -1,41 +1,45 @@
1
- import { QButton as e } from "./QButton/index.js";
2
- import { QButtonGroup as p } from "./QButtonGroup/index.js";
3
- import { QButtonToggle as Q } from "./QButtonToggle/index.js";
4
- import { QCombobox as f } from "./QCombobox/index.js";
5
- import { QField as i } from "./QField/index.js";
6
- import { QIcon as l, QIconFont as u, QIconImg as L, QIconSvg as d } from "./QIcon/index.js";
7
- import { QInputGroup as a } from "./QInputGroup/index.js";
8
- import { QLineLoader as v } from "./QLineLoader/index.js";
9
- import { QList as T, QListItem as s, QListItemGroup as B } from "./QList/index.js";
10
- import { QOverlay as G } from "./QOverlay/index.js";
11
- import { QPopover as P } from "./QPopover/index.js";
12
- import { QSelect as k } from "./QSelect/index.js";
13
- import { QSkeletonLoader as C } from "./QSkeletonLoader/index.js";
14
- import { QSpinnerLoader as j } from "./QSpinnerLoader/index.js";
15
- import { QTextField as w } from "./QTextField/index.js";
16
- import { QThemeProvider as A } from "./QThemeProvider/index.js";
17
- import { QTooltip as E } from "./QTooltip/index.js";
1
+ import { QBadge as e } from "./QBadge/index.js";
2
+ import { QButton as p } from "./QButton/index.js";
3
+ import { QButtonGroup as Q } from "./QButtonGroup/index.js";
4
+ import { QButtonToggle as f } from "./QButtonToggle/index.js";
5
+ import { QCombobox as i } from "./QCombobox/index.js";
6
+ import { QDialog as I } from "./QDialog/index.js";
7
+ import { QField as u } from "./QField/index.js";
8
+ import { QIcon as a, QIconFont as g, QIconImg as c, QIconSvg as v } from "./QIcon/index.js";
9
+ import { QInputGroup as S } from "./QInputGroup/index.js";
10
+ import { QLineLoader as s } from "./QLineLoader/index.js";
11
+ import { QList as G, QListItem as b, QListItemGroup as P } from "./QList/index.js";
12
+ import { QOverlay as k } from "./QOverlay/index.js";
13
+ import { QPopover as C } from "./QPopover/index.js";
14
+ import { QSelect as O } from "./QSelect/index.js";
15
+ import { QSkeletonLoader as q } from "./QSkeletonLoader/index.js";
16
+ import { QSpinnerLoader as z } from "./QSpinnerLoader/index.js";
17
+ import { QTextField as E } from "./QTextField/index.js";
18
+ import { QThemeProvider as J } from "./QThemeProvider/index.js";
19
+ import { QTooltip as M } from "./QTooltip/index.js";
18
20
  export {
19
- e as QButton,
20
- p as QButtonGroup,
21
- Q as QButtonToggle,
22
- f as QCombobox,
23
- i as QField,
24
- l as QIcon,
25
- u as QIconFont,
26
- L as QIconImg,
27
- d as QIconSvg,
28
- a as QInputGroup,
29
- v as QLineLoader,
30
- T as QList,
31
- s as QListItem,
32
- B as QListItemGroup,
33
- G as QOverlay,
34
- P as QPopover,
35
- k as QSelect,
36
- C as QSkeletonLoader,
37
- j as QSpinnerLoader,
38
- w as QTextField,
39
- A as QThemeProvider,
40
- E as QTooltip
21
+ e as QBadge,
22
+ p as QButton,
23
+ Q as QButtonGroup,
24
+ f as QButtonToggle,
25
+ i as QCombobox,
26
+ I as QDialog,
27
+ u as QField,
28
+ a as QIcon,
29
+ g as QIconFont,
30
+ c as QIconImg,
31
+ v as QIconSvg,
32
+ S as QInputGroup,
33
+ s as QLineLoader,
34
+ G as QList,
35
+ b as QListItem,
36
+ P as QListItemGroup,
37
+ k as QOverlay,
38
+ C as QPopover,
39
+ O as QSelect,
40
+ q as QSkeletonLoader,
41
+ z as QSpinnerLoader,
42
+ E as QTextField,
43
+ J as QThemeProvider,
44
+ M as QTooltip
41
45
  };
package/esm/index.d.ts CHANGED
@@ -7,10 +7,12 @@ export * from './composables';
7
7
  //# sourceMappingURL=index.d.ts.map
8
8
  declare module '@vue/runtime-core' {
9
9
  export interface GlobalComponents {
10
+ QBadge: typeof import('@quidgest/ui/components')['QBadge']
10
11
  QButton: typeof import('@quidgest/ui/components')['QButton']
11
12
  QButtonGroup: typeof import('@quidgest/ui/components')['QButtonGroup']
12
13
  QButtonToggle: typeof import('@quidgest/ui/components')['QButtonToggle']
13
14
  QCombobox: typeof import('@quidgest/ui/components')['QCombobox']
15
+ QDialog: typeof import('@quidgest/ui/components')['QDialog']
14
16
  QField: typeof import('@quidgest/ui/components')['QField']
15
17
  QIcon: typeof import('@quidgest/ui/components')['QIcon']
16
18
  QIconFont: typeof import('@quidgest/ui/components')['QIconFont']
@@ -51,7 +51,13 @@ export type HSL = {
51
51
  * @param hexColorCode - The color code to validate.
52
52
  * @returns True if the color code is valid, false otherwise.
53
53
  */
54
- export declare function isHexColorCodeValid(hexColorCode: string): boolean;
54
+ export declare function isValidHex(hexColorCode: string): boolean;
55
+ /**
56
+ * Tries to parse a string in the format 'rgb(r, g, b)' to an RGB object.
57
+ * @param tr The input string to parse, expected in the format 'rgb(r, g, b)'.
58
+ * @returns An object containing parsed RGB values if the input string is valid, otherwise undefined.
59
+ */
60
+ export declare function tryParseRgb(str: string): RGB | undefined;
55
61
  /**
56
62
  * Parses a color from a hex string.
57
63
  * @param color A hex string representing the color, e.g., "#aabbcc".
@@ -1 +1 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/utils/color.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IAEzB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IAEjB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IAEnB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IAGnB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IAEd,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IAEjB,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CA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B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAU3D"}
@@ -1,14 +1,59 @@
1
- function i(t) {
1
+ function o(t) {
2
2
  return /^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/.test(t);
3
3
  }
4
- function a(t) {
5
- if (!i(t))
6
- throw new Error("Invalid color format");
7
- t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
8
- const e = parseInt(t.slice(1, 3), 16), n = parseInt(t.slice(3, 5), 16), s = parseInt(t.slice(5, 7), 16);
9
- return { r: e, g: n, b: s };
4
+ function u(t) {
5
+ const n = t.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
6
+ if (n) {
7
+ const s = parseInt(n[1], 10), e = parseInt(n[2], 10), r = parseInt(n[3], 10);
8
+ return { r: s, g: e, b: r };
9
+ }
10
+ }
11
+ function d(t) {
12
+ if (o(t)) {
13
+ t.length === 4 && (t = "#" + t[1] + t[1] + t[2] + t[2] + t[3] + t[3]);
14
+ const n = parseInt(t.slice(1, 3), 16), s = parseInt(t.slice(3, 5), 16), e = parseInt(t.slice(5, 7), 16);
15
+ return { r: n, g: s, b: e };
16
+ } else {
17
+ const n = u(t);
18
+ if (n)
19
+ return n;
20
+ }
21
+ throw new Error("Invalid color format");
22
+ }
23
+ function b(t) {
24
+ const n = t.r / 255, s = t.g / 255, e = t.b / 255, r = Math.max(n, s, e), i = Math.min(n, s, e);
25
+ let a = 0, f;
26
+ const h = (r + i) / 2;
27
+ if (r === i)
28
+ a = f = 0;
29
+ else {
30
+ const c = r - i;
31
+ switch (f = h > 0.5 ? c / (2 - r - i) : c / (r + i), r) {
32
+ case n:
33
+ a = (s - e) / c + (s < e ? 6 : 0);
34
+ break;
35
+ case s:
36
+ a = (e - n) / c + 2;
37
+ break;
38
+ case e:
39
+ a = (n - s) / c + 4;
40
+ break;
41
+ }
42
+ a /= 6;
43
+ }
44
+ return {
45
+ h: Math.round(a * 360),
46
+ s: Math.round(f * 100),
47
+ l: Math.round(h * 100)
48
+ };
49
+ }
50
+ function g(t) {
51
+ return t > 50 ? "#000" : "#fff";
10
52
  }
11
53
  export {
12
- i as isHexColorCodeValid,
13
- a as parseColor
54
+ g as getContrastingColor,
55
+ o as isValidHex,
56
+ d as parseColor,
57
+ b as rgbToHsl,
58
+ u as tryParseRgb
14
59
  };
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.12.2",
4
+ "version": "0.13.1",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",