@quidgest/ui 0.24.0 → 0.26.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 +34 -0
- package/dist/json/api.json +54 -9
- package/dist/ui.css +239 -192
- package/dist/ui.esm.js +582 -575
- package/dist/ui.js +540 -533
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +540 -533
- package/dist/ui.scss +300 -260
- package/esm/components/QBadge/constants.d.ts.map +1 -1
- package/esm/components/QButton/QButton.d.ts +3 -2
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +68 -40
- package/esm/components/QButton/index.d.ts +8 -5
- package/esm/components/QButton/index.d.ts.map +1 -1
- package/esm/components/QButton/types.d.ts +8 -0
- package/esm/components/QButton/types.d.ts.map +1 -1
- package/esm/components/QCarousel/QCarousel.d.ts +2 -2
- package/esm/components/QCarousel/QCarousel.d.ts.map +1 -1
- package/esm/components/QCarousel/constants.d.ts.map +1 -1
- package/esm/components/QCarousel/index.d.ts +6 -6
- package/esm/components/QCarousel/types.d.ts +2 -2
- package/esm/components/QCarousel/types.d.ts.map +1 -1
- package/esm/components/QCheckbox/constants.d.ts.map +1 -1
- package/esm/components/QCollapsible/constants.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.d.ts +34 -28
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/constants.d.ts.map +1 -1
- package/esm/components/QCombobox/index.d.ts +26 -23
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QCombobox/types.d.ts +3 -3
- package/esm/components/QCombobox/types.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +54 -36
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/constants.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/index.d.ts +27 -18
- package/esm/components/QDateTimePicker/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/types.d.ts +3 -3
- package/esm/components/QDateTimePicker/types.d.ts.map +1 -1
- package/esm/components/QDefaultsProvider/types.d.ts +2 -2
- package/esm/components/QDefaultsProvider/types.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.d.ts +3 -3
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/constants.d.ts +4 -4
- package/esm/components/QDialog/constants.d.ts.map +1 -1
- package/esm/components/QDialog/index.d.ts +12 -12
- package/esm/components/QDialog/types.d.ts +5 -5
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts +9 -9
- package/esm/components/QDismissibleLayer/QDismissibleLayer.d.ts.map +1 -1
- package/esm/components/QDismissibleLayer/index.d.ts +20 -20
- package/esm/components/QDismissibleLayer/types.d.ts +2 -2
- package/esm/components/QDismissibleLayer/types.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenu.d.ts +2 -2
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +20 -20
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/constants.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/index.d.ts +8 -8
- package/esm/components/QDropdownMenu/types.d.ts +3 -3
- package/esm/components/QDropdownMenu/types.d.ts.map +1 -1
- package/esm/components/QFileUpload/constants.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.vue.js +4 -4
- package/esm/components/QIcon/types.d.ts +1 -2
- package/esm/components/QIcon/types.d.ts.map +1 -1
- package/esm/components/QInputGroup/types.d.ts +3 -3
- package/esm/components/QInputGroup/types.d.ts.map +1 -1
- package/esm/components/QList/QList.d.ts +6 -6
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/constants.d.ts.map +1 -1
- package/esm/components/QList/index.d.ts +6 -6
- package/esm/components/QList/types.d.ts +6 -6
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QObfuscation/constants.d.ts.map +1 -1
- package/esm/components/QOverflow/constants.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
- package/esm/components/QPasswordField/constants.d.ts.map +1 -1
- package/esm/components/QPasswordField/index.d.ts +3 -3
- package/esm/components/QPasswordField/types.d.ts +4 -4
- package/esm/components/QPasswordField/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +38 -38
- package/esm/components/QPhoneField/index.d.ts +19 -19
- package/esm/components/QPropertyList/QPropertyList.d.ts +1 -1
- package/esm/components/QPropertyList/constants.d.ts.map +1 -1
- package/esm/components/QPropertyList/index.d.ts +3 -3
- package/esm/components/QPropertyList/types.d.ts +2 -2
- package/esm/components/QPropertyList/types.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.d.ts +2 -2
- package/esm/components/QRemoveScrollBar/QRemoveScrollBar.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/index.d.ts +3 -3
- package/esm/components/QRemoveScrollBar/types.d.ts +2 -2
- package/esm/components/QRemoveScrollBar/types.d.ts.map +1 -1
- package/esm/components/QRemoveScrollBar/utils/gap.d.ts +3 -3
- package/esm/components/QRemoveScrollBar/utils/gap.d.ts.map +1 -1
- package/esm/components/QSection/QSection.d.ts +2 -0
- package/esm/components/QSection/QSection.d.ts.map +1 -1
- package/esm/components/QSection/QSection.vue.js +18 -14
- package/esm/components/QSection/index.d.ts +2 -0
- package/esm/components/QSection/index.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.d.ts +18 -18
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/constants.d.ts.map +1 -1
- package/esm/components/QSelect/index.d.ts +18 -18
- package/esm/components/QSelect/types.d.ts +3 -3
- package/esm/components/QSelect/types.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts +5 -5
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarAnchor.d.ts +2 -2
- package/esm/components/QSidebar/QSidebarAnchor.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.d.ts +6 -0
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/context.d.ts +6 -6
- package/esm/components/QSidebar/context.d.ts.map +1 -1
- package/esm/components/QSidebar/index.d.ts +5 -2
- package/esm/components/QSidebar/index.d.ts.map +1 -1
- package/esm/components/QSidebar/types.d.ts +2 -2
- package/esm/components/QSidebar/types.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.d.ts +18 -12
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +106 -112
- package/esm/components/QTabs/context.d.ts +5 -5
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTabs/index.d.ts +9 -6
- package/esm/components/QTabs/index.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts.map +1 -1
- package/esm/components/QTextArea/QTextArea.vue.js +9 -7
- package/esm/components/QTextField/QTextField.d.ts.map +1 -1
- package/esm/components/QTextField/QTextField.vue.js +11 -9
- package/esm/components/QThemeProvider/types.d.ts +2 -2
- package/esm/components/QThemeProvider/types.d.ts.map +1 -1
- package/esm/components/QToast/QToaster.vue.js +1 -1
- package/esm/components/QToast/constants.d.ts.map +1 -1
- package/esm/components/QToggle/QToggle.vue.js +1 -0
- package/esm/components/QToggle/index.d.ts +3 -0
- package/esm/components/QToggle/index.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroupItem.vue.js +1 -0
- package/esm/components/QTooltip/index.d.ts +3 -3
- package/esm/components/QTooltip/types.d.ts +2 -2
- package/esm/components/QTooltip/types.d.ts.map +1 -1
- package/esm/components/__internal__/QChevron/constants.d.ts.map +1 -1
- package/esm/components/__internal__/QClearButton/constants.d.ts.map +1 -1
- package/esm/components/__internal__/QSafeTriangle/QSafeTriangle.d.ts +1 -1
- package/esm/components/__internal__/QSafeTriangle/index.d.ts +1 -1
- package/esm/composables/defaults.d.ts +7 -7
- package/esm/composables/defaults.d.ts.map +1 -1
- package/esm/composables/index.d.ts +3 -3
- package/esm/composables/index.d.ts.map +1 -1
- package/esm/composables/theme.d.ts +20 -20
- package/esm/composables/theme.d.ts.map +1 -1
- package/esm/composables/useColor/index.d.ts +24 -9
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +17 -10
- package/esm/composables/useColor/types.d.ts +3 -3
- package/esm/composables/useColor/types.d.ts.map +1 -1
- package/esm/composables/useDialog/index.d.ts +3 -3
- package/esm/composables/useDialog/index.d.ts.map +1 -1
- package/esm/composables/useDialog/types.d.ts +3 -3
- package/esm/composables/useDialog/types.d.ts.map +1 -1
- package/esm/composables/useDismissibleLayerStack/index.d.ts +2 -2
- package/esm/composables/useDismissibleLayerStack/index.d.ts.map +1 -1
- package/esm/composables/useEnabledSelection/index.d.ts +33 -0
- package/esm/composables/useEnabledSelection/index.d.ts.map +1 -0
- package/esm/composables/useEnabledSelection/index.js +15 -0
- package/esm/composables/useGroup/index.d.ts +6 -6
- package/esm/composables/useGroup/index.d.ts.map +1 -1
- package/esm/composables/useToast/index.d.ts +3 -3
- package/esm/composables/useToast/index.d.ts.map +1 -1
- package/esm/composables/useToast/types.d.ts +3 -3
- package/esm/composables/useToast/types.d.ts.map +1 -1
- package/esm/framework.d.ts +6 -6
- package/esm/framework.d.ts.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/symbols/dismissibleLayer.d.ts +2 -2
- package/esm/symbols/dismissibleLayer.d.ts.map +1 -1
- package/esm/templates/theme.d.ts +3 -3
- package/esm/templates/theme.d.ts.map +1 -1
- package/esm/utils/color/merge.d.ts +3 -3
- package/esm/utils/color/merge.d.ts.map +1 -1
- package/esm/utils/color/theme-colors.d.ts +2 -2
- package/esm/utils/color/theme-colors.d.ts.map +1 -1
- package/esm/utils/color/types.d.ts +2 -2
- package/esm/utils/color/types.d.ts.map +1 -1
- package/esm/utils/theme.d.ts +9 -9
- package/esm/utils/theme.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -44,17 +44,18 @@ var S = [
|
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
y(E, (e) => D.value = e, { immediate: !0 });
|
|
47
|
-
let O = e(m(w, "id")), k = _("field"), A = _("input"), j = r(() => w.readonly || w.disabled ? void 0 : w.placeholder),
|
|
48
|
-
function
|
|
49
|
-
|
|
47
|
+
let O = e(m(w, "id")), k = _("field"), A = _("input"), j = r(() => `${O.value}_input`), M = r(() => w.readonly || w.disabled ? void 0 : w.placeholder), N = r(() => w.clearable && !w.readonly && !w.disabled), P = r(() => N.value && E.value);
|
|
48
|
+
function F(e) {
|
|
49
|
+
N.value && (E.value = "", T("click:clear", e));
|
|
50
50
|
}
|
|
51
51
|
return l({
|
|
52
52
|
fieldRef: r(() => k.value?.fieldRef),
|
|
53
53
|
inputRef: A
|
|
54
54
|
}), (e, r) => (f(), i(h(t), {
|
|
55
|
+
id: h(O),
|
|
55
56
|
ref: "field",
|
|
56
57
|
class: d(["q-text-field", w.class]),
|
|
57
|
-
for:
|
|
58
|
+
for: j.value,
|
|
58
59
|
label: w.label,
|
|
59
60
|
"label-position": w.labelPosition,
|
|
60
61
|
size: w.size,
|
|
@@ -66,14 +67,14 @@ var S = [
|
|
|
66
67
|
"label.prepend": b(() => [p(e.$slots, "label.prepend")]),
|
|
67
68
|
"label.append": b(() => [p(e.$slots, "label.append")]),
|
|
68
69
|
default: b(() => [x(o("input", u({
|
|
69
|
-
id:
|
|
70
|
+
id: j.value,
|
|
70
71
|
ref: "input",
|
|
71
72
|
"onUpdate:modelValue": r[0] ||= (e) => D.value = e,
|
|
72
73
|
class: "q-text-field__input",
|
|
73
74
|
type: w.type,
|
|
74
75
|
maxlength: w.maxLength,
|
|
75
76
|
required: w.required,
|
|
76
|
-
placeholder:
|
|
77
|
+
placeholder: M.value,
|
|
77
78
|
readonly: w.readonly,
|
|
78
79
|
disabled: w.disabled
|
|
79
80
|
}, e.$attrs), null, 16, S), [[v, D.value]])]),
|
|
@@ -84,13 +85,13 @@ var S = [
|
|
|
84
85
|
fn: b(() => [p(e.$slots, "prepend")]),
|
|
85
86
|
key: "0"
|
|
86
87
|
} : void 0,
|
|
87
|
-
e.$slots.append ||
|
|
88
|
+
e.$slots.append || P.value ? {
|
|
88
89
|
name: "append",
|
|
89
|
-
fn: b(() => [p(e.$slots, "append"),
|
|
90
|
+
fn: b(() => [p(e.$slots, "append"), P.value ? (f(), i(h(n), {
|
|
90
91
|
key: 0,
|
|
91
92
|
"data-testid": "q-text-field__clear-button",
|
|
92
93
|
texts: w.texts,
|
|
93
|
-
onClick:
|
|
94
|
+
onClick: F
|
|
94
95
|
}, null, 8, ["texts"])) : a("v-if", !0)]),
|
|
95
96
|
key: "1"
|
|
96
97
|
} : void 0,
|
|
@@ -100,6 +101,7 @@ var S = [
|
|
|
100
101
|
key: "2"
|
|
101
102
|
} : void 0
|
|
102
103
|
]), 1032, [
|
|
104
|
+
"id",
|
|
103
105
|
"class",
|
|
104
106
|
"for",
|
|
105
107
|
"label",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QThemeDefinition } from '../../composables/theme';
|
|
2
2
|
import { QBaseComponentProps } from '../../types/component';
|
|
3
3
|
export type QThemeProviderProps = QBaseComponentProps & {
|
|
4
4
|
/**
|
|
@@ -6,6 +6,6 @@ export type QThemeProviderProps = QBaseComponentProps & {
|
|
|
6
6
|
*
|
|
7
7
|
* @category Content
|
|
8
8
|
*/
|
|
9
|
-
theme: string |
|
|
9
|
+
theme: string | QThemeDefinition;
|
|
10
10
|
};
|
|
11
11
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QThemeProvider/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QThemeProvider/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IACvD;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAAA;CAChC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/QToast/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;CAIY,CAAA"}
|
|
@@ -11,6 +11,7 @@ declare const QToggle: {
|
|
|
11
11
|
size?: import('../..').QComponentSize;
|
|
12
12
|
iconPos?: import('..').QButtonIconPosition;
|
|
13
13
|
pill?: boolean;
|
|
14
|
+
effect?: import('..').QButtonEffect;
|
|
14
15
|
disabled?: boolean;
|
|
15
16
|
loading?: boolean;
|
|
16
17
|
tabindex?: number;
|
|
@@ -37,6 +38,7 @@ declare const QToggle: {
|
|
|
37
38
|
size?: import('../..').QComponentSize;
|
|
38
39
|
iconPos?: import('..').QButtonIconPosition;
|
|
39
40
|
pill?: boolean;
|
|
41
|
+
effect?: import('..').QButtonEffect;
|
|
40
42
|
disabled?: boolean;
|
|
41
43
|
loading?: boolean;
|
|
42
44
|
tabindex?: number;
|
|
@@ -58,6 +60,7 @@ declare const QToggle: {
|
|
|
58
60
|
size?: import('../..').QComponentSize;
|
|
59
61
|
iconPos?: import('..').QButtonIconPosition;
|
|
60
62
|
pill?: boolean;
|
|
63
|
+
effect?: import('..').QButtonEffect;
|
|
61
64
|
disabled?: boolean;
|
|
62
65
|
loading?: boolean;
|
|
63
66
|
tabindex?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QToggle/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QToggle/index.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA4B,CAAA;AAGzC,OAAO,EAAE,OAAO,EAAE,CAAA;AAGlB,cAAc,SAAS,CAAA"}
|
|
@@ -4,7 +4,7 @@ declare const QTooltip: {
|
|
|
4
4
|
} & import('../..').QBaseComponentProps & {
|
|
5
5
|
anchor?: import('../../utils/getElement').Selector;
|
|
6
6
|
text: string;
|
|
7
|
-
icon?: import('..').
|
|
7
|
+
icon?: import('..').QIconProps;
|
|
8
8
|
appearance?: import('..').QOverlayAppearance;
|
|
9
9
|
placement?: import('..').QOverlayPlacement;
|
|
10
10
|
arrow?: boolean;
|
|
@@ -38,7 +38,7 @@ declare const QTooltip: {
|
|
|
38
38
|
} & import('../..').QBaseComponentProps & {
|
|
39
39
|
anchor?: import('../../utils/getElement').Selector;
|
|
40
40
|
text: string;
|
|
41
|
-
icon?: import('..').
|
|
41
|
+
icon?: import('..').QIconProps;
|
|
42
42
|
appearance?: import('..').QOverlayAppearance;
|
|
43
43
|
placement?: import('..').QOverlayPlacement;
|
|
44
44
|
arrow?: boolean;
|
|
@@ -67,7 +67,7 @@ declare const QTooltip: {
|
|
|
67
67
|
} & import('../..').QBaseComponentProps & {
|
|
68
68
|
anchor?: import('../../utils/getElement').Selector;
|
|
69
69
|
text: string;
|
|
70
|
-
icon?: import('..').
|
|
70
|
+
icon?: import('..').QIconProps;
|
|
71
71
|
appearance?: import('..').QOverlayAppearance;
|
|
72
72
|
placement?: import('..').QOverlayPlacement;
|
|
73
73
|
arrow?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Appearance, Placement, Trigger } from '../../utils/overlay';
|
|
2
2
|
import { Selector } from '../../utils/getElement';
|
|
3
|
-
import {
|
|
3
|
+
import { QIconProps } from '../QIcon';
|
|
4
4
|
import { QBaseComponentProps } from '../../types/component';
|
|
5
5
|
export type QTooltipProps = QBaseComponentProps & {
|
|
6
6
|
/**
|
|
@@ -20,7 +20,7 @@ export type QTooltipProps = QBaseComponentProps & {
|
|
|
20
20
|
*
|
|
21
21
|
* @category Content
|
|
22
22
|
*/
|
|
23
|
-
icon?:
|
|
23
|
+
icon?: QIconProps;
|
|
24
24
|
/**
|
|
25
25
|
* The appearance of the tooltip.
|
|
26
26
|
* 'regular' uses body text color for background and body background color for text.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QTooltip/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG;IACjD;;;;OAIG;IACH,MAAM,CAAC,EAAE,QAAQ,CAAA;IAEjB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,UAAU,CAAA;IAEvB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IAErB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/__internal__/QChevron/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/__internal__/QChevron/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;;;CAIY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/__internal__/QClearButton/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;CAEQ,CAAA;AAGlC,eAAO,MAAM,aAAa;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/__internal__/QClearButton/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;;CAEQ,CAAA;AAGlC,eAAO,MAAM,aAAa;;;;CAIY,CAAA"}
|
|
@@ -3,8 +3,8 @@ declare const _default: import('vue').DefineComponent<QSafeTriangleProps, {}, {}
|
|
|
3
3
|
width: number;
|
|
4
4
|
path: string;
|
|
5
5
|
top: number;
|
|
6
|
-
height: number;
|
|
7
6
|
left: number;
|
|
7
|
+
height: number;
|
|
8
8
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
export default _default;
|
|
10
10
|
//# sourceMappingURL=QSafeTriangle.vue.d.ts.map
|
|
@@ -2,8 +2,8 @@ declare const QSafeTriangle: import('vue').DefineComponent<import('./types').QSa
|
|
|
2
2
|
width: number;
|
|
3
3
|
path: string;
|
|
4
4
|
top: number;
|
|
5
|
-
height: number;
|
|
6
5
|
left: number;
|
|
6
|
+
height: number;
|
|
7
7
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
8
|
export { QSafeTriangle };
|
|
9
9
|
export * from './types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
2
|
export declare const DEFAULTS_SYMBOL = "q-defaults";
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export declare function useDefaults(): ComputedRef<
|
|
3
|
+
export type QDefaults = Record<string | symbol, QComponentDefaults>;
|
|
4
|
+
export type QComponentDefaults = Record<string | symbol, unknown>;
|
|
5
|
+
export declare function useDefaults(): ComputedRef<QComponentDefaults | undefined>;
|
|
6
6
|
/**
|
|
7
7
|
* Function to provide or update default values using the Vue.js `provide` function.
|
|
8
8
|
* It takes a set of default values, merges them with the existing defaults (if any),
|
|
@@ -10,15 +10,15 @@ export declare function useDefaults(): ComputedRef<ComponentDefaults | undefined
|
|
|
10
10
|
*
|
|
11
11
|
* @param defaults - The default values to be provided or updated.
|
|
12
12
|
*/
|
|
13
|
-
export declare function provideDefaults(defaults: MaybeRefOrGetter<
|
|
13
|
+
export declare function provideDefaults(defaults: MaybeRefOrGetter<QDefaults>): void;
|
|
14
14
|
/**
|
|
15
15
|
* Function to inject default values using the Vue.js `inject` function.
|
|
16
16
|
* It retrieves the default values from the specified symbol and ensures
|
|
17
|
-
* that the returned value is of type `ComputedRef<
|
|
17
|
+
* that the returned value is of type `ComputedRef<QDefaults>`.
|
|
18
18
|
*
|
|
19
19
|
* @throws {Error} Throws an error if the defaults instance is not found.
|
|
20
20
|
*
|
|
21
|
-
* @returns {ComputedRef<
|
|
21
|
+
* @returns {ComputedRef<QDefaults>} A computed reference to the default values.
|
|
22
22
|
*/
|
|
23
|
-
export declare function injectDefaults(): ComputedRef<
|
|
23
|
+
export declare function injectDefaults(): ComputedRef<QDefaults>;
|
|
24
24
|
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/composables/defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAOxD,eAAO,MAAM,eAAe,eAAe,CAAA;AAE3C,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/composables/defaults.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAA;AAOxD,eAAO,MAAM,eAAe,eAAe,CAAA;AAE3C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,kBAAkB,CAAC,CAAA;AAEnE,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,CAAA;AAEjE,wBAAgB,WAAW,IAAI,WAAW,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAgBzE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,IAAI,CAY3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAAC,SAAS,CAAC,CAMvD"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Add new exports here **only if** the composable is meant to be
|
|
15
15
|
* consumed by applications or other packages.
|
|
16
16
|
*/
|
|
17
|
-
export { provideTheme, useTheme, type
|
|
18
|
-
export { useDialog, type
|
|
19
|
-
export { useToast, type
|
|
17
|
+
export { provideTheme, useTheme, type QThemeDefinition } from './theme';
|
|
18
|
+
export { useDialog, type QDialogItem, type QUseDialogReturn } from './useDialog';
|
|
19
|
+
export { useToast, type QToastItem, type QUseToastReturn } 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,
|
|
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,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAGvE,OAAO,EAAE,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAGhF,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ComputedRef, DeepReadonly, InjectionKey, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
export declare const ThemeSymbol: InjectionKey<
|
|
2
|
+
import { QColorScheme } from '../utils/color';
|
|
3
|
+
export declare const ThemeSymbol: InjectionKey<QThemeInstance>;
|
|
4
4
|
/**
|
|
5
5
|
* Represents the two available theme modes for the application: light and dark.
|
|
6
6
|
*/
|
|
7
|
-
export type
|
|
7
|
+
export type QThemeMode = 'light' | 'dark';
|
|
8
8
|
/**
|
|
9
9
|
* Represents the theme configuration for the application, including the default theme
|
|
10
10
|
* and a list of available themes with customizable color schemes.
|
|
11
11
|
*/
|
|
12
|
-
export type
|
|
12
|
+
export type QAppThemes = {
|
|
13
13
|
/** The name of the default theme to be applied initially. */
|
|
14
14
|
defaultTheme: string;
|
|
15
15
|
/** An array of theme definitions available for the application. */
|
|
@@ -17,33 +17,33 @@ export type AppThemes = {
|
|
|
17
17
|
/** The name of the theme. */
|
|
18
18
|
name: string;
|
|
19
19
|
/** The mode of the theme (e.g., light or dark). */
|
|
20
|
-
mode:
|
|
20
|
+
mode: QThemeMode;
|
|
21
21
|
/** An optional object to customize the color scheme of the theme. */
|
|
22
|
-
colors?: Partial<
|
|
22
|
+
colors?: Partial<QColorScheme>;
|
|
23
23
|
}>;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Defines the structure of a theme, including its name, mode, and color scheme.
|
|
27
27
|
*/
|
|
28
|
-
export type
|
|
28
|
+
export type QThemeDefinition = {
|
|
29
29
|
/** The unique name of the theme. */
|
|
30
30
|
name: string;
|
|
31
31
|
/** The mode of the theme (e.g., light or dark). */
|
|
32
|
-
mode:
|
|
32
|
+
mode: QThemeMode;
|
|
33
33
|
/** The color scheme associated with the theme. */
|
|
34
|
-
scheme:
|
|
34
|
+
scheme: QColorScheme;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
37
|
* Represents an instance of a theme, containing reactive properties for
|
|
38
38
|
* managing theme state and accessing theme definitions.
|
|
39
39
|
*/
|
|
40
|
-
export type
|
|
40
|
+
export type QThemeInstance = {
|
|
41
41
|
/** The reactive reference to the active theme's name. */
|
|
42
42
|
readonly name: Ref<string>;
|
|
43
43
|
/** A computed reference to the current theme definition. */
|
|
44
|
-
readonly current: DeepReadonly<ComputedRef<
|
|
44
|
+
readonly current: DeepReadonly<ComputedRef<QThemeDefinition>>;
|
|
45
45
|
/** An array of available theme definitions. */
|
|
46
|
-
readonly themes: DeepReadonly<Ref<
|
|
46
|
+
readonly themes: DeepReadonly<Ref<QThemeDefinition[]>>;
|
|
47
47
|
/** The theme class name. */
|
|
48
48
|
readonly class: ComputedRef<string>;
|
|
49
49
|
/** The theme CSS definition. */
|
|
@@ -54,24 +54,24 @@ export type ThemeInstance = {
|
|
|
54
54
|
*
|
|
55
55
|
* @returns The current theme configuration.
|
|
56
56
|
*/
|
|
57
|
-
export declare function useTheme():
|
|
57
|
+
export declare function useTheme(): QThemeInstance;
|
|
58
58
|
/**
|
|
59
59
|
* Provides and manages a reactive theme instance within Vue’s dependency injection system.
|
|
60
60
|
*
|
|
61
61
|
* This function:
|
|
62
62
|
* - Retrieves the current list of available themes from the existing theme context.
|
|
63
|
-
* - Resolves the input (`nameOrDef`) to either a theme name or a full `
|
|
64
|
-
* - If a `
|
|
65
|
-
* - Creates a new reactive `
|
|
66
|
-
* - Provides the new `
|
|
63
|
+
* - Resolves the input (`nameOrDef`) to either a theme name or a full `QThemeDefinition`.
|
|
64
|
+
* - If a `QThemeDefinition` is provided, it is appended to the existing list of themes.
|
|
65
|
+
* - Creates a new reactive `QThemeInstance` bound to the resolved name and theme list.
|
|
66
|
+
* - Provides the new `QThemeInstance` under `ThemeSymbol`, making it available to descendants via `useTheme()`.
|
|
67
67
|
*
|
|
68
68
|
* @param nameOrDef - The theme to activate, given as either:
|
|
69
69
|
* - A theme name (`string`), or a reactive source (`Ref<string>`/getter).
|
|
70
|
-
* - A `
|
|
70
|
+
* - A `QThemeDefinition`, or a reactive source (`Ref<QThemeDefinition>`/getter).
|
|
71
71
|
*
|
|
72
|
-
* @returns The newly created and provided `
|
|
72
|
+
* @returns The newly created and provided `QThemeInstance`.
|
|
73
73
|
*
|
|
74
74
|
* @throws {Error} If the resolved theme name does not exist in the available themes.
|
|
75
75
|
*/
|
|
76
|
-
export declare function provideTheme(nameOrDef: MaybeRefOrGetter<string |
|
|
76
|
+
export declare function provideTheme(nameOrDef: MaybeRefOrGetter<string | QThemeDefinition>): QThemeInstance;
|
|
77
77
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/composables/theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzF,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/composables/theme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAMlD,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,cAAc,CAAyB,CAAA;AAE9E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,MAAM,CAAA;AAEzC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACxB,6DAA6D;IAC7D,YAAY,EAAE,MAAM,CAAA;IAEpB,mEAAmE;IACnE,MAAM,EAAE,KAAK,CAAC;QACb,6BAA6B;QAC7B,IAAI,EAAE,MAAM,CAAA;QAEZ,mDAAmD;QACnD,IAAI,EAAE,UAAU,CAAA;QAEhB,qEAAqE;QACrE,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;KAC9B,CAAC,CAAA;CACF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAA;IAEZ,mDAAmD;IACnD,IAAI,EAAE,UAAU,CAAA;IAEhB,kDAAkD;IAClD,MAAM,EAAE,YAAY,CAAA;CACpB,CAAA;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAE1B,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAE7D,+CAA+C;IAC/C,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAA;IAEtD,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAEnC,gCAAgC;IAChC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;CAC7C,CAAA;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,cAAc,CAQzC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,YAAY,CAC3B,SAAS,EAAE,gBAAgB,CAAC,MAAM,GAAG,gBAAgB,CAAC,GACpD,cAAc,CA2ChB"}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import { MaybeRef } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
type HoverStyle = Pick<
|
|
2
|
+
import { QColorStyle, QUseColorReturn } from './types';
|
|
3
|
+
import { QColorScheme, RGB } from '../../utils/color';
|
|
4
|
+
type HoverStyle = Pick<QColorStyle, 'hoverColor' | 'hoverColorRgb' | 'onHoverColor'>;
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the "on" (contrasting) color for `useColor`'s main color.
|
|
7
|
+
*
|
|
8
|
+
* Theme utility keys with a matching `on*` scheme token use that token directly, so a
|
|
9
|
+
* theme's own contrast choice for e.g. `onPrimary` is respected. Custom CSS colors and
|
|
10
|
+
* utilities without an `on*` token fall back to WCAG relative luminance via
|
|
11
|
+
* {@link getContrastingColor}.
|
|
12
|
+
*
|
|
13
|
+
* @param rawColor - The original color input (utility key or CSS color).
|
|
14
|
+
* @param isUtilityColor - Whether `rawColor` is a BEM theme utility key.
|
|
15
|
+
* @param scheme - The active color scheme.
|
|
16
|
+
* @param mainRgb - Parsed RGB of the resolved main color.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveOnMainColor(rawColor: string, isUtilityColor: boolean, scheme: Readonly<QColorScheme>, mainRgb: RGB): string;
|
|
5
19
|
/**
|
|
6
20
|
* Resolves hover colors for `useColor`.
|
|
7
21
|
*
|
|
@@ -14,7 +28,7 @@ type HoverStyle = Pick<ColorStyle, 'hoverColor' | 'hoverColorRgb' | 'onHoverColo
|
|
|
14
28
|
* @param scheme - The active color scheme.
|
|
15
29
|
* @param mainRgb - Parsed RGB of the resolved main color.
|
|
16
30
|
*/
|
|
17
|
-
export declare function resolveHoverStyle(rawColor: string, isUtilityColor: boolean, scheme: Readonly<
|
|
31
|
+
export declare function resolveHoverStyle(rawColor: string, isUtilityColor: boolean, scheme: Readonly<QColorScheme>, mainRgb: RGB): HoverStyle;
|
|
18
32
|
/**
|
|
19
33
|
* A composable function that processes and returns color-related information and styles.
|
|
20
34
|
*
|
|
@@ -23,7 +37,8 @@ export declare function resolveHoverStyle(rawColor: string, isUtilityColor: bool
|
|
|
23
37
|
* Values such as `var(...)`, `transparent`, `currentColor`, and `inherit`
|
|
24
38
|
* are rejected with a dev warning.
|
|
25
39
|
*
|
|
26
|
-
* `style.onMainColor`
|
|
40
|
+
* `style.onMainColor` uses the theme's own `on*` token for theme utility keys when
|
|
41
|
+
* present (e.g. `onPrimary`), falling back to WCAG relative luminance otherwise.
|
|
27
42
|
* For theme utility keys that have a scheme `*Dark` token, `hoverColor` / `onHoverColor`
|
|
28
43
|
* come from `*Dark` / `on*Dark`. Custom CSS colors, utilities without `*Dark` (such as
|
|
29
44
|
* `background`), and unparsable `*Dark` overrides use `darken(main, COLOR_SCHEME_DARKEN_AMOUNT)` with WCAG
|
|
@@ -35,11 +50,11 @@ export declare function resolveHoverStyle(rawColor: string, isUtilityColor: bool
|
|
|
35
50
|
*
|
|
36
51
|
* @param color - A theme utility key or CSS color value. Can be provided as a ref or plain string.
|
|
37
52
|
*
|
|
38
|
-
* @returns {
|
|
53
|
+
* @returns {QUseColorReturn} An object containing:
|
|
39
54
|
* - isUtilityColor: A computed boolean indicating if the color is a theme utility key
|
|
40
55
|
* - style: A computed object containing:
|
|
41
56
|
* - mainColor: The resolved color value
|
|
42
|
-
* - onMainColor:
|
|
57
|
+
* - onMainColor: Scheme `on*` for utilities when present, otherwise WCAG contrast
|
|
43
58
|
* - hoverColor: Scheme `*Dark` for utilities, otherwise a darkened main color
|
|
44
59
|
* - onHoverColor: Scheme `on*Dark` for utilities when present, otherwise WCAG on hover
|
|
45
60
|
*
|
|
@@ -50,7 +65,7 @@ export declare function resolveHoverStyle(rawColor: string, isUtilityColor: bool
|
|
|
50
65
|
* const { isUtilityColor, style } = useColor(ref('#FF0000'))
|
|
51
66
|
* ```
|
|
52
67
|
*/
|
|
53
|
-
export declare function useColor(color: MaybeRef<string | undefined>):
|
|
68
|
+
export declare function useColor(color: MaybeRef<string | undefined>): QUseColorReturn;
|
|
54
69
|
/**
|
|
55
70
|
* Resolves a color scheme key against a color scheme while preserving CSS and custom colors.
|
|
56
71
|
*
|
|
@@ -65,6 +80,6 @@ export declare function useColor(color: MaybeRef<string | undefined>): UseColorR
|
|
|
65
80
|
* @param scheme - The active color scheme.
|
|
66
81
|
* @returns The scheme value when `color` is a scheme key; otherwise the original string.
|
|
67
82
|
*/
|
|
68
|
-
export declare function resolveColor(color: string, scheme: Readonly<
|
|
83
|
+
export declare function resolveColor(color: string, scheme: Readonly<QColorScheme>): string;
|
|
69
84
|
export {};
|
|
70
85
|
//# 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,EAAE,
|
|
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,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAuB1D,KAAK,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,eAAe,GAAG,cAAc,CAAC,CAAA;AAYpF;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,OAAO,EACvB,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC9B,OAAO,EAAE,GAAG,GACV,MAAM,CAUR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAChC,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,OAAO,EACvB,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,EAC9B,OAAO,EAAE,GAAG,GACV,UAAU,CA4BZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,GAAG,eAAe,CAiD7E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,CAAC,GAAG,MAAM,CAQlF"}
|
|
@@ -17,7 +17,14 @@ function d(n) {
|
|
|
17
17
|
onHoverColor: r(a)
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function f(e,
|
|
20
|
+
function f(e, t, n, i) {
|
|
21
|
+
if (t) {
|
|
22
|
+
let t = n[`on${e.charAt(0).toUpperCase()}${e.slice(1)}`];
|
|
23
|
+
if (typeof t == "string") return t;
|
|
24
|
+
}
|
|
25
|
+
return r(i);
|
|
26
|
+
}
|
|
27
|
+
function p(e, i, a, o) {
|
|
21
28
|
if (i) {
|
|
22
29
|
let i = e, o = a[`${i}Dark`];
|
|
23
30
|
if (typeof o == "string") try {
|
|
@@ -33,25 +40,25 @@ function f(e, i, a, o) {
|
|
|
33
40
|
}
|
|
34
41
|
return d(o);
|
|
35
42
|
}
|
|
36
|
-
function
|
|
37
|
-
let
|
|
43
|
+
function m(e) {
|
|
44
|
+
let r = c(() => l(e)), i = s(), d = c(() => r.value ? a(r.value) : !1);
|
|
38
45
|
return {
|
|
39
|
-
isUtilityColor:
|
|
46
|
+
isUtilityColor: d,
|
|
40
47
|
style: c(() => {
|
|
41
|
-
let e =
|
|
48
|
+
let e = r.value;
|
|
42
49
|
if (!e) return;
|
|
43
|
-
if (!
|
|
50
|
+
if (!d.value && o(e)) {
|
|
44
51
|
u(e);
|
|
45
52
|
return;
|
|
46
53
|
}
|
|
47
|
-
let a =
|
|
54
|
+
let a = h(e, i.current.value.scheme), s;
|
|
48
55
|
try {
|
|
49
56
|
s = n(a);
|
|
50
57
|
} catch {
|
|
51
58
|
u(e);
|
|
52
59
|
return;
|
|
53
60
|
}
|
|
54
|
-
let c =
|
|
61
|
+
let c = f(e, d.value, i.current.value.scheme, s), l = p(e, d.value, i.current.value.scheme, s);
|
|
55
62
|
return {
|
|
56
63
|
mainColor: a,
|
|
57
64
|
mainColorRgb: t(s),
|
|
@@ -61,9 +68,9 @@ function p(e) {
|
|
|
61
68
|
})
|
|
62
69
|
};
|
|
63
70
|
}
|
|
64
|
-
function
|
|
71
|
+
function h(e, t) {
|
|
65
72
|
let n = e.trim();
|
|
66
73
|
return Object.prototype.hasOwnProperty.call(t, n) ? t[n] ?? e : e;
|
|
67
74
|
}
|
|
68
75
|
//#endregion
|
|
69
|
-
export {
|
|
76
|
+
export { h as resolveColor, p as resolveHoverStyle, f as resolveOnMainColor, m as useColor };
|
|
@@ -2,7 +2,7 @@ import { ComputedRef } from 'vue';
|
|
|
2
2
|
/**
|
|
3
3
|
* Represents the color styling configuration for a component.
|
|
4
4
|
*/
|
|
5
|
-
export interface
|
|
5
|
+
export interface QColorStyle {
|
|
6
6
|
/**
|
|
7
7
|
* The main color to be used.
|
|
8
8
|
*/
|
|
@@ -34,7 +34,7 @@ export interface ColorStyle {
|
|
|
34
34
|
/**
|
|
35
35
|
* Interface representing the return type of the `useColor` composable.
|
|
36
36
|
*/
|
|
37
|
-
export interface
|
|
37
|
+
export interface QUseColorReturn {
|
|
38
38
|
/**
|
|
39
39
|
* A computed reference indicating whether the color is a theme utility key.
|
|
40
40
|
*/
|
|
@@ -42,6 +42,6 @@ export interface UseColorReturn {
|
|
|
42
42
|
/**
|
|
43
43
|
* A computed reference to the color style, which may be undefined.
|
|
44
44
|
*/
|
|
45
|
-
style: ComputedRef<
|
|
45
|
+
style: ComputedRef<QColorStyle | undefined>;
|
|
46
46
|
}
|
|
47
47
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -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,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useColor/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAA;AAEtC;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAA;IAEnB;;;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,eAAe;IAC/B;;OAEG;IACH,cAAc,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAEpC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;CAC3C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type {
|
|
1
|
+
import { QUseDialogReturn } from './types';
|
|
2
|
+
export type { QDialogItem, QUseDialogReturn } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Manages programmatic dialogs for the current app (`createFramework`).
|
|
5
5
|
*
|
|
@@ -12,5 +12,5 @@ export type { DialogItem, UseDialogReturn } from './types';
|
|
|
12
12
|
* - removeDialog: A function to remove a QDialog instance.
|
|
13
13
|
* - cancelDialog: A function to cancel a not-yet-registered dialog by `props.id`.
|
|
14
14
|
*/
|
|
15
|
-
export declare function useDialog():
|
|
15
|
+
export declare function useDialog(): QUseDialogReturn;
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAW/C,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE5D;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,IAAI,gBAAgB,CA6F5C"}
|
|
@@ -6,7 +6,7 @@ import { QDialogProps, QDialogOptions, QDialogHandlers } from '../../components/
|
|
|
6
6
|
* `id` is set when the dialog registers during setup. Prefer `await addDialog(...)` to
|
|
7
7
|
* obtain the id rather than reading it from this list before the promise resolves.
|
|
8
8
|
*/
|
|
9
|
-
export type
|
|
9
|
+
export type QDialogItem = {
|
|
10
10
|
/**
|
|
11
11
|
* Unique identifier for the dialog instance, set when the dialog registers during setup.
|
|
12
12
|
*/
|
|
@@ -28,13 +28,13 @@ export type DialogItem = {
|
|
|
28
28
|
* Represents the return type of the `useDialog` composable, providing methods and state
|
|
29
29
|
* for managing dialog instances.
|
|
30
30
|
*/
|
|
31
|
-
export type
|
|
31
|
+
export type QUseDialogReturn = {
|
|
32
32
|
/**
|
|
33
33
|
* Currently active dialogs (public fields only: `id`, `props`, `options`, `handlers`).
|
|
34
34
|
* Read-only: mutating this array does not change the dialog store — use `removeDialog`.
|
|
35
35
|
* `id` is undefined until the dialog registers during setup; use the `addDialog` promise for the id.
|
|
36
36
|
*/
|
|
37
|
-
dialogs: ComputedRef<
|
|
37
|
+
dialogs: ComputedRef<QDialogItem[]>;
|
|
38
38
|
/**
|
|
39
39
|
* Adds a new dialog to the state with the specified properties.
|
|
40
40
|
* Requires a mounted QDialogProvider (exactly one per app); rejects immediately when none is present.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAO,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AA+EnG;;;;;GAKG;AACH,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/composables/useDialog/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAO,MAAM,KAAK,CAAA;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AA+EnG;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACzB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,KAAK,EAAE,YAAY,CAAA;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAA;IAExB;;OAEG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAA;CAC1B,CAAA;AAeD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;;;OAIG;IACH,OAAO,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC,CAAA;IAEnC;;;;;OAKG;IACH,SAAS,CACR,KAAK,EAAE,YAAY,EACnB,OAAO,CAAC,EAAE,cAAc,EACxB,QAAQ,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,MAAM,CAAC,CAAA;IAElB;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;IAE9B;;;OAGG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAA;CAC9B,CAAA"}
|