@quidgest/ui 0.20.1 → 0.21.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 (151) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +10 -0
  3. package/dist/json/api.json +219 -3
  4. package/dist/manifest/components.json +1 -0
  5. package/dist/ui.css +239 -248
  6. package/dist/ui.esm.js +1306 -1139
  7. package/dist/ui.js +788 -621
  8. package/dist/ui.min.css +1 -1
  9. package/dist/ui.min.js +788 -621
  10. package/dist/ui.scss +291 -34
  11. package/esm/components/QAccordion/QAccordionItem.vue.js +1 -1
  12. package/esm/components/QBadge/QBadge.d.ts.map +1 -1
  13. package/esm/components/QBadge/QBadge.vue.js +20 -24
  14. package/esm/components/QButton/QButton.d.ts.map +1 -1
  15. package/esm/components/QButton/QButton.vue.js +32 -29
  16. package/esm/components/QCheckbox/QCheckbox.vue.js +1 -1
  17. package/esm/components/QDialog/QDialog.d.ts +4 -2
  18. package/esm/components/QDialog/QDialog.d.ts.map +1 -1
  19. package/esm/components/QDialog/QDialog.vue.js +84 -74
  20. package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
  21. package/esm/components/QDialog/QDialogProvider.vue.js +21 -12
  22. package/esm/components/QDialog/index.d.ts +72 -3
  23. package/esm/components/QDialog/index.d.ts.map +1 -1
  24. package/esm/components/QDialog/types.d.ts +10 -1
  25. package/esm/components/QDialog/types.d.ts.map +1 -1
  26. package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
  27. package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +9 -8
  28. package/esm/components/QDivider/QDivider.d.ts.map +1 -1
  29. package/esm/components/QDivider/QDivider.vue.js +3 -3
  30. package/esm/components/QFileUpload/QFileUpload.vue.js +1 -1
  31. package/esm/components/QGauge/QGauge.vue.js +1 -1
  32. package/esm/components/QList/QListItem.d.ts.map +1 -1
  33. package/esm/components/QList/QListItem.vue.js +5 -2
  34. package/esm/components/QList/QListItemGroup.vue.js +1 -1
  35. package/esm/components/QObfuscation/QObfuscation.d.ts +1 -1
  36. package/esm/components/QObfuscation/QObfuscation.d.ts.map +1 -1
  37. package/esm/components/QObfuscation/QObfuscation.vue.js +53 -56
  38. package/esm/components/QObfuscation/index.d.ts +6 -6
  39. package/esm/components/QObfuscation/types.d.ts +1 -1
  40. package/esm/components/QObfuscation/types.d.ts.map +1 -1
  41. package/esm/components/QOverflow/QOverflow.d.ts +43 -0
  42. package/esm/components/QOverflow/QOverflow.d.ts.map +1 -0
  43. package/esm/components/QOverflow/QOverflow.vue.js +281 -0
  44. package/esm/components/QOverflow/QOverflow2.vue.js +5 -0
  45. package/esm/components/QOverflow/constants.d.ts +30 -0
  46. package/esm/components/QOverflow/constants.d.ts.map +1 -0
  47. package/esm/components/QOverflow/constants.js +12 -0
  48. package/esm/components/QOverflow/index.d.ts +58 -0
  49. package/esm/components/QOverflow/index.d.ts.map +1 -0
  50. package/esm/components/QOverflow/index.js +6 -0
  51. package/esm/components/QOverflow/types.d.ts +119 -0
  52. package/esm/components/QOverflow/types.d.ts.map +1 -0
  53. package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
  54. package/esm/components/QPhoneField/QPhoneField.vue.js +1 -1
  55. package/esm/components/QPropertyList/QPropertyListGroup.vue.js +1 -1
  56. package/esm/components/QPropertyList/QPropertyListRow.vue.js +1 -1
  57. package/esm/components/QPropertyList/index.d.ts.map +1 -1
  58. package/esm/components/QRadioGroup/QRadioButton.vue.js +1 -1
  59. package/esm/components/QRadioGroup/QRadioGroup.vue.js +2 -2
  60. package/esm/components/QSelect/QSelect.d.ts.map +1 -1
  61. package/esm/components/QSelect/QSelect.vue.js +1 -1
  62. package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
  63. package/esm/components/QSidebar/QSidebar.vue.js +19 -10
  64. package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
  65. package/esm/components/QSidebar/QSidebarItem.vue.js +51 -49
  66. package/esm/components/QSidebar/context.d.ts +7 -0
  67. package/esm/components/QSidebar/context.d.ts.map +1 -1
  68. package/esm/components/QSwitch/QSwitch.vue.js +1 -1
  69. package/esm/components/QTabs/QTab.d.ts.map +1 -1
  70. package/esm/components/QTabs/QTab.vue.js +52 -50
  71. package/esm/components/QTabs/QTabs.d.ts.map +1 -1
  72. package/esm/components/QTabs/QTabs.vue.js +37 -12
  73. package/esm/components/QTabs/context.d.ts +7 -0
  74. package/esm/components/QTabs/context.d.ts.map +1 -1
  75. package/esm/components/QTextArea/QTextArea.vue.js +1 -1
  76. package/esm/components/QTextField/QTextField.d.ts.map +1 -1
  77. package/esm/components/QTextField/QTextField.vue.js +1 -1
  78. package/esm/components/QThemeProvider/QThemeProvider.vue.js +1 -1
  79. package/esm/components/QToast/QToast.d.ts +4 -2
  80. package/esm/components/QToast/QToast.d.ts.map +1 -1
  81. package/esm/components/QToast/QToast.vue.js +80 -67
  82. package/esm/components/QToast/QToaster.d.ts.map +1 -1
  83. package/esm/components/QToast/QToaster.vue.js +21 -16
  84. package/esm/components/QToast/index.d.ts +39 -3
  85. package/esm/components/QToast/index.d.ts.map +1 -1
  86. package/esm/components/QToast/types.d.ts +6 -2
  87. package/esm/components/QToast/types.d.ts.map +1 -1
  88. package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +1 -1
  89. package/esm/components/QTooltip/QTooltip.vue.js +1 -1
  90. package/esm/components/index.d.ts +1 -0
  91. package/esm/components/index.d.ts.map +1 -1
  92. package/esm/components/index.js +58 -56
  93. package/esm/composables/index.d.ts +2 -2
  94. package/esm/composables/index.d.ts.map +1 -1
  95. package/esm/composables/useColor/index.d.ts +46 -17
  96. package/esm/composables/useColor/index.d.ts.map +1 -1
  97. package/esm/composables/useColor/index.js +57 -29
  98. package/esm/composables/useColor/types.d.ts +4 -1
  99. package/esm/composables/useColor/types.d.ts.map +1 -1
  100. package/esm/composables/useDialog/_internal.d.ts +2 -0
  101. package/esm/composables/useDialog/_internal.d.ts.map +1 -0
  102. package/esm/composables/useDialog/_internal.js +65 -0
  103. package/esm/composables/useDialog/index.d.ts +11 -3
  104. package/esm/composables/useDialog/index.d.ts.map +1 -1
  105. package/esm/composables/useDialog/index.js +38 -22
  106. package/esm/composables/useDialog/types.d.ts +25 -11
  107. package/esm/composables/useDialog/types.d.ts.map +1 -1
  108. package/esm/composables/useDismissibleLayerStack/index.d.ts +17 -2
  109. package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -1
  110. package/esm/composables/useDismissibleLayerStack/index.js +28 -11
  111. package/esm/composables/useGroup/index.d.ts.map +1 -1
  112. package/esm/composables/useGroup/index.js +12 -1
  113. package/esm/composables/useId/index.d.ts +18 -0
  114. package/esm/composables/useId/index.d.ts.map +1 -0
  115. package/esm/composables/useId/index.js +10 -0
  116. package/esm/composables/useToast/_internal.d.ts +2 -0
  117. package/esm/composables/useToast/_internal.d.ts.map +1 -0
  118. package/esm/composables/useToast/_internal.js +142 -0
  119. package/esm/composables/useToast/index.d.ts +8 -25
  120. package/esm/composables/useToast/index.d.ts.map +1 -1
  121. package/esm/composables/useToast/index.js +29 -26
  122. package/esm/composables/useToast/types.d.ts +31 -17
  123. package/esm/composables/useToast/types.d.ts.map +1 -1
  124. package/esm/framework.d.ts.map +1 -1
  125. package/esm/framework.js +16 -12
  126. package/esm/index.d.ts +1 -0
  127. package/esm/templates/theme.js +39 -39
  128. package/esm/utils/color/contrast.d.ts +11 -4
  129. package/esm/utils/color/contrast.d.ts.map +1 -1
  130. package/esm/utils/color/contrast.js +16 -3
  131. package/esm/utils/color/index.d.ts +1 -0
  132. package/esm/utils/color/index.d.ts.map +1 -1
  133. package/esm/utils/color/merge.d.ts +9 -0
  134. package/esm/utils/color/merge.d.ts.map +1 -1
  135. package/esm/utils/color/merge.js +21 -22
  136. package/esm/utils/color/parse.d.ts +21 -5
  137. package/esm/utils/color/parse.d.ts.map +1 -1
  138. package/esm/utils/color/parse.js +88 -20
  139. package/esm/utils/color/theme-colors.d.ts +35 -0
  140. package/esm/utils/color/theme-colors.d.ts.map +1 -0
  141. package/esm/utils/color/theme-colors.js +25 -0
  142. package/esm/utils/index.js +50 -42
  143. package/package.json +3 -5
  144. package/esm/composables/uid.d.ts +0 -9
  145. package/esm/composables/uid.d.ts.map +0 -1
  146. package/esm/composables/uid.js +0 -8
  147. package/esm/composables/useToast/types.js +0 -4
  148. package/esm/vendors/uuid/dist/native.js +0 -3
  149. package/esm/vendors/uuid/dist/rng.js +0 -11
  150. package/esm/vendors/uuid/dist/stringify.js +0 -8
  151. package/esm/vendors/uuid/dist/v4.js +0 -20
@@ -1,5 +1,16 @@
1
1
  declare const QToast: {
2
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').QToastProps> & Readonly<{
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('../../types/component').QBaseComponentProps & {
3
+ title?: string;
4
+ text?: string;
5
+ block?: boolean;
6
+ color?: string;
7
+ elevation?: import('..').QCardElevation;
8
+ variant?: import('./types').QToastVariant;
9
+ timeout?: number;
10
+ icons?: typeof import('./constants').DEFAULT_ICONS;
11
+ } & {
12
+ entryKey?: string;
13
+ }> & Readonly<{
3
14
  onDismiss?: (() => any) | undefined;
4
15
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
16
  dismiss: () => any;
@@ -8,6 +19,7 @@ declare const QToast: {
8
19
  color: string;
9
20
  elevation: import('..').QCardElevation;
10
21
  icons: typeof import('./constants').DEFAULT_ICONS;
22
+ entryKey: string;
11
23
  timeout: number;
12
24
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
13
25
  P: {};
@@ -16,19 +28,42 @@ declare const QToast: {
16
28
  C: {};
17
29
  M: {};
18
30
  Defaults: {};
19
- }, Readonly<import('./types').QToastProps> & Readonly<{
31
+ }, Readonly<import('../../types/component').QBaseComponentProps & {
32
+ title?: string;
33
+ text?: string;
34
+ block?: boolean;
35
+ color?: string;
36
+ elevation?: import('..').QCardElevation;
37
+ variant?: import('./types').QToastVariant;
38
+ timeout?: number;
39
+ icons?: typeof import('./constants').DEFAULT_ICONS;
40
+ } & {
41
+ entryKey?: string;
42
+ }> & Readonly<{
20
43
  onDismiss?: (() => any) | undefined;
21
44
  }>, {}, {}, {}, {}, {
22
45
  variant: import('./types').QToastVariant;
23
46
  color: string;
24
47
  elevation: import('..').QCardElevation;
25
48
  icons: typeof import('./constants').DEFAULT_ICONS;
49
+ entryKey: string;
26
50
  timeout: number;
27
51
  }>;
28
52
  __isFragment?: never;
29
53
  __isTeleport?: never;
30
54
  __isSuspense?: never;
31
- } & import('vue').ComponentOptionsBase<Readonly<import('./types').QToastProps> & Readonly<{
55
+ } & import('vue').ComponentOptionsBase<Readonly<import('../../types/component').QBaseComponentProps & {
56
+ title?: string;
57
+ text?: string;
58
+ block?: boolean;
59
+ color?: string;
60
+ elevation?: import('..').QCardElevation;
61
+ variant?: import('./types').QToastVariant;
62
+ timeout?: number;
63
+ icons?: typeof import('./constants').DEFAULT_ICONS;
64
+ } & {
65
+ entryKey?: string;
66
+ }> & Readonly<{
32
67
  onDismiss?: (() => any) | undefined;
33
68
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
34
69
  dismiss: () => any;
@@ -37,6 +72,7 @@ declare const QToast: {
37
72
  color: string;
38
73
  elevation: import('..').QCardElevation;
39
74
  icons: typeof import('./constants').DEFAULT_ICONS;
75
+ entryKey: string;
40
76
  timeout: number;
41
77
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
42
78
  $slots: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2B,CAAA;AACvC,QAAA,MAAM,QAAQ;;6EAA6B,CAAA;AAG3C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;AAG3B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/index.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA2B,CAAA;AACvC,QAAA,MAAM,QAAQ;;6EAA6B,CAAA;AAG3C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAA;AAG3B,cAAc,SAAS,CAAA"}
@@ -3,7 +3,11 @@ import { QCardElevation } from '../QCard/types';
3
3
  import { DEFAULT_ICONS } from './constants';
4
4
  export type QToastVariant = 'bold' | 'tonal' | 'outlined';
5
5
  /**
6
- * Props for the QToaster component.
6
+ * Hosts programmatic toasts created with `useToast`.
7
+ *
8
+ * Mount exactly one `QToaster` per app (typically in the root layout).
9
+ * The toast store is app-scoped via `createFramework`; mounting a second
10
+ * toaster for the same app throws.
7
11
  */
8
12
  export type QToasterProps = QBaseComponentProps & {
9
13
  /**
@@ -14,7 +18,7 @@ export type QToasterProps = QBaseComponentProps & {
14
18
  placement?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';
15
19
  /**
16
20
  * Maximum number of toasts displayed at once.
17
- * Additional toasts will be queued.
21
+ * Additional toasts wait in a queue (unmounted); `addToast` stays pending until a slot opens and the toast registers during setup.
18
22
  *
19
23
  * @category Behavior
20
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;AAEzD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD;;;;OAIG;IACH,SAAS,CAAC,EACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,CAAA;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;IAE1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAA;AAEzD;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD;;;;OAIG;IACH,SAAS,CAAC,EACP,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,GACd,YAAY,GACZ,eAAe,CAAA;IAElB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,mBAAmB,GAAG;IAC/C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,cAAc,CAAA;IAE1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAA;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { useGroupItem as e } from "../../composables/useGroup/index.js";
2
- import { useId as t } from "../../composables/uid.js";
2
+ import { useId as t } from "../../composables/useId/index.js";
3
3
  import { QToggle as n } from "../QToggle/index.js";
4
4
  import { createBlock as r, defineComponent as i, mergeProps as a, openBlock as o, renderSlot as s, toRef as c, unref as l, withCtx as u } from "vue";
5
5
  //#region src/components/QToggleGroup/QToggleGroupItem.vue?vue&type=script&setup=true&lang.ts
@@ -1,5 +1,5 @@
1
1
  import { QIcon as e } from "../QIcon/index.js";
2
- import { useId as t } from "../../composables/uid.js";
2
+ import { useId as t } from "../../composables/useId/index.js";
3
3
  import { getElement as n } from "../../utils/getElement.js";
4
4
  import { QOverlay as r } from "../QOverlay/index.js";
5
5
  import { Fragment as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, normalizeProps as h, onUnmounted as g, openBlock as _, renderSlot as v, toDisplayString as y, toRef as b, unref as x, useModel as S, watch as C, withCtx as w } from "vue";
@@ -28,6 +28,7 @@ export * from './QLineLoader';
28
28
  export * from './QList';
29
29
  export * from './QMeter';
30
30
  export * from './QObfuscation';
31
+ export * from './QOverflow';
31
32
  export * from './QOverlay';
32
33
  export * from './QPasswordField';
33
34
  export * from './QPhoneField';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,WAAW,CAAA;AACzB,cAAc,qBAAqB,CAAA;AACnC,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,SAAS,CAAA;AACvB,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA"}
@@ -24,34 +24,35 @@ import { QOverlay as O } from "./QOverlay/index.js";
24
24
  import { QCombobox as k } from "./QCombobox/index.js";
25
25
  import { QSwitch as A } from "./QSwitch/index.js";
26
26
  import { QDateTimePicker as j } from "./QDateTimePicker/index.js";
27
- import { QDefaultsProvider as te } from "./QDefaultsProvider/index.js";
28
- import { QDialog as M, QDialogProvider as N } from "./QDialog/index.js";
29
- import { QDivider as P } from "./QDivider/index.js";
30
- import { QDropdownMenu as F } from "./QDropdownMenu/index.js";
31
- import { QFileUpload as I } from "./QFileUpload/index.js";
32
- import { QGauge as L } from "./QGauge/index.js";
33
- import { QCol as R, QContainer as z, QRow as B, QSpacer as V } from "./QGrid/index.js";
27
+ import { QDefaultsProvider as M } from "./QDefaultsProvider/index.js";
28
+ import { QDialog as N, QDialogProvider as P } from "./QDialog/index.js";
29
+ import { QDivider as F } from "./QDivider/index.js";
30
+ import { QDropdownMenu as I } from "./QDropdownMenu/index.js";
31
+ import { QFileUpload as L } from "./QFileUpload/index.js";
32
+ import { QGauge as R } from "./QGauge/index.js";
33
+ import { QCol as z, QContainer as te, QRow as B, QSpacer as V } from "./QGrid/index.js";
34
34
  import { QInputGroup as H } from "./QInputGroup/index.js";
35
35
  import { QLineLoader as U } from "./QLineLoader/index.js";
36
36
  import { QMeter as W } from "./QMeter/index.js";
37
37
  import { QObfuscation as G } from "./QObfuscation/index.js";
38
- import { QPasswordField as K } from "./QPasswordField/index.js";
39
- import { QPopover as q } from "./QPopover/index.js";
40
- import { QSelect as J } from "./QSelect/index.js";
41
- import { QPhoneField as Y } from "./QPhoneField/index.js";
42
- import { QPropertyList as X, QPropertyListGroup as Z, QPropertyListPanel as Q, QPropertyListRow as $ } from "./QPropertyList/index.js";
43
- import { QRadioButton as ne, QRadioGroup as re } from "./QRadioGroup/index.js";
44
- import { QSection as ie } from "./QSection/index.js";
45
- import { QToggle as ae } from "./QToggle/index.js";
46
- import { QSidebar as oe, QSidebarItem as se } from "./QSidebar/index.js";
47
- import { QTab as ce, QTabs as le } from "./QTabs/index.js";
48
- import { QTextArea as ue } from "./QTextArea/index.js";
49
- import { QThemeProvider as de } from "./QThemeProvider/index.js";
50
- import { QToast as fe, QToaster as pe } from "./QToast/index.js";
51
- import { QToggleGroup as me, QToggleGroupItem as he } from "./QToggleGroup/index.js";
52
- import { QTooltip as ge } from "./QTooltip/index.js";
38
+ import { QOverflow as K } from "./QOverflow/index.js";
39
+ import { QPasswordField as q } from "./QPasswordField/index.js";
40
+ import { QPopover as J } from "./QPopover/index.js";
41
+ import { QSelect as Y } from "./QSelect/index.js";
42
+ import { QPhoneField as X } from "./QPhoneField/index.js";
43
+ import { QPropertyList as Z, QPropertyListGroup as Q, QPropertyListPanel as $, QPropertyListRow as ne } from "./QPropertyList/index.js";
44
+ import { QRadioButton as re, QRadioGroup as ie } from "./QRadioGroup/index.js";
45
+ import { QSection as ae } from "./QSection/index.js";
46
+ import { QToggle as oe } from "./QToggle/index.js";
47
+ import { QSidebar as se, QSidebarItem as ce } from "./QSidebar/index.js";
48
+ import { QTab as le, QTabs as ue } from "./QTabs/index.js";
49
+ import { QTextArea as de } from "./QTextArea/index.js";
50
+ import { QThemeProvider as fe } from "./QThemeProvider/index.js";
51
+ import { QToast as pe, QToaster as me } from "./QToast/index.js";
52
+ import { QToggleGroup as he, QToggleGroupItem as ge } from "./QToggleGroup/index.js";
53
+ import { QTooltip as _e } from "./QTooltip/index.js";
53
54
  //#region src/components/index.ts
54
- var _e = /* @__PURE__ */ ee({
55
+ var ve = /* @__PURE__ */ ee({
55
56
  DEFAULT_TEXTS: () => b,
56
57
  QAccordion: () => c,
57
58
  QAccordionItem: () => l,
@@ -64,22 +65,22 @@ var _e = /* @__PURE__ */ ee({
64
65
  QCarousel: () => h,
65
66
  QCheckbox: () => _,
66
67
  QCheckboxLabel: () => v,
67
- QCol: () => R,
68
+ QCol: () => z,
68
69
  QCollapsible: () => s,
69
70
  QColorPicker: () => S,
70
71
  QCombobox: () => k,
71
- QContainer: () => z,
72
+ QContainer: () => te,
72
73
  QDateTimePicker: () => j,
73
- QDefaultsProvider: () => te,
74
- QDialog: () => M,
75
- QDialogProvider: () => N,
74
+ QDefaultsProvider: () => M,
75
+ QDialog: () => N,
76
+ QDialogProvider: () => P,
76
77
  QDismissibleLayer: () => E,
77
- QDivider: () => P,
78
- QDropdownMenu: () => F,
78
+ QDivider: () => F,
79
+ QDropdownMenu: () => I,
79
80
  QField: () => y,
80
- QFileUpload: () => I,
81
+ QFileUpload: () => L,
81
82
  QFocusWrap: () => D,
82
- QGauge: () => L,
83
+ QGauge: () => R,
83
84
  QIcon: () => r,
84
85
  QIconFont: () => i,
85
86
  QIconImg: () => a,
@@ -92,36 +93,37 @@ var _e = /* @__PURE__ */ ee({
92
93
  QListItemGroup: () => T,
93
94
  QMeter: () => W,
94
95
  QObfuscation: () => G,
96
+ QOverflow: () => K,
95
97
  QOverlay: () => O,
96
- QPasswordField: () => K,
97
- QPhoneField: () => Y,
98
- QPopover: () => q,
99
- QPropertyList: () => X,
100
- QPropertyListGroup: () => Z,
101
- QPropertyListPanel: () => Q,
102
- QPropertyListRow: () => $,
103
- QRadioButton: () => ne,
104
- QRadioGroup: () => re,
98
+ QPasswordField: () => q,
99
+ QPhoneField: () => X,
100
+ QPopover: () => J,
101
+ QPropertyList: () => Z,
102
+ QPropertyListGroup: () => Q,
103
+ QPropertyListPanel: () => $,
104
+ QPropertyListRow: () => ne,
105
+ QRadioButton: () => re,
106
+ QRadioGroup: () => ie,
105
107
  QRow: () => B,
106
- QSection: () => ie,
107
- QSelect: () => J,
108
- QSidebar: () => oe,
109
- QSidebarItem: () => se,
108
+ QSection: () => ae,
109
+ QSelect: () => Y,
110
+ QSidebar: () => se,
111
+ QSidebarItem: () => ce,
110
112
  QSkeletonLoader: () => m,
111
113
  QSpacer: () => V,
112
114
  QSpinnerLoader: () => e,
113
115
  QSwitch: () => A,
114
- QTab: () => ce,
115
- QTabs: () => le,
116
- QTextArea: () => ue,
116
+ QTab: () => le,
117
+ QTabs: () => ue,
118
+ QTextArea: () => de,
117
119
  QTextField: () => x,
118
- QThemeProvider: () => de,
119
- QToast: () => fe,
120
- QToaster: () => pe,
121
- QToggle: () => ae,
122
- QToggleGroup: () => me,
123
- QToggleGroupItem: () => he,
124
- QTooltip: () => ge
120
+ QThemeProvider: () => fe,
121
+ QToast: () => pe,
122
+ QToaster: () => me,
123
+ QToggle: () => oe,
124
+ QToggleGroup: () => he,
125
+ QToggleGroupItem: () => ge,
126
+ QTooltip: () => _e
125
127
  });
126
128
  //#endregion
127
- export { b as DEFAULT_TEXTS, c as QAccordion, l as QAccordionItem, u as QAvatar, f as QBadge, p as QBadgeIndicator, t as QButton, d as QButtonGroup, n as QCard, h as QCarousel, _ as QCheckbox, v as QCheckboxLabel, R as QCol, s as QCollapsible, S as QColorPicker, k as QCombobox, z as QContainer, j as QDateTimePicker, te as QDefaultsProvider, M as QDialog, N as QDialogProvider, E as QDismissibleLayer, P as QDivider, F as QDropdownMenu, y as QField, I as QFileUpload, D as QFocusWrap, L as QGauge, r as QIcon, i as QIconFont, a as QIconImg, o as QIconSvg, H as QInputGroup, g as QLabel, U as QLineLoader, C as QList, w as QListItem, T as QListItemGroup, W as QMeter, G as QObfuscation, O as QOverlay, K as QPasswordField, Y as QPhoneField, q as QPopover, X as QPropertyList, Z as QPropertyListGroup, Q as QPropertyListPanel, $ as QPropertyListRow, ne as QRadioButton, re as QRadioGroup, B as QRow, ie as QSection, J as QSelect, oe as QSidebar, se as QSidebarItem, m as QSkeletonLoader, V as QSpacer, e as QSpinnerLoader, A as QSwitch, ce as QTab, le as QTabs, ue as QTextArea, x as QTextField, de as QThemeProvider, fe as QToast, pe as QToaster, ae as QToggle, me as QToggleGroup, he as QToggleGroupItem, ge as QTooltip, _e as components_exports };
129
+ export { b as DEFAULT_TEXTS, c as QAccordion, l as QAccordionItem, u as QAvatar, f as QBadge, p as QBadgeIndicator, t as QButton, d as QButtonGroup, n as QCard, h as QCarousel, _ as QCheckbox, v as QCheckboxLabel, z as QCol, s as QCollapsible, S as QColorPicker, k as QCombobox, te as QContainer, j as QDateTimePicker, M as QDefaultsProvider, N as QDialog, P as QDialogProvider, E as QDismissibleLayer, F as QDivider, I as QDropdownMenu, y as QField, L as QFileUpload, D as QFocusWrap, R as QGauge, r as QIcon, i as QIconFont, a as QIconImg, o as QIconSvg, H as QInputGroup, g as QLabel, U as QLineLoader, C as QList, w as QListItem, T as QListItemGroup, W as QMeter, G as QObfuscation, K as QOverflow, O as QOverlay, q as QPasswordField, X as QPhoneField, J as QPopover, Z as QPropertyList, Q as QPropertyListGroup, $ as QPropertyListPanel, ne as QPropertyListRow, re as QRadioButton, ie as QRadioGroup, B as QRow, ae as QSection, Y as QSelect, se as QSidebar, ce as QSidebarItem, m as QSkeletonLoader, V as QSpacer, e as QSpinnerLoader, A as QSwitch, le as QTab, ue as QTabs, de as QTextArea, x as QTextField, fe as QThemeProvider, pe as QToast, me as QToaster, oe as QToggle, he as QToggleGroup, ge as QToggleGroupItem, _e as QTooltip, ve as components_exports };
@@ -15,6 +15,6 @@
15
15
  * consumed by applications or other packages.
16
16
  */
17
17
  export { provideTheme, useTheme, type ThemeDefinition } from './theme';
18
- export { useDialog } from './useDialog';
19
- export { useToast } from './useToast';
18
+ export { useDialog, type DialogItem, type UseDialogReturn } from './useDialog';
19
+ export { useToast, type ToastItem, type UseToastReturn } from './useToast';
20
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAGtE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAGvC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composables/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAGtE,OAAO,EAAE,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAA;AAG9E,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAA"}
@@ -1,18 +1,47 @@
1
1
  import { MaybeRef } from 'vue';
2
- import { UseColorReturn } from './types';
3
- import { ColorScheme } from '../../utils/color';
2
+ import { ColorStyle, UseColorReturn } from './types';
3
+ import { ColorScheme, RGB } from '../../utils/color';
4
+ type HoverStyle = Pick<ColorStyle, 'hoverColor' | 'hoverColorRgb' | 'onHoverColor'>;
5
+ /**
6
+ * Resolves hover colors for `useColor`.
7
+ *
8
+ * Theme utility keys with a matching `*Dark` scheme token use that token (and `on*Dark`
9
+ * when present). Custom CSS colors, utilities without `*Dark` (e.g. `background`), and
10
+ * unparsable `*Dark` overrides fall back to `darken(main, COLOR_SCHEME_DARKEN_AMOUNT)` with WCAG `onHover`.
11
+ *
12
+ * @param rawColor - The original color input (utility key or CSS color).
13
+ * @param isUtilityColor - Whether `rawColor` is a BEM theme utility key.
14
+ * @param scheme - The active color scheme.
15
+ * @param mainRgb - Parsed RGB of the resolved main color.
16
+ */
17
+ export declare function resolveHoverStyle(rawColor: string, isUtilityColor: boolean, scheme: Readonly<ColorScheme>, mainRgb: RGB): HoverStyle;
4
18
  /**
5
19
  * A composable function that processes and returns color-related information and styles.
6
20
  *
7
- * @param color - A string representing a color value or a utility color name. Can be provided as a ref or plain string.
21
+ * Theme utility colors (e.g. `primary`, `success`) resolve against the active theme.
22
+ * Custom colors are parsed from supported CSS formats: hex, `rgb`/`rgba`, and `hsl`/`hsla`.
23
+ * Values such as `var(...)`, `transparent`, `currentColor`, and `inherit`
24
+ * are rejected with a dev warning.
25
+ *
26
+ * `style.onMainColor` is always derived with WCAG relative luminance.
27
+ * For theme utility keys that have a scheme `*Dark` token, `hoverColor` / `onHoverColor`
28
+ * come from `*Dark` / `on*Dark`. Custom CSS colors, utilities without `*Dark` (such as
29
+ * `background`), and unparsable `*Dark` overrides use `darken(main, COLOR_SCHEME_DARKEN_AMOUNT)` with WCAG
30
+ * `onHover`. Components bind those values as
31
+ * CSS variables for both utility and custom colors. `isUtilityColor` still marks
32
+ * theme keys for hover resolution (`*Dark` / `on*Dark`). Exception: `QButton` with
33
+ * `color="background"` omits inline vars so its SCSS `--background` modifier
34
+ * (primary-dark hover) wins.
35
+ *
36
+ * @param color - A theme utility key or CSS color value. Can be provided as a ref or plain string.
8
37
  *
9
38
  * @returns {UseColorReturn} An object containing:
10
- * - isUtilityColor: A computed boolean indicating if the color is a utility color
39
+ * - isUtilityColor: A computed boolean indicating if the color is a theme utility key
11
40
  * - style: A computed object containing:
12
41
  * - mainColor: The resolved color value
13
- * - onMainColor: A contrasting color suitable for text/content on the main color
14
- * - hoverColor: A darker version of the main color for hover states
15
- * - onHoverColor: A contrasting color suitable for text/content on the hover color
42
+ * - onMainColor: A WCAG contrasting color for content on the main color
43
+ * - hoverColor: Scheme `*Dark` for utilities, otherwise a darkened main color
44
+ * - onHoverColor: Scheme `on*Dark` for utilities when present, otherwise WCAG on hover
16
45
  *
17
46
  * @example
18
47
  * ```ts
@@ -20,22 +49,22 @@ import { ColorScheme } from '../../utils/color';
20
49
  * // or
21
50
  * const { isUtilityColor, style } = useColor(ref('#FF0000'))
22
51
  * ```
23
- *
24
- * @throws Will log an error to console if color parsing fails
25
52
  */
26
53
  export declare function useColor(color: MaybeRef<string | undefined>): UseColorReturn;
27
54
  /**
28
- * Resolves a utility color against a color scheme while preserving CSS and custom colors.
55
+ * Resolves a color scheme key against a color scheme while preserving CSS and custom colors.
56
+ *
57
+ * Looks up any key present on the scheme (base, Light/Dark variants, and `on*` tokens).
58
+ * {@link isThemeColor} remains narrower and is only used for theme-key classification
59
+ * (`isUtilityColor` / hover `*Dark` resolution).
29
60
  *
30
61
  * This pure variant is useful when a component needs to resolve a dynamic collection of
31
62
  * colors and therefore cannot create one `useColor` instance per collection entry.
32
- */
33
- export declare function resolveColor(color: string, scheme: Readonly<ColorScheme>): string;
34
- /**
35
- * Checks if a given string represents a valid CSS color format.
36
63
  *
37
- * @param color - The string to check for CSS color format
38
- * @returns True if the string starts with '#', 'rgb', or 'hsl', false otherwise
64
+ * @param color - A scheme key or CSS color string.
65
+ * @param scheme - The active color scheme.
66
+ * @returns The scheme value when `color` is a scheme key; otherwise the original string.
39
67
  */
40
- export declare function isCssColor(color: string): boolean;
68
+ export declare function resolveColor(color: string, scheme: Readonly<ColorScheme>): string;
69
+ export {};
41
70
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useColor/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAc,cAAc,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAcpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,cAAc,CAwC5E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,MAAM,CAGjF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useColor/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAuBzD,KAAK,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC,CAAA;AAYnF;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,OAAO,EACvB,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,EAC7B,OAAO,EAAE,GAAG,GACV,UAAU,CA4BZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,cAAc,CA4C5E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,GAAG,MAAM,CAQjF"}
@@ -1,41 +1,69 @@
1
- import { rgbToHex as e, rgbToHsl as t, rgbToVariableString as n } from "../../utils/color/conversion.js";
2
- import { parseColor as r } from "../../utils/color/parse.js";
3
- import { getContrastingColor as i } from "../../utils/color/contrast.js";
4
- import { darken as a } from "../../utils/color/manipulate.js";
5
- import { useTheme as o } from "../theme.js";
6
- import { computed as s, unref as c } from "vue";
1
+ import { rgbToHex as e, rgbToVariableString as t } from "../../utils/color/conversion.js";
2
+ import { parseColor as n } from "../../utils/color/parse.js";
3
+ import { getContrastingColor as r } from "../../utils/color/contrast.js";
4
+ import { darken as i } from "../../utils/color/manipulate.js";
5
+ import { isThemeColor as a, isUnsupportedColor as o } from "../../utils/color/theme-colors.js";
6
+ import { useTheme as s } from "../theme.js";
7
+ import { computed as c, unref as l } from "vue";
7
8
  //#region src/composables/useColor/index.ts
8
- function l(l) {
9
- let f = s(() => c(l));
9
+ function u(e) {
10
+ typeof process < "u" && process.env.NODE_ENV === "production" || console.warn(`[Quidgest UI] useColor: unable to resolve color "${e}"`);
11
+ }
12
+ function d(n) {
13
+ let a = i(n, 25);
14
+ return {
15
+ hoverColor: e(a),
16
+ hoverColorRgb: t(a),
17
+ onHoverColor: r(a)
18
+ };
19
+ }
20
+ function f(e, i, a, o) {
21
+ if (i) {
22
+ let i = e, o = a[`${i}Dark`];
23
+ if (typeof o == "string") try {
24
+ let e = n(o), s = a[`on${i.charAt(0).toUpperCase()}${i.slice(1)}Dark`];
25
+ return {
26
+ hoverColor: o,
27
+ hoverColorRgb: t(e),
28
+ onHoverColor: typeof s == "string" ? s : r(e)
29
+ };
30
+ } catch {
31
+ u(o);
32
+ }
33
+ }
34
+ return d(o);
35
+ }
36
+ function p(e) {
37
+ let i = c(() => l(e)), d = s(), p = c(() => i.value ? a(i.value) : !1);
10
38
  return {
11
- isUtilityColor: s(() => f.value ? !d(f.value) : !1),
12
- style: s(() => {
13
- let s = f.value;
14
- if (!s) return;
15
- let c = u(s, o().current.value.scheme), l;
39
+ isUtilityColor: p,
40
+ style: c(() => {
41
+ let e = i.value;
42
+ if (!e) return;
43
+ if (!p.value && o(e)) {
44
+ u(e);
45
+ return;
46
+ }
47
+ let a = m(e, d.current.value.scheme), s;
16
48
  try {
17
- if (l = r(c), !l) return;
18
- } catch (e) {
19
- console.error("Failed to parse color:", e);
49
+ s = n(a);
50
+ } catch {
51
+ u(e);
20
52
  return;
21
53
  }
22
- let d = i(t(l).l), p = a(l, 25), m = e(p);
54
+ let c = r(s), l = f(e, p.value, d.current.value.scheme, s);
23
55
  return {
24
- mainColor: c,
25
- mainColorRgb: n(l),
26
- onMainColor: d,
27
- hoverColor: m,
28
- hoverColorRgb: n(p),
29
- onHoverColor: d
56
+ mainColor: a,
57
+ mainColorRgb: t(s),
58
+ onMainColor: c,
59
+ ...l
30
60
  };
31
61
  })
32
62
  };
33
63
  }
34
- function u(e, t) {
35
- return d(e) ? e : t[e] ?? e;
36
- }
37
- function d(e) {
38
- return e.startsWith("#") || e.startsWith("rgb") || e.startsWith("hsl");
64
+ function m(e, t) {
65
+ let n = e.trim();
66
+ return Object.prototype.hasOwnProperty.call(t, n) ? t[n] ?? e : e;
39
67
  }
40
68
  //#endregion
41
- export { d as isCssColor, u as resolveColor, l as useColor };
69
+ export { m as resolveColor, f as resolveHoverStyle, p as useColor };
@@ -13,10 +13,12 @@ export interface ColorStyle {
13
13
  mainColorRgb: string;
14
14
  /**
15
15
  * The color to be used for content on top of the main color.
16
+ * Computed using WCAG relative luminance.
16
17
  */
17
18
  onMainColor: string;
18
19
  /**
19
20
  * Optional color to be used when the component is in hover state.
21
+ * Scheme `*Dark` for theme utilities when present; otherwise `darken(main, COLOR_SCHEME_DARKEN_AMOUNT)`.
20
22
  */
21
23
  hoverColor?: string;
22
24
  /**
@@ -25,6 +27,7 @@ export interface ColorStyle {
25
27
  hoverColorRgb?: string;
26
28
  /**
27
29
  * Optional color to be used for content when the component is in hover state.
30
+ * Scheme `on*Dark` for theme utilities when present; otherwise WCAG against the hover background.
28
31
  */
29
32
  onHoverColor?: string;
30
33
  }
@@ -33,7 +36,7 @@ export interface ColorStyle {
33
36
  */
34
37
  export interface UseColorReturn {
35
38
  /**
36
- * A computed reference indicating whether the color is a utility color.
39
+ * A computed reference indicating whether the color is a theme utility key.
37
40
  */
38
41
  isUtilityColor: ComputedRef<boolean>;
39
42
  /**
@@ -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,UAAU;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAEpC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;CAC1C"}
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,UAAU;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;;OAGG;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,cAAc;IAC9B;;OAEG;IACH,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAEpC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC,UAAU,GAAG,SAAS,CAAC,CAAA;CAC1C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=_internal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_internal.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/_internal.ts"],"names":[],"mappings":""}
@@ -0,0 +1,65 @@
1
+ import { inject as e, ref as t } from "vue";
2
+ //#region src/composables/useDialog/_internal.ts
3
+ var n = Symbol.for("q-dialog");
4
+ function r(e, t) {
5
+ let n = e.dialogs.value[t];
6
+ if (!n) return;
7
+ let r = e.pendingByKey.get(n.entryKey);
8
+ r && !r.settled && (r.reject(/* @__PURE__ */ Error("Dialog removed before it was ready")), e.pendingByKey.delete(n.entryKey)), (n.handlers?.onLeave?.() ?? !0) && e.dialogs.value.splice(t, 1);
9
+ }
10
+ function i(e, t) {
11
+ return e.dialogs.value.some((e) => e.id === t || e.props.id === t);
12
+ }
13
+ function a(e, t) {
14
+ let n = e.dialogs.value.findIndex((e) => e.props.id === t && e.id === void 0);
15
+ if (n === -1) return;
16
+ let r = e.dialogs.value[n], i = e.pendingByKey.get(r.entryKey);
17
+ i && !i.settled && (i.reject(/* @__PURE__ */ Error("Dialog canceled")), e.pendingByKey.delete(r.entryKey)), e.dialogs.value.splice(n, 1);
18
+ }
19
+ function o() {
20
+ let e = t([]), n = /* @__PURE__ */ new Map(), r = 0, i = 0;
21
+ function a(t, r) {
22
+ let i = e.value.find((e) => e.entryKey === t);
23
+ if (!i) return;
24
+ i.id = r;
25
+ let a = n.get(t);
26
+ !a || a.settled || (a.settled = !0, a.resolve(r), n.delete(t), i.handlers?.onEnter?.());
27
+ }
28
+ function o(t, n) {
29
+ let r = e.value.find((e) => e.entryKey === t);
30
+ !r || r.id === n || (r.id = n);
31
+ }
32
+ function s() {
33
+ return `dialog-${++r}`;
34
+ }
35
+ function c() {
36
+ return i > 0;
37
+ }
38
+ function l() {
39
+ if (i > 0) throw Error("Only one QDialogProvider may be mounted per app.");
40
+ i++;
41
+ }
42
+ function u() {
43
+ if (i = Math.max(0, i - 1), !(i > 0)) {
44
+ for (let [, e] of n) e.settled || e.reject(/* @__PURE__ */ Error("Dialog provider unmounted before the dialog was ready"));
45
+ n.clear(), e.value = [];
46
+ }
47
+ }
48
+ return {
49
+ dialogs: e,
50
+ pendingByKey: n,
51
+ registerDialogEntry: a,
52
+ updateDialogEntryId: o,
53
+ nextEntryKey: s,
54
+ hasProvider: c,
55
+ registerProvider: l,
56
+ unregisterProvider: u
57
+ };
58
+ }
59
+ function s() {
60
+ let t = e(n);
61
+ if (!t) throw Error("useDialog() requires a provided dialog instance (e.g. via createFramework)");
62
+ return t;
63
+ }
64
+ //#endregion
65
+ export { n as DialogSymbol, a as cancelDialogByPropsId, o as createDialogInstance, i as hasDialogWithId, s as injectDialogInstance, r as removeDialogEntry };