@quidgest/ui 0.16.4 → 0.16.5

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 (41) hide show
  1. package/dist/manifest/components.json +1 -0
  2. package/dist/ui.css +1 -1
  3. package/dist/ui.esm.js +2545 -2475
  4. package/dist/ui.js +24 -24
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +672 -662
  7. package/dist/ui.scss +2 -2
  8. package/esm/components/QDialog/QDialog.d.ts +5 -0
  9. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  10. package/esm/components/QDialog/QDialog.vue.js +66 -58
  11. package/esm/components/QDialog/QDialogProvider.d.ts +3 -0
  12. package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -0
  13. package/esm/components/QDialog/QDialogProvider.vue.js +26 -0
  14. package/esm/components/QDialog/QDialogProvider.vue2.js +4 -0
  15. package/esm/components/QDialog/index.d.ts +14 -1
  16. package/esm/components/QDialog/index.d.ts.map +1 -1
  17. package/esm/components/QDialog/index.js +6 -4
  18. package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
  19. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +26 -24
  20. package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
  21. package/esm/components/QTooltip/QTooltip.vue.js +47 -46
  22. package/esm/components/index.js +70 -69
  23. package/esm/composables/index.d.ts +2 -1
  24. package/esm/composables/index.d.ts.map +1 -1
  25. package/esm/composables/theme.js +3 -3
  26. package/esm/composables/useDialog/index.d.ts +69 -0
  27. package/esm/composables/useDialog/index.d.ts.map +1 -0
  28. package/esm/composables/useDialog/index.js +21 -0
  29. package/esm/composables/useDialog/types.d.ts +25 -0
  30. package/esm/composables/useDialog/types.d.ts.map +1 -0
  31. package/esm/composables/useDismissibleLayerStack/index.d.ts +14 -0
  32. package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -0
  33. package/esm/composables/useDismissibleLayerStack/index.js +32 -0
  34. package/esm/framework.d.ts.map +1 -1
  35. package/esm/framework.js +35 -31
  36. package/esm/index.d.ts +1 -0
  37. package/esm/index.js +4 -2
  38. package/esm/symbols/dismissibleLayer.d.ts +4 -0
  39. package/esm/symbols/dismissibleLayer.d.ts.map +1 -0
  40. package/esm/symbols/dismissibleLayer.js +4 -0
  41. package/package.json +1 -1
@@ -3,41 +3,41 @@ import { QBadge as Q } from "./QBadge/index.js";
3
3
  import { QBadgeIndicator as x } from "./QBadgeIndicator/index.js";
4
4
  import { QButton as i } from "./QButton/index.js";
5
5
  import { QButtonGroup as l } from "./QButtonGroup/index.js";
6
- import { QCard as d } from "./QCard/index.js";
6
+ import { QCard as n } from "./QCard/index.js";
7
7
  import { QCheckbox as s, QCheckboxLabel as L } from "./QCheckbox/index.js";
8
8
  import { QCollapsible as g } from "./QCollapsible/index.js";
9
9
  import { QColorPicker as P } from "./QColorPicker/index.js";
10
10
  import { QCombobox as T } from "./QCombobox/index.js";
11
11
  import { QDateTimePicker as G } from "./QDateTimePicker/index.js";
12
- import { QDialog as F } from "./QDialog/index.js";
13
- import { QDismissibleLayer as k } from "./QDismissibleLayer/index.js";
12
+ import { QDialog as y, QDialogProvider as D } from "./QDialog/index.js";
13
+ import { QDismissibleLayer as S } from "./QDismissibleLayer/index.js";
14
14
  import { QDivider as B } from "./QDivider/index.js";
15
- import { QDropdownMenu as w } from "./QDropdownMenu/index.js";
16
- import { QField as h } from "./QField/index.js";
17
- import { QFileUpload as M } from "./QFileUpload/index.js";
18
- import { QFocusTrap as U } from "./QFocusTrap/index.js";
19
- import { QCol as q, QContainer as z, QRow as E, QSpacer as H } from "./QGrid/index.js";
20
- import { QIcon as K, QIconFont as N, QIconImg as V, QIconSvg as W } from "./QIcon/index.js";
21
- import { QInputGroup as Y } from "./QInputGroup/index.js";
22
- import { QLabel as _ } from "./QLabel/index.js";
23
- import { QLineLoader as oo } from "./QLineLoader/index.js";
24
- import { QList as eo, QListItem as to, QListItemGroup as po } from "./QList/index.js";
25
- import { QMeter as mo } from "./QMeter/index.js";
26
- import { QOverlay as fo } from "./QOverlay/index.js";
27
- import { QPasswordField as ao } from "./QPasswordField/index.js";
28
- import { QPopover as no } from "./QPopover/index.js";
29
- import { QPropertyList as so, QPropertyListGroup as Lo, QPropertyListPanel as uo, QPropertyListRow as go } from "./QPropertyList/index.js";
30
- import { QRadioButton as Po, QRadioGroup as bo } from "./QRadioGroup/index.js";
31
- import { QSelect as Co } from "./QSelect/index.js";
15
+ import { QDropdownMenu as R } from "./QDropdownMenu/index.js";
16
+ import { QField as A } from "./QField/index.js";
17
+ import { QFileUpload as O } from "./QFileUpload/index.js";
18
+ import { QFocusTrap as j } from "./QFocusTrap/index.js";
19
+ import { QCol as z, QContainer as E, QRow as H, QSpacer as J } from "./QGrid/index.js";
20
+ import { QIcon as N, QIconFont as V, QIconImg as W, QIconSvg as X } from "./QIcon/index.js";
21
+ import { QInputGroup as Z } from "./QInputGroup/index.js";
22
+ import { QLabel as $ } from "./QLabel/index.js";
23
+ import { QLineLoader as ro } from "./QLineLoader/index.js";
24
+ import { QList as to, QListItem as po, QListItemGroup as Qo } from "./QList/index.js";
25
+ import { QMeter as xo } from "./QMeter/index.js";
26
+ import { QOverlay as io } from "./QOverlay/index.js";
27
+ import { QPasswordField as lo } from "./QPasswordField/index.js";
28
+ import { QPopover as co } from "./QPopover/index.js";
29
+ import { QPropertyList as Lo, QPropertyListGroup as uo, QPropertyListPanel as go, QPropertyListRow as Io } from "./QPropertyList/index.js";
30
+ import { QRadioButton as bo, QRadioGroup as To } from "./QRadioGroup/index.js";
31
+ import { QSelect as Go } from "./QSelect/index.js";
32
32
  import { QSidebar as yo } from "./QSidebar/index.js";
33
- import { QSkeletonLoader as So } from "./QSkeletonLoader/index.js";
34
- import { QSpinnerLoader as vo } from "./QSpinnerLoader/index.js";
35
- import { QTextArea as Do } from "./QTextArea/index.js";
36
- import { QTextField as Ro } from "./QTextField/index.js";
37
- import { QThemeProvider as Ao } from "./QThemeProvider/index.js";
38
- import { QToggle as Oo } from "./QToggle/index.js";
39
- import { QToggleGroup as jo, QToggleGroupItem as qo } from "./QToggleGroup/index.js";
40
- import { QTooltip as Eo } from "./QTooltip/index.js";
33
+ import { QSkeletonLoader as Fo } from "./QSkeletonLoader/index.js";
34
+ import { QSpinnerLoader as ko } from "./QSpinnerLoader/index.js";
35
+ import { QTextArea as wo } from "./QTextArea/index.js";
36
+ import { QTextField as ho } from "./QTextField/index.js";
37
+ import { QThemeProvider as Mo } from "./QThemeProvider/index.js";
38
+ import { QToggle as Uo } from "./QToggle/index.js";
39
+ import { QToggleGroup as qo, QToggleGroupItem as zo } from "./QToggleGroup/index.js";
40
+ import { QTooltip as Ho } from "./QTooltip/index.js";
41
41
  export {
42
42
  e as QAccordion,
43
43
  t as QAccordionItem,
@@ -45,53 +45,54 @@ export {
45
45
  x as QBadgeIndicator,
46
46
  i as QButton,
47
47
  l as QButtonGroup,
48
- d as QCard,
48
+ n as QCard,
49
49
  s as QCheckbox,
50
50
  L as QCheckboxLabel,
51
- q as QCol,
51
+ z as QCol,
52
52
  g as QCollapsible,
53
53
  P as QColorPicker,
54
54
  T as QCombobox,
55
- z as QContainer,
55
+ E as QContainer,
56
56
  G as QDateTimePicker,
57
- F as QDialog,
58
- k as QDismissibleLayer,
57
+ y as QDialog,
58
+ D as QDialogProvider,
59
+ S as QDismissibleLayer,
59
60
  B as QDivider,
60
- w as QDropdownMenu,
61
- h as QField,
62
- M as QFileUpload,
63
- U as QFocusTrap,
64
- K as QIcon,
65
- N as QIconFont,
66
- V as QIconImg,
67
- W as QIconSvg,
68
- Y as QInputGroup,
69
- _ as QLabel,
70
- oo as QLineLoader,
71
- eo as QList,
72
- to as QListItem,
73
- po as QListItemGroup,
74
- mo as QMeter,
75
- fo as QOverlay,
76
- ao as QPasswordField,
77
- no as QPopover,
78
- so as QPropertyList,
79
- Lo as QPropertyListGroup,
80
- uo as QPropertyListPanel,
81
- go as QPropertyListRow,
82
- Po as QRadioButton,
83
- bo as QRadioGroup,
84
- E as QRow,
85
- Co as QSelect,
61
+ R as QDropdownMenu,
62
+ A as QField,
63
+ O as QFileUpload,
64
+ j as QFocusTrap,
65
+ N as QIcon,
66
+ V as QIconFont,
67
+ W as QIconImg,
68
+ X as QIconSvg,
69
+ Z as QInputGroup,
70
+ $ as QLabel,
71
+ ro as QLineLoader,
72
+ to as QList,
73
+ po as QListItem,
74
+ Qo as QListItemGroup,
75
+ xo as QMeter,
76
+ io as QOverlay,
77
+ lo as QPasswordField,
78
+ co as QPopover,
79
+ Lo as QPropertyList,
80
+ uo as QPropertyListGroup,
81
+ go as QPropertyListPanel,
82
+ Io as QPropertyListRow,
83
+ bo as QRadioButton,
84
+ To as QRadioGroup,
85
+ H as QRow,
86
+ Go as QSelect,
86
87
  yo as QSidebar,
87
- So as QSkeletonLoader,
88
- H as QSpacer,
89
- vo as QSpinnerLoader,
90
- Do as QTextArea,
91
- Ro as QTextField,
92
- Ao as QThemeProvider,
93
- Oo as QToggle,
94
- jo as QToggleGroup,
95
- qo as QToggleGroupItem,
96
- Eo as QTooltip
88
+ Fo as QSkeletonLoader,
89
+ J as QSpacer,
90
+ ko as QSpinnerLoader,
91
+ wo as QTextArea,
92
+ ho as QTextField,
93
+ Mo as QThemeProvider,
94
+ Uo as QToggle,
95
+ qo as QToggleGroup,
96
+ zo as QToggleGroupItem,
97
+ Ho as QTooltip
97
98
  };
@@ -1,2 +1,3 @@
1
- export { useTheme, provideTheme } from './theme';
1
+ export { provideTheme, useTheme } from './theme';
2
+ export { useDialog } from './useDialog';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA"}
@@ -1,15 +1,15 @@
1
- import { inject as r, provide as c } from "vue";
1
+ import { provide as r, inject as c } from "vue";
2
2
  import { createThemeInstance as h } from "../utils/theme.js";
3
3
  const n = Symbol.for("q-theme");
4
4
  function s() {
5
- const e = r(n);
5
+ const e = c(n);
6
6
  if (!e)
7
7
  throw new Error("[Quidgest UI] Could not find theme instance");
8
8
  return e;
9
9
  }
10
10
  function u(e) {
11
11
  const o = s(), m = o.themes, t = h(e, m);
12
- return c(n, t), t;
12
+ return r(n, t), t;
13
13
  }
14
14
  export {
15
15
  n as ThemeSymbol,
@@ -0,0 +1,69 @@
1
+ import { QDialogProps } from '../../components/QDialog/types.ts';
2
+ /**
3
+ * Manager for dialog models
4
+ *
5
+ * @returns Dialog state and functions
6
+ */
7
+ export declare function useDialog(): {
8
+ addDialog: (props: QDialogProps, id?: string) => string;
9
+ removeDialog: (id: string) => void;
10
+ dialogs: {
11
+ id: string;
12
+ props: {
13
+ id?: string | undefined;
14
+ class?: string | unknown[] | undefined;
15
+ title?: string | undefined;
16
+ text?: string | undefined;
17
+ icon?: {
18
+ id?: string | undefined;
19
+ class?: string | unknown[] | undefined;
20
+ icon: string;
21
+ type?: "svg" | "font" | "img" | undefined;
22
+ size?: number | undefined;
23
+ color?: string | undefined;
24
+ } | undefined;
25
+ buttons?: {
26
+ id: string;
27
+ icon?: {
28
+ id?: string | undefined;
29
+ class?: string | unknown[] | undefined;
30
+ icon: string;
31
+ type?: "svg" | "font" | "img" | undefined;
32
+ size?: number | undefined;
33
+ color?: string | undefined;
34
+ } | undefined;
35
+ action?: {
36
+ (): void;
37
+ } | undefined;
38
+ props: {
39
+ id?: string | undefined;
40
+ class?: string | unknown[] | undefined;
41
+ label?: string | undefined;
42
+ variant?: import('../../components/QButton/types.ts').QButtonVariant | undefined;
43
+ color?: string | undefined;
44
+ disabled?: boolean | undefined;
45
+ borderless?: boolean | undefined;
46
+ elevated?: boolean | undefined;
47
+ block?: boolean | undefined;
48
+ loading?: boolean | undefined;
49
+ size?: import('../../components/QButton/types.ts').QButtonSize | undefined;
50
+ iconPos?: import('../../components/QButton/types.ts').QButtonIconPosition | undefined;
51
+ pill?: boolean | undefined;
52
+ };
53
+ }[] | undefined;
54
+ attach?: string | undefined;
55
+ inline?: boolean | undefined;
56
+ backdropBlur?: boolean | undefined;
57
+ dismissible?: boolean | undefined;
58
+ html?: boolean | undefined;
59
+ icons?: {
60
+ close: {
61
+ icon: string;
62
+ };
63
+ } | undefined;
64
+ size?: import('../../components/QDialog/types.ts').QDialogSize | undefined;
65
+ centerVertically?: boolean | undefined;
66
+ };
67
+ }[];
68
+ };
69
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AASrE;;;;GAIG;AACH,wBAAgB,SAAS;uBAQE,YAAY,OAAO,MAAM;uBAgBzB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYhC"}
@@ -0,0 +1,21 @@
1
+ import { reactive as s } from "vue";
2
+ import { useId as a } from "../uid.js";
3
+ const d = s({ dialogs: [] });
4
+ function c() {
5
+ function t(n, i) {
6
+ const o = a(i);
7
+ return d.dialogs.push({ id: o, props: n }), o;
8
+ }
9
+ function e(n) {
10
+ const i = d.dialogs.findIndex((o) => o.id === n);
11
+ i !== -1 && d.dialogs.splice(i, 1);
12
+ }
13
+ return {
14
+ ...d,
15
+ addDialog: t,
16
+ removeDialog: e
17
+ };
18
+ }
19
+ export {
20
+ c as useDialog
21
+ };
@@ -0,0 +1,25 @@
1
+ import { QDialogProps } from '../../components/QDialog/types.ts';
2
+ /**
3
+ * Represents an instance of a dialog component.
4
+ */
5
+ type DialogInstance = {
6
+ /**
7
+ * A unique identifier for the dialog instance.
8
+ */
9
+ id: string;
10
+ /**
11
+ * The properties applied to the dialog, conforming to `QDialogProps`.
12
+ */
13
+ props: QDialogProps;
14
+ };
15
+ /**
16
+ * Represents the state for dialog management.
17
+ */
18
+ export type State = {
19
+ /**
20
+ * An array containing the currently active dialog instances.
21
+ */
22
+ dialogs: DialogInstance[];
23
+ };
24
+ export {};
25
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAErE;;GAEG;AACH,KAAK,cAAc,GAAG;IACrB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IAEV;;OAEG;IACH,KAAK,EAAE,YAAY,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IACnB;;OAEG;IACH,OAAO,EAAE,cAAc,EAAE,CAAA;CACzB,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { Ref } from 'vue';
2
+ export type DismissibleLayerStack = {
3
+ layers: Ref<string[]>;
4
+ register(id: string): void;
5
+ unregister(id: string): void;
6
+ isTop(id: string): boolean;
7
+ };
8
+ export declare function useDismissibleLayerStack(): DismissibleLayerStack;
9
+ export declare function useDismissibleLayerStackItem(id: string): {
10
+ register: () => void;
11
+ unregister: () => void;
12
+ isTop: () => boolean;
13
+ };
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useDismissibleLayerStack/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAK9B,MAAM,MAAM,qBAAqB,GAAG;IACnC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,CAAA;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAA;CAC1B,CAAA;AAED,wBAAgB,wBAAwB,IAAI,qBAAqB,CAmBhE;AAED,wBAAgB,4BAA4B,CAAC,EAAE,EAAE,MAAM;;;;EActD"}
@@ -0,0 +1,32 @@
1
+ import { DismissibleLayerKey as u } from "../../symbols/dismissibleLayer.js";
2
+ import { inject as o, ref as a } from "vue";
3
+ function m() {
4
+ const e = a([]);
5
+ function i(s) {
6
+ e.value.push(s);
7
+ }
8
+ function t(s) {
9
+ const r = e.value.indexOf(s);
10
+ r !== -1 && e.value.splice(r, 1);
11
+ }
12
+ function n(s) {
13
+ return e.value[e.value.length - 1] === s;
14
+ }
15
+ return { layers: e, register: i, unregister: t, isTop: n };
16
+ }
17
+ function f(e) {
18
+ const i = o(u);
19
+ if (!i)
20
+ throw new Error(
21
+ "useDismissibleLayerStackItem must be used within a dismissible layer stack context."
22
+ );
23
+ return {
24
+ register: () => i.register(e),
25
+ unregister: () => i.unregister(e),
26
+ isTop: () => i.isTop(e)
27
+ };
28
+ }
29
+ export {
30
+ m as useDismissibleLayerStack,
31
+ f as useDismissibleLayerStackItem
32
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../src/framework.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAO,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAA;AAMrE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAEtC,gFAAgF;IAChF,MAAM,CAAC,EAAE,SAAS,CAAA;IAElB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,eAAoB,GAAG,MAAM,CAiBpE"}
1
+ {"version":3,"file":"framework.d.ts","sourceRoot":"","sources":["../src/framework.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAO,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAA;AAMrE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAEtC,gFAAgF;IAChF,MAAM,CAAC,EAAE,SAAS,CAAA;IAElB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACnB,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,eAAoB,GAAG,MAAM,CAqBpE"}
package/esm/framework.js CHANGED
@@ -1,44 +1,48 @@
1
- import { DEFAULTS_SYMBOL as c } from "./composables/defaults.js";
2
- import { ThemeSymbol as h } from "./composables/theme.js";
3
- import { defaultLightColorScheme as l, defaultDarkColorScheme as i } from "./templates/theme.js";
4
- import { ref as a, watch as f } from "vue";
5
- import { createThemeInstance as d, generateRootStyle as u } from "./utils/theme.js";
6
- function D(s = {}) {
7
- return { install: (o) => {
8
- const t = s.components || {};
9
- for (const n in t)
10
- o.component(n, t[n]);
11
- const e = s.defaults || {};
12
- o.provide(c, a(e)), p(o, s.themes);
1
+ import { DEFAULTS_SYMBOL as i } from "./composables/defaults.js";
2
+ import { ThemeSymbol as c } from "./composables/theme.js";
3
+ import { DismissibleLayerKey as h } from "./symbols/dismissibleLayer.js";
4
+ import { useDismissibleLayerStack as f } from "./composables/useDismissibleLayerStack/index.js";
5
+ import { defaultLightColorScheme as a, defaultDarkColorScheme as d } from "./templates/theme.js";
6
+ import { ref as r, watch as u } from "vue";
7
+ import { createThemeInstance as p, generateRootStyle as L } from "./utils/theme.js";
8
+ function q(m = {}) {
9
+ return { install: (t) => {
10
+ const s = m.components || {};
11
+ for (const n in s)
12
+ t.component(n, s[n]);
13
+ const e = m.defaults || {};
14
+ t.provide(i, r(e)), S(t, m.themes);
15
+ const l = f();
16
+ t.provide(h, l);
13
17
  } };
14
18
  }
15
- function p(s, m) {
16
- const o = [];
17
- let t;
18
- if (!m)
19
- t = "default", o.push({
20
- name: t,
19
+ function S(m, o) {
20
+ const t = [];
21
+ let s;
22
+ if (!o)
23
+ s = "default", t.push({
24
+ name: s,
21
25
  mode: "light",
22
- scheme: l
26
+ scheme: a
23
27
  });
24
28
  else
25
- for (const e of m.themes) {
26
- const r = { ...e.mode === "light" ? l : i, ...e.colors };
27
- o.push({
29
+ for (const e of o.themes) {
30
+ const n = { ...e.mode === "light" ? a : d, ...e.colors };
31
+ t.push({
28
32
  name: e.name,
29
33
  mode: e.mode,
30
- scheme: r
31
- }), e.name === m.defaultTheme && (t = e.name);
34
+ scheme: n
35
+ }), e.name === o.defaultTheme && (s = e.name);
32
36
  }
33
- if (t) {
34
- const e = a(t), n = d(e, o);
35
- u(o), f(n.name, S, { immediate: !0 }), s.provide(h, n);
37
+ if (s) {
38
+ const e = r(s), l = p(e, t);
39
+ L(t), u(l.name, y, { immediate: !0 }), m.provide(c, l);
36
40
  }
37
41
  }
38
- function S(s) {
39
- const m = document.documentElement, t = Array.from(m.classList).filter((e) => !e.startsWith("q-theme"));
40
- m.className = t.join(" "), m.classList.add(`q-theme--${s}`);
42
+ function y(m) {
43
+ const o = document.documentElement, s = Array.from(o.classList).filter((e) => !e.startsWith("q-theme"));
44
+ o.className = s.join(" "), o.classList.add(`q-theme--${m}`);
41
45
  }
42
46
  export {
43
- D as createFramework
47
+ q as createFramework
44
48
  };
package/esm/index.d.ts CHANGED
@@ -21,6 +21,7 @@ declare module '@vue/runtime-core' {
21
21
  QCombobox: typeof import('@quidgest/ui/components')['QCombobox']
22
22
  QDateTimePicker: typeof import('@quidgest/ui/components')['QDateTimePicker']
23
23
  QDialog: typeof import('@quidgest/ui/components')['QDialog']
24
+ QDialogProvider: typeof import('@quidgest/ui/components')['QDialogProvider']
24
25
  QDismissibleLayer: typeof import('@quidgest/ui/components')['QDismissibleLayer']
25
26
  QDivider: typeof import('@quidgest/ui/components')['QDivider']
26
27
  QDropdownMenu: typeof import('@quidgest/ui/components')['QDropdownMenu']
package/esm/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  import * as m from "./templates/index.js";
2
2
  import * as r from "./components/index.js";
3
3
  import { createFramework as o } from "./framework.js";
4
- import { provideTheme as n, useTheme as c } from "./composables/theme.js";
4
+ import { provideTheme as n, useTheme as i } from "./composables/theme.js";
5
+ import { useDialog as x } from "./composables/useDialog/index.js";
5
6
  const a = (e = {}) => o({ components: r, ...e });
6
7
  export {
7
8
  r as components,
8
9
  a as createFramework,
9
10
  n as provideTheme,
10
11
  m as templates,
11
- c as useTheme
12
+ x as useDialog,
13
+ i as useTheme
12
14
  };
@@ -0,0 +1,4 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { DismissibleLayerStack } from '../composables/useDismissibleLayerStack';
3
+ export declare const DismissibleLayerKey: InjectionKey<DismissibleLayerStack>;
4
+ //# sourceMappingURL=dismissibleLayer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dismissibleLayer.d.ts","sourceRoot":"","sources":["../../src/symbols/dismissibleLayer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAA;AAEpF,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,qBAAqB,CAA8B,CAAA"}
@@ -0,0 +1,4 @@
1
+ const s = Symbol("DismissibleLayer");
2
+ export {
3
+ s as DismissibleLayerKey
4
+ };
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.16.4",
4
+ "version": "0.16.5",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "author": "Quidgest",