@quidgest/ui 0.20.0 → 0.21.0
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.
- package/CHANGELOG.md +28 -1
- package/README.md +10 -0
- package/dist/json/api.json +312 -14
- package/dist/manifest/components.json +1 -0
- package/dist/ui.css +245 -248
- package/dist/ui.esm.js +805 -683
- package/dist/ui.js +1083 -961
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1083 -961
- package/dist/ui.scss +535 -299
- package/esm/components/QAccordion/QAccordionItem.vue.js +1 -1
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +20 -24
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +32 -29
- package/esm/components/QCheckbox/QCheckbox.vue.js +1 -1
- package/esm/components/QDialog/QDialog.d.ts +4 -2
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +84 -74
- package/esm/components/QDialog/QDialogProvider.d.ts.map +1 -1
- package/esm/components/QDialog/QDialogProvider.vue.js +21 -12
- package/esm/components/QDialog/index.d.ts +72 -3
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +10 -1
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.vue.js +9 -8
- package/esm/components/QDivider/QDivider.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.vue.js +3 -3
- package/esm/components/QFileUpload/QFileUpload.vue.js +1 -1
- package/esm/components/QGauge/QGauge.d.ts +56 -0
- package/esm/components/QGauge/QGauge.d.ts.map +1 -0
- package/esm/components/QGauge/QGauge.vue.js +305 -0
- package/esm/components/QGauge/QGauge2.vue.js +5 -0
- package/esm/components/QGauge/constants.d.ts +6 -0
- package/esm/components/QGauge/constants.d.ts.map +1 -0
- package/esm/components/QGauge/constants.js +8 -0
- package/esm/components/QGauge/index.d.ts +124 -0
- package/esm/components/QGauge/index.d.ts.map +1 -0
- package/esm/components/QGauge/index.js +6 -0
- package/esm/components/QGauge/types.d.ts +146 -0
- package/esm/components/QGauge/types.d.ts.map +1 -0
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +5 -2
- package/esm/components/QList/QListItemGroup.vue.js +1 -1
- package/esm/components/QObfuscation/QObfuscation.vue.js +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.vue.js +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +1 -1
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QRadioGroup/QRadioButton.vue.js +1 -1
- package/esm/components/QRadioGroup/QRadioGroup.vue.js +2 -2
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +19 -10
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.vue.js +51 -49
- package/esm/components/QSidebar/context.d.ts +7 -0
- package/esm/components/QSidebar/context.d.ts.map +1 -1
- package/esm/components/QSwitch/QSwitch.vue.js +1 -1
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +52 -50
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +37 -12
- package/esm/components/QTabs/context.d.ts +7 -0
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +1 -1
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +1 -1
- package/esm/components/QThemeProvider/QThemeProvider.vue.js +1 -1
- package/esm/components/QToast/QToast.d.ts +4 -2
- package/esm/components/QToast/QToast.d.ts.map +1 -1
- package/esm/components/QToast/QToast.vue.js +80 -67
- package/esm/components/QToast/QToaster.d.ts.map +1 -1
- package/esm/components/QToast/QToaster.vue.js +21 -16
- package/esm/components/QToast/index.d.ts +39 -3
- package/esm/components/QToast/index.d.ts.map +1 -1
- package/esm/components/QToast/types.d.ts +6 -2
- package/esm/components/QToast/types.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +1 -1
- package/esm/components/QTooltip/QTooltip.vue.js +1 -1
- package/esm/components/index.d.ts +1 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +64 -62
- package/esm/composables/index.d.ts +2 -2
- package/esm/composables/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.d.ts +49 -12
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +56 -30
- package/esm/composables/useColor/types.d.ts +4 -1
- package/esm/composables/useColor/types.d.ts.map +1 -1
- package/esm/composables/useDialog/_internal.d.ts +2 -0
- package/esm/composables/useDialog/_internal.d.ts.map +1 -0
- package/esm/composables/useDialog/_internal.js +65 -0
- package/esm/composables/useDialog/index.d.ts +11 -3
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/index.js +38 -22
- package/esm/composables/useDialog/types.d.ts +25 -11
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useDismissibleLayerStack/index.d.ts +17 -2
- package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -1
- package/esm/composables/useDismissibleLayerStack/index.js +28 -11
- package/esm/composables/useGroup/index.d.ts.map +1 -1
- package/esm/composables/useGroup/index.js +12 -1
- package/esm/composables/useId/index.d.ts +18 -0
- package/esm/composables/useId/index.d.ts.map +1 -0
- package/esm/composables/useId/index.js +10 -0
- package/esm/composables/useToast/_internal.d.ts +2 -0
- package/esm/composables/useToast/_internal.d.ts.map +1 -0
- package/esm/composables/useToast/_internal.js +142 -0
- package/esm/composables/useToast/index.d.ts +8 -25
- package/esm/composables/useToast/index.d.ts.map +1 -1
- package/esm/composables/useToast/index.js +29 -26
- package/esm/composables/useToast/types.d.ts +31 -17
- package/esm/composables/useToast/types.d.ts.map +1 -1
- package/esm/framework.d.ts.map +1 -1
- package/esm/framework.js +16 -12
- package/esm/index.d.ts +1 -0
- package/esm/templates/theme.js +39 -39
- package/esm/utils/color/contrast.d.ts +11 -4
- package/esm/utils/color/contrast.d.ts.map +1 -1
- package/esm/utils/color/contrast.js +16 -3
- package/esm/utils/color/index.d.ts +1 -0
- package/esm/utils/color/index.d.ts.map +1 -1
- package/esm/utils/color/merge.d.ts +9 -0
- package/esm/utils/color/merge.d.ts.map +1 -1
- package/esm/utils/color/merge.js +21 -22
- package/esm/utils/color/parse.d.ts +21 -5
- package/esm/utils/color/parse.d.ts.map +1 -1
- package/esm/utils/color/parse.js +88 -20
- package/esm/utils/color/theme-colors.d.ts +35 -0
- package/esm/utils/color/theme-colors.d.ts.map +1 -0
- package/esm/utils/color/theme-colors.js +25 -0
- package/esm/utils/index.js +50 -42
- package/package.json +3 -5
- package/esm/composables/uid.d.ts +0 -9
- package/esm/composables/uid.d.ts.map +0 -1
- package/esm/composables/uid.js +0 -8
- package/esm/composables/useToast/types.js +0 -4
- package/esm/vendors/uuid/dist/native.js +0 -3
- package/esm/vendors/uuid/dist/rng.js +0 -11
- package/esm/vendors/uuid/dist/stringify.js +0 -8
- 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('
|
|
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('
|
|
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('
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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/
|
|
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/
|
|
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";
|
|
@@ -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,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,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"}
|
package/esm/components/index.js
CHANGED
|
@@ -24,33 +24,34 @@ 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
|
|
28
|
-
import { QDialog as
|
|
29
|
-
import { QDivider as
|
|
30
|
-
import { QDropdownMenu as
|
|
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
31
|
import { QFileUpload as I } from "./QFileUpload/index.js";
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
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";
|
|
34
|
+
import { QInputGroup as H } from "./QInputGroup/index.js";
|
|
35
|
+
import { QLineLoader as U } from "./QLineLoader/index.js";
|
|
36
|
+
import { QMeter as W } from "./QMeter/index.js";
|
|
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";
|
|
52
53
|
//#region src/components/index.ts
|
|
53
|
-
var
|
|
54
|
+
var _e = /* @__PURE__ */ ee({
|
|
54
55
|
DEFAULT_TEXTS: () => b,
|
|
55
56
|
QAccordion: () => c,
|
|
56
57
|
QAccordionItem: () => l,
|
|
@@ -63,63 +64,64 @@ var ge = /* @__PURE__ */ ee({
|
|
|
63
64
|
QCarousel: () => h,
|
|
64
65
|
QCheckbox: () => _,
|
|
65
66
|
QCheckboxLabel: () => v,
|
|
66
|
-
QCol: () =>
|
|
67
|
+
QCol: () => R,
|
|
67
68
|
QCollapsible: () => s,
|
|
68
69
|
QColorPicker: () => S,
|
|
69
70
|
QCombobox: () => k,
|
|
70
|
-
QContainer: () =>
|
|
71
|
+
QContainer: () => z,
|
|
71
72
|
QDateTimePicker: () => j,
|
|
72
|
-
QDefaultsProvider: () =>
|
|
73
|
-
QDialog: () =>
|
|
74
|
-
QDialogProvider: () =>
|
|
73
|
+
QDefaultsProvider: () => te,
|
|
74
|
+
QDialog: () => M,
|
|
75
|
+
QDialogProvider: () => N,
|
|
75
76
|
QDismissibleLayer: () => E,
|
|
76
|
-
QDivider: () =>
|
|
77
|
-
QDropdownMenu: () =>
|
|
77
|
+
QDivider: () => P,
|
|
78
|
+
QDropdownMenu: () => F,
|
|
78
79
|
QField: () => y,
|
|
79
80
|
QFileUpload: () => I,
|
|
80
81
|
QFocusWrap: () => D,
|
|
82
|
+
QGauge: () => L,
|
|
81
83
|
QIcon: () => r,
|
|
82
84
|
QIconFont: () => i,
|
|
83
85
|
QIconImg: () => a,
|
|
84
86
|
QIconSvg: () => o,
|
|
85
|
-
QInputGroup: () =>
|
|
87
|
+
QInputGroup: () => H,
|
|
86
88
|
QLabel: () => g,
|
|
87
|
-
QLineLoader: () =>
|
|
89
|
+
QLineLoader: () => U,
|
|
88
90
|
QList: () => C,
|
|
89
91
|
QListItem: () => w,
|
|
90
92
|
QListItemGroup: () => T,
|
|
91
|
-
QMeter: () =>
|
|
92
|
-
QObfuscation: () =>
|
|
93
|
+
QMeter: () => W,
|
|
94
|
+
QObfuscation: () => G,
|
|
93
95
|
QOverlay: () => O,
|
|
94
|
-
QPasswordField: () =>
|
|
95
|
-
QPhoneField: () =>
|
|
96
|
-
QPopover: () =>
|
|
97
|
-
QPropertyList: () =>
|
|
98
|
-
QPropertyListGroup: () =>
|
|
99
|
-
QPropertyListPanel: () =>
|
|
100
|
-
QPropertyListRow: () =>
|
|
101
|
-
QRadioButton: () =>
|
|
102
|
-
QRadioGroup: () =>
|
|
103
|
-
QRow: () =>
|
|
104
|
-
QSection: () =>
|
|
105
|
-
QSelect: () =>
|
|
106
|
-
QSidebar: () =>
|
|
107
|
-
QSidebarItem: () =>
|
|
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,
|
|
105
|
+
QRow: () => B,
|
|
106
|
+
QSection: () => ie,
|
|
107
|
+
QSelect: () => J,
|
|
108
|
+
QSidebar: () => oe,
|
|
109
|
+
QSidebarItem: () => se,
|
|
108
110
|
QSkeletonLoader: () => m,
|
|
109
|
-
QSpacer: () =>
|
|
111
|
+
QSpacer: () => V,
|
|
110
112
|
QSpinnerLoader: () => e,
|
|
111
113
|
QSwitch: () => A,
|
|
112
|
-
QTab: () =>
|
|
113
|
-
QTabs: () =>
|
|
114
|
-
QTextArea: () =>
|
|
114
|
+
QTab: () => ce,
|
|
115
|
+
QTabs: () => le,
|
|
116
|
+
QTextArea: () => ue,
|
|
115
117
|
QTextField: () => x,
|
|
116
|
-
QThemeProvider: () =>
|
|
117
|
-
QToast: () =>
|
|
118
|
-
QToaster: () =>
|
|
119
|
-
QToggle: () =>
|
|
120
|
-
QToggleGroup: () =>
|
|
121
|
-
QToggleGroupItem: () =>
|
|
122
|
-
QTooltip: () =>
|
|
118
|
+
QThemeProvider: () => de,
|
|
119
|
+
QToast: () => fe,
|
|
120
|
+
QToaster: () => pe,
|
|
121
|
+
QToggle: () => ae,
|
|
122
|
+
QToggleGroup: () => me,
|
|
123
|
+
QToggleGroupItem: () => he,
|
|
124
|
+
QTooltip: () => ge
|
|
123
125
|
});
|
|
124
126
|
//#endregion
|
|
125
|
-
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,
|
|
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 };
|
|
@@ -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;
|
|
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,17 +1,47 @@
|
|
|
1
1
|
import { MaybeRef } from 'vue';
|
|
2
|
-
import { UseColorReturn } from './types';
|
|
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;
|
|
3
18
|
/**
|
|
4
19
|
* A composable function that processes and returns color-related information and styles.
|
|
5
20
|
*
|
|
6
|
-
*
|
|
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.
|
|
7
37
|
*
|
|
8
38
|
* @returns {UseColorReturn} An object containing:
|
|
9
|
-
* - isUtilityColor: A computed boolean indicating if the color is a utility
|
|
39
|
+
* - isUtilityColor: A computed boolean indicating if the color is a theme utility key
|
|
10
40
|
* - style: A computed object containing:
|
|
11
41
|
* - mainColor: The resolved color value
|
|
12
|
-
* - onMainColor: A contrasting color
|
|
13
|
-
* - hoverColor:
|
|
14
|
-
* - onHoverColor:
|
|
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
|
|
15
45
|
*
|
|
16
46
|
* @example
|
|
17
47
|
* ```ts
|
|
@@ -19,15 +49,22 @@ import { UseColorReturn } from './types';
|
|
|
19
49
|
* // or
|
|
20
50
|
* const { isUtilityColor, style } = useColor(ref('#FF0000'))
|
|
21
51
|
* ```
|
|
22
|
-
*
|
|
23
|
-
* @throws Will log an error to console if color parsing fails
|
|
24
52
|
*/
|
|
25
53
|
export declare function useColor(color: MaybeRef<string | undefined>): UseColorReturn;
|
|
26
54
|
/**
|
|
27
|
-
*
|
|
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).
|
|
60
|
+
*
|
|
61
|
+
* This pure variant is useful when a component needs to resolve a dynamic collection of
|
|
62
|
+
* colors and therefore cannot create one `useColor` instance per collection entry.
|
|
28
63
|
*
|
|
29
|
-
* @param color -
|
|
30
|
-
* @
|
|
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.
|
|
31
67
|
*/
|
|
32
|
-
export declare function
|
|
68
|
+
export declare function resolveColor(color: string, scheme: Readonly<ColorScheme>): string;
|
|
69
|
+
export {};
|
|
33
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,
|
|
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,43 +1,69 @@
|
|
|
1
|
-
import { rgbToHex as e,
|
|
2
|
-
import { parseColor as
|
|
3
|
-
import { getContrastingColor as
|
|
4
|
-
import { darken as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
9
|
-
|
|
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:
|
|
12
|
-
style:
|
|
13
|
-
let
|
|
14
|
-
if (!
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
c = l.current.value.scheme[e] ?? s;
|
|
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;
|
|
19
46
|
}
|
|
20
|
-
let
|
|
47
|
+
let a = m(e, d.current.value.scheme), s;
|
|
21
48
|
try {
|
|
22
|
-
|
|
23
|
-
} catch
|
|
24
|
-
|
|
49
|
+
s = n(a);
|
|
50
|
+
} catch {
|
|
51
|
+
u(e);
|
|
25
52
|
return;
|
|
26
53
|
}
|
|
27
|
-
let
|
|
54
|
+
let c = r(s), l = f(e, p.value, d.current.value.scheme, s);
|
|
28
55
|
return {
|
|
29
|
-
mainColor:
|
|
30
|
-
mainColorRgb:
|
|
31
|
-
onMainColor:
|
|
32
|
-
|
|
33
|
-
hoverColorRgb: n(m),
|
|
34
|
-
onHoverColor: p
|
|
56
|
+
mainColor: a,
|
|
57
|
+
mainColorRgb: t(s),
|
|
58
|
+
onMainColor: c,
|
|
59
|
+
...l
|
|
35
60
|
};
|
|
36
61
|
})
|
|
37
62
|
};
|
|
38
63
|
}
|
|
39
|
-
function
|
|
40
|
-
|
|
64
|
+
function m(e, t) {
|
|
65
|
+
let n = e.trim();
|
|
66
|
+
return Object.prototype.hasOwnProperty.call(t, n) ? t[n] ?? e : e;
|
|
41
67
|
}
|
|
42
68
|
//#endregion
|
|
43
|
-
export {
|
|
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
|
|
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
|
|
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 @@
|
|
|
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 };
|