@quidgest/ui 0.26.0 → 0.27.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 +24 -0
- package/dist/json/api.json +487 -155
- package/dist/manifest/components.json +3 -0
- package/dist/ui.css +1017 -142
- package/dist/ui.esm.js +988 -939
- package/dist/ui.js +1229 -1183
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1229 -1183
- package/dist/ui.scss +1267 -158
- package/esm/components/QAccordion/QAccordion.d.ts.map +1 -1
- package/esm/components/QAccordion/QAccordion.vue.js +19 -18
- package/esm/components/QAccordion/QAccordionItem.vue.js +4 -4
- package/esm/components/QBadge/QBadge.d.ts.map +1 -1
- package/esm/components/QBadge/QBadge.vue.js +58 -55
- package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -1
- package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +17 -16
- package/esm/components/QBreadcrumbs/QBreadcrumb.d.ts +81 -0
- package/esm/components/QBreadcrumbs/QBreadcrumb.d.ts.map +1 -0
- package/esm/components/QBreadcrumbs/QBreadcrumb.vue.js +85 -0
- package/esm/components/QBreadcrumbs/QBreadcrumb2.vue.js +5 -0
- package/esm/components/QBreadcrumbs/QBreadcrumbs.d.ts +22 -0
- package/esm/components/QBreadcrumbs/QBreadcrumbs.d.ts.map +1 -0
- package/esm/components/QBreadcrumbs/QBreadcrumbs.vue.js +74 -0
- package/esm/components/QBreadcrumbs/QBreadcrumbs2.vue.js +5 -0
- package/esm/components/QBreadcrumbs/constants.d.ts +20 -0
- package/esm/components/QBreadcrumbs/constants.d.ts.map +1 -0
- package/esm/components/QBreadcrumbs/constants.js +10 -0
- package/esm/components/QBreadcrumbs/context.d.ts +103 -0
- package/esm/components/QBreadcrumbs/context.d.ts.map +1 -0
- package/esm/components/QBreadcrumbs/context.js +4 -0
- package/esm/components/QBreadcrumbs/index.d.ts +108 -0
- package/esm/components/QBreadcrumbs/index.d.ts.map +1 -0
- package/esm/components/QBreadcrumbs/index.js +7 -0
- package/esm/components/QBreadcrumbs/types.d.ts +100 -0
- package/esm/components/QBreadcrumbs/types.d.ts.map +1 -0
- package/esm/components/QButton/QButton.d.ts.map +1 -1
- package/esm/components/QButton/QButton.vue.js +55 -52
- package/esm/components/QButtonGroup/QButtonGroup.d.ts.map +1 -1
- package/esm/components/QButtonGroup/QButtonGroup.vue.js +16 -15
- package/esm/components/QCard/QCard.d.ts.map +1 -1
- package/esm/components/QCard/QCard.vue.js +51 -52
- package/esm/components/QCarousel/QCarousel.d.ts.map +1 -1
- package/esm/components/QCarousel/QCarousel.vue.js +119 -115
- package/esm/components/QCheckbox/QCheckbox.d.ts.map +1 -1
- package/esm/components/QCheckbox/QCheckbox.vue.js +10 -14
- package/esm/components/QCollapsible/QCollapsible.d.ts.map +1 -1
- package/esm/components/QCollapsible/QCollapsible.vue.js +52 -51
- package/esm/components/QColorPicker/QColorPicker.d.ts.map +1 -1
- package/esm/components/QColorPicker/QColorPicker.vue.js +48 -47
- package/esm/components/QCombobox/QCombobox.d.ts +6 -4
- package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
- package/esm/components/QCombobox/QCombobox.vue.js +119 -116
- package/esm/components/QCombobox/index.d.ts +3 -2
- package/esm/components/QCombobox/index.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +468 -429
- package/esm/components/QDateTimePicker/constants.d.ts +5 -0
- package/esm/components/QDateTimePicker/constants.d.ts.map +1 -1
- package/esm/components/QDateTimePicker/constants.js +5 -0
- package/esm/components/QDialog/QDialog.d.ts +2 -1
- package/esm/components/QDialog/QDialog.d.ts.map +1 -1
- package/esm/components/QDialog/QDialog.vue.js +84 -65
- package/esm/components/QDialog/constants.d.ts +6 -1
- package/esm/components/QDialog/constants.d.ts.map +1 -1
- package/esm/components/QDialog/constants.js +6 -2
- package/esm/components/QDialog/index.d.ts +6 -0
- package/esm/components/QDialog/index.d.ts.map +1 -1
- package/esm/components/QDialog/types.d.ts +13 -1
- package/esm/components/QDialog/types.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.d.ts.map +1 -1
- package/esm/components/QDivider/QDivider.vue.js +22 -21
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts +8 -6
- package/esm/components/QDropdownMenu/QDropdownMenuContent.d.ts.map +1 -1
- package/esm/components/QDropdownMenu/QDropdownMenuContent.vue.js +126 -125
- package/esm/components/QField/QField.d.ts.map +1 -1
- package/esm/components/QField/QField.vue.js +36 -34
- package/esm/components/QFileUpload/QFileUpload.vue.js +16 -16
- package/esm/components/QGauge/QGauge.d.ts +1 -1
- package/esm/components/QGauge/QGauge.d.ts.map +1 -1
- package/esm/components/QGauge/QGauge.vue.js +9 -9
- package/esm/components/QIcon/QIcon.d.ts.map +1 -1
- package/esm/components/QIcon/QIcon.vue.js +20 -19
- package/esm/components/QIcon/QIconFont.d.ts.map +1 -1
- package/esm/components/QIcon/QIconFont.vue.js +13 -12
- package/esm/components/QIcon/QIconImg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconImg.vue.js +12 -11
- package/esm/components/QIcon/QIconSvg.d.ts.map +1 -1
- package/esm/components/QIcon/QIconSvg.vue.js +19 -18
- package/esm/components/QIcon/QSvgSymbol.d.ts +54 -0
- package/esm/components/QIcon/QSvgSymbol.d.ts.map +1 -0
- package/esm/components/QIcon/QSvgSymbol.vue.js +88 -0
- package/esm/components/QIcon/QSvgSymbol2.vue.js +5 -0
- package/esm/components/QInputGroup/QInputGroup.d.ts.map +1 -1
- package/esm/components/QInputGroup/QInputGroup.vue.js +30 -29
- package/esm/components/QLabel/QLabel.d.ts.map +1 -1
- package/esm/components/QLabel/QLabel.vue.js +20 -19
- package/esm/components/QLineLoader/QLineLoader.d.ts.map +1 -1
- package/esm/components/QLineLoader/QLineLoader.vue.js +14 -13
- package/esm/components/QList/QList.d.ts +4 -4
- package/esm/components/QList/QList.d.ts.map +1 -1
- package/esm/components/QList/QList.vue.js +135 -135
- package/esm/components/QList/QListItem.d.ts.map +1 -1
- package/esm/components/QList/QListItem.vue.js +42 -40
- package/esm/components/QList/QListItemGroup.d.ts +1 -1
- package/esm/components/QList/QListItemGroup.d.ts.map +1 -1
- package/esm/components/QList/index.d.ts +2 -2
- package/esm/components/QList/types.d.ts +6 -0
- package/esm/components/QList/types.d.ts.map +1 -1
- package/esm/components/QMeter/QMeter.d.ts.map +1 -1
- package/esm/components/QMeter/QMeter.vue.js +20 -19
- package/esm/components/QObfuscation/QObfuscation.d.ts.map +1 -1
- package/esm/components/QObfuscation/QObfuscation.vue.js +53 -53
- package/esm/components/QOverflow/QOverflow.d.ts +1 -1
- package/esm/components/QOverflow/QOverflow.d.ts.map +1 -1
- package/esm/components/QOverflow/QOverflow.vue.js +10 -10
- package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
- package/esm/components/QOverlay/QOverlay.vue.js +139 -138
- package/esm/components/QPasswordField/QPasswordField.d.ts +2 -0
- package/esm/components/QPasswordField/QPasswordField.d.ts.map +1 -1
- package/esm/components/QPasswordField/QPasswordField.vue.js +63 -60
- package/esm/components/QPasswordField/QPasswordFieldMeterOverlay.vue.js +1 -1
- package/esm/components/QPasswordField/constants.d.ts +4 -0
- package/esm/components/QPasswordField/constants.d.ts.map +1 -1
- package/esm/components/QPasswordField/constants.js +4 -1
- package/esm/components/QPasswordField/index.d.ts +6 -0
- package/esm/components/QPasswordField/index.d.ts.map +1 -1
- package/esm/components/QPasswordField/types.d.ts +7 -1
- package/esm/components/QPasswordField/types.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.d.ts +7 -5
- package/esm/components/QPhoneField/QPhoneField.d.ts.map +1 -1
- package/esm/components/QPhoneField/QPhoneField.vue.js +88 -88
- package/esm/components/QPhoneField/index.d.ts +3 -2
- package/esm/components/QPhoneField/index.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.d.ts.map +1 -1
- package/esm/components/QPopover/QPopover.vue.js +51 -28
- package/esm/components/QProgress/QProgress.vue.js +3 -3
- package/esm/components/QPropertyList/QPropertyList.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyList.vue.js +65 -55
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts +8 -4
- package/esm/components/QPropertyList/QPropertyListGroup.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListGroup.vue.js +31 -28
- package/esm/components/QPropertyList/QPropertyListPanel.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListPanel.vue.js +13 -12
- package/esm/components/QPropertyList/QPropertyListRow.d.ts.map +1 -1
- package/esm/components/QPropertyList/QPropertyListRow.vue.js +41 -16
- package/esm/components/QPropertyList/constants.d.ts +2 -0
- package/esm/components/QPropertyList/constants.d.ts.map +1 -1
- package/esm/components/QPropertyList/constants.js +5 -1
- package/esm/components/QPropertyList/index.d.ts +16 -4
- package/esm/components/QPropertyList/index.d.ts.map +1 -1
- package/esm/components/QSection/QSection.d.ts.map +1 -1
- package/esm/components/QSection/QSection.vue.js +19 -18
- package/esm/components/QSelect/QSelect.d.ts +6 -4
- package/esm/components/QSelect/QSelect.d.ts.map +1 -1
- package/esm/components/QSelect/QSelect.vue.js +129 -124
- package/esm/components/QSelect/index.d.ts +3 -2
- package/esm/components/QSelect/index.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts +1 -1
- package/esm/components/QSidebar/QSidebar.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebar.vue.js +68 -67
- package/esm/components/QSidebar/QSidebarItem.d.ts +1 -1
- package/esm/components/QSidebar/QSidebarItem.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarItem.vue.js +8 -8
- package/esm/components/QSidebar/QSidebarPanel.d.ts.map +1 -1
- package/esm/components/QSidebar/QSidebarPanel.vue.js +40 -36
- package/esm/components/QSidebar/context.d.ts +1 -1
- package/esm/components/QSidebar/context.d.ts.map +1 -1
- package/esm/components/QSidebar/types.d.ts +8 -0
- package/esm/components/QSidebar/types.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/QSkeletonLoader.d.ts.map +1 -1
- package/esm/components/QSkeletonLoader/QSkeletonLoader.vue.js +15 -14
- package/esm/components/QSpinnerLoader/QSpinnerLoader.d.ts.map +1 -1
- package/esm/components/QSpinnerLoader/QSpinnerLoader.vue.js +11 -10
- package/esm/components/QSteps/QStepHeader.d.ts +58 -0
- package/esm/components/QSteps/QStepHeader.d.ts.map +1 -0
- package/esm/components/QSteps/QStepHeader.vue.js +49 -0
- package/esm/components/QSteps/QStepHeader2.vue.js +5 -0
- package/esm/components/QSteps/QSteps.d.ts +269 -0
- package/esm/components/QSteps/QSteps.d.ts.map +1 -0
- package/esm/components/QSteps/QSteps.vue.js +260 -0
- package/esm/components/QSteps/QSteps2.vue.js +5 -0
- package/esm/components/QSteps/QStepsNav.d.ts +59 -0
- package/esm/components/QSteps/QStepsNav.d.ts.map +1 -0
- package/esm/components/QSteps/QStepsNav.vue.js +42 -0
- package/esm/components/QSteps/QStepsNav2.vue.js +5 -0
- package/esm/components/QSteps/constants.d.ts +28 -0
- package/esm/components/QSteps/constants.d.ts.map +1 -0
- package/esm/components/QSteps/constants.js +16 -0
- package/esm/components/QSteps/index.d.ts +228 -0
- package/esm/components/QSteps/index.d.ts.map +1 -0
- package/esm/components/QSteps/index.js +6 -0
- package/esm/components/QSteps/types.d.ts +190 -0
- package/esm/components/QSteps/types.d.ts.map +1 -0
- package/esm/components/QSwitch/QSwitch.vue.js +3 -3
- package/esm/components/QTabs/QTab.d.ts +1 -1
- package/esm/components/QTabs/QTab.d.ts.map +1 -1
- package/esm/components/QTabs/QTab.vue.js +10 -12
- package/esm/components/QTabs/QTabs.d.ts +1 -1
- package/esm/components/QTabs/QTabs.d.ts.map +1 -1
- package/esm/components/QTabs/QTabs.vue.js +108 -107
- package/esm/components/QTabs/context.d.ts +1 -1
- package/esm/components/QTabs/context.d.ts.map +1 -1
- package/esm/components/QTabs/types.d.ts +1 -1
- package/esm/components/QTextArea/QTextArea.d.ts +1 -1
- package/esm/components/QTextArea/index.d.ts +3 -3
- package/esm/components/QThemeProvider/QThemeProvider.vue.js +3 -3
- package/esm/components/QToast/QToast.d.ts +2 -1
- package/esm/components/QToast/QToast.d.ts.map +1 -1
- package/esm/components/QToast/QToast.vue.js +95 -78
- package/esm/components/QToast/QToaster.d.ts.map +1 -1
- package/esm/components/QToast/QToaster.vue.js +20 -19
- package/esm/components/QToast/constants.d.ts +3 -0
- package/esm/components/QToast/constants.d.ts.map +1 -1
- package/esm/components/QToast/constants.js +2 -2
- package/esm/components/QToast/index.d.ts +6 -0
- package/esm/components/QToast/index.d.ts.map +1 -1
- package/esm/components/QToast/types.d.ts +7 -1
- package/esm/components/QToast/types.d.ts.map +1 -1
- package/esm/components/QToggle/QToggle.d.ts.map +1 -1
- package/esm/components/QToggle/QToggle.vue.js +52 -15
- package/esm/components/QToggleGroup/QToggleGroup.d.ts.map +1 -1
- package/esm/components/QToggleGroup/QToggleGroup.vue.js +21 -20
- package/esm/components/QTooltip/QTooltip.vue.js +5 -5
- package/esm/components/__internal__/QChevron/QChevron.d.ts.map +1 -1
- package/esm/components/__internal__/QChevron/QChevron.vue.js +16 -15
- package/esm/components/__internal__/QClearButton/QClearButton.d.ts.map +1 -1
- package/esm/components/__internal__/QClearButton/QClearButton.vue.js +19 -18
- package/esm/components/index.d.ts +2 -0
- package/esm/components/index.d.ts.map +1 -1
- package/esm/components/index.js +108 -103
- package/esm/composables/useColor/index.d.ts +2 -0
- package/esm/composables/useColor/index.d.ts.map +1 -1
- package/esm/composables/useColor/index.js +49 -39
- package/esm/composables/useColor/types.d.ts +15 -0
- package/esm/composables/useColor/types.d.ts.map +1 -1
- package/esm/index.d.ts +3 -0
- package/esm/utils/color/contrast.d.ts +20 -0
- package/esm/utils/color/contrast.d.ts.map +1 -1
- package/esm/utils/color/contrast.js +24 -13
- package/esm/utils/color/merge.js +8 -8
- package/esm/utils/index.js +56 -54
- package/package.json +12 -6
- package/esm/components/QIcon/InlineSvg.d.ts +0 -110
- package/esm/components/QIcon/InlineSvg.d.ts.map +0 -1
- package/esm/components/QIcon/InlineSvg.js +0 -95
- package/esm/utils/time.d.ts +0 -36
- package/esm/utils/time.d.ts.map +0 -1
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
import { rgbToHex as e } from "./conversion.js";
|
|
2
|
-
import {
|
|
2
|
+
import { darken as t, lighten as n } from "./manipulate.js";
|
|
3
|
+
import { parseColor as r } from "./parse.js";
|
|
3
4
|
//#region src/utils/color/contrast.ts
|
|
4
|
-
function
|
|
5
|
+
function i(e) {
|
|
5
6
|
let t = e / 255;
|
|
6
7
|
return t <= .03928 ? t / 12.92 : ((t + .055) / 1.055) ** 2.4;
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
let t =
|
|
10
|
-
return .2126 * t + .7152 *
|
|
9
|
+
function a(e) {
|
|
10
|
+
let t = i(e.r), n = i(e.g), r = i(e.b);
|
|
11
|
+
return .2126 * t + .7152 * n + .0722 * r;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function o(e, t) {
|
|
13
14
|
let n = Math.max(e, t), r = Math.min(e, t);
|
|
14
15
|
return (n + .05) / (r + .05);
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
|
|
17
|
+
function s(i, s, l = 4.5) {
|
|
18
|
+
let u = r(i), d = r(s), f = a(d), p = (e) => o(a(e), f);
|
|
19
|
+
if (p(u) >= l) return i;
|
|
20
|
+
let m = c(d) === "#000", h = (e) => m ? t(u, e) : n(u, e), g = 0, _ = 100, v = h(100);
|
|
21
|
+
for (let e = 0; e < 16; e++) {
|
|
22
|
+
let e = (g + _) / 2, t = h(e);
|
|
23
|
+
p(t) >= l ? (v = t, _ = e) : g = e;
|
|
24
|
+
}
|
|
25
|
+
return e(v);
|
|
26
|
+
}
|
|
27
|
+
function c(e) {
|
|
28
|
+
let t = a(e), n = o(t, 0);
|
|
29
|
+
return o(t, 1) >= n ? "#fff" : "#000";
|
|
19
30
|
}
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
return
|
|
31
|
+
function l(t) {
|
|
32
|
+
let n = r(t);
|
|
33
|
+
return n.r = 255 - n.r, n.g = 255 - n.g, n.b = 255 - n.b, e(n);
|
|
23
34
|
}
|
|
24
35
|
//#endregion
|
|
25
|
-
export {
|
|
36
|
+
export { s as ensureContrast, l as getComplementaryColor, o as getContrastRatio, c as getContrastingColor, a as getRelativeLuminance };
|
package/esm/utils/color/merge.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { rgbToHex as e } from "./conversion.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { darken as t, lighten as n } from "./manipulate.js";
|
|
3
|
+
import { parseColor as r } from "./parse.js";
|
|
4
|
+
import { getComplementaryColor as i, getContrastingColor as a } from "./contrast.js";
|
|
5
5
|
function o(o, s) {
|
|
6
|
-
let c = { ...o }, l = (
|
|
7
|
-
let o =
|
|
6
|
+
let c = { ...o }, l = (i, a) => {
|
|
7
|
+
let o = r(i), s = e(n(o, 75)), c = e(t(o, 25)), l = a.toString().replace(/(Light|Dark)$/, "");
|
|
8
8
|
return {
|
|
9
|
-
[l]:
|
|
9
|
+
[l]: i,
|
|
10
10
|
[`${l}Light`]: s,
|
|
11
11
|
[`${l}Dark`]: c
|
|
12
12
|
};
|
|
13
|
-
}, u = (e) => r(
|
|
13
|
+
}, u = (e) => a(r(e));
|
|
14
14
|
for (let e of [
|
|
15
15
|
"primary",
|
|
16
16
|
"secondary",
|
|
@@ -29,7 +29,7 @@ function o(o, s) {
|
|
|
29
29
|
s[t] || (s[n] && (c[n] = s[n], s[a] || (c[a] = u(s[n]))), s[r] && (c[r] = s[r], s[o] || (c[o] = u(s[r])))), s[i] && (c[i] = s[i]), s[a] && (c[a] = s[a]), s[o] && (c[o] = s[o]);
|
|
30
30
|
}
|
|
31
31
|
if (s.primary && !s.highlight) {
|
|
32
|
-
let e =
|
|
32
|
+
let e = i(s.primary), t = l(e, "highlight");
|
|
33
33
|
Object.assign(c, t), c.onHighlight = u(e), c.onHighlightLight = u(t.highlightLight), c.onHighlightDark = u(t.highlightDark);
|
|
34
34
|
}
|
|
35
35
|
for (let e of ["background", "container"]) if (s[e]) {
|
package/esm/utils/index.js
CHANGED
|
@@ -1,66 +1,68 @@
|
|
|
1
1
|
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { hslToRgb as t, hueToRgb as n, rgbToHex as r, rgbToHsl as i, rgbToVariableString as a } from "./color/conversion.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { mergeColorSchemes as
|
|
7
|
-
import { THEME_COLOR_KEYS as
|
|
8
|
-
import { addDays as
|
|
9
|
-
import { applyMask as
|
|
10
|
-
import { DENSITIES as
|
|
3
|
+
import { darken as o, lighten as s } from "./color/manipulate.js";
|
|
4
|
+
import { isValidHex as c, parseColor as l, tryParseColor as u, tryParseRgb as d } from "./color/parse.js";
|
|
5
|
+
import { ensureContrast as f, getComplementaryColor as p, getContrastRatio as m, getContrastingColor as h, getRelativeLuminance as g } from "./color/contrast.js";
|
|
6
|
+
import { mergeColorSchemes as _ } from "./color/merge.js";
|
|
7
|
+
import { THEME_COLOR_KEYS as v, isThemeColor as y, isUnsupportedColor as b } from "./color/theme-colors.js";
|
|
8
|
+
import { addDays as x, addMonths as S, advancePastFormatLiteral as C, clampDayByMonthYear as w, clampNumericSegments as T, completePartialDateInput as E, convertDatePatternToMask as D, formatDate as O, formatUsesSeconds as k, formatUsesTime as A, getDaysInMonth as j, getEndOfDay as M, getFirstDayOfMonth as N, getFirstDayOfWeek as P, getLastDayOfMonth as F, getStartOfDay as I, inputIncludesTimePortion as L, isBetween as R, isLeapYear as z, isSameDay as B, isTimeOnlyFormat as V, normalizeNumericToken as H, padNumber as U, parseDate as W, parseDateWithCompletion as G, parseIsoDate as K, uses12HourFormat as q } from "./date.js";
|
|
9
|
+
import { applyMask as J } from "./mask.js";
|
|
10
|
+
import { DENSITIES as Y, getGlobalDensity as X, setGlobalDensity as Z } from "./density.js";
|
|
11
11
|
//#region src/utils/index.ts
|
|
12
|
-
var
|
|
12
|
+
var Q = /* @__PURE__ */ e({
|
|
13
13
|
COLOR_SCHEME_DARKEN_AMOUNT: () => 25,
|
|
14
14
|
COLOR_SCHEME_LIGHTEN_AMOUNT: () => 75,
|
|
15
|
-
DENSITIES: () =>
|
|
16
|
-
THEME_COLOR_KEYS: () =>
|
|
17
|
-
addDays: () =>
|
|
18
|
-
addMonths: () =>
|
|
19
|
-
advancePastFormatLiteral: () =>
|
|
20
|
-
applyMask: () =>
|
|
21
|
-
clampDayByMonthYear: () =>
|
|
22
|
-
clampNumericSegments: () =>
|
|
23
|
-
completePartialDateInput: () =>
|
|
24
|
-
convertDatePatternToMask: () =>
|
|
25
|
-
darken: () =>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
DENSITIES: () => Y,
|
|
16
|
+
THEME_COLOR_KEYS: () => v,
|
|
17
|
+
addDays: () => x,
|
|
18
|
+
addMonths: () => S,
|
|
19
|
+
advancePastFormatLiteral: () => C,
|
|
20
|
+
applyMask: () => J,
|
|
21
|
+
clampDayByMonthYear: () => w,
|
|
22
|
+
clampNumericSegments: () => T,
|
|
23
|
+
completePartialDateInput: () => E,
|
|
24
|
+
convertDatePatternToMask: () => D,
|
|
25
|
+
darken: () => o,
|
|
26
|
+
ensureContrast: () => f,
|
|
27
|
+
formatDate: () => O,
|
|
28
|
+
formatUsesSeconds: () => k,
|
|
29
|
+
formatUsesTime: () => A,
|
|
30
|
+
getComplementaryColor: () => p,
|
|
31
|
+
getContrastRatio: () => m,
|
|
32
|
+
getContrastingColor: () => h,
|
|
33
|
+
getDaysInMonth: () => j,
|
|
34
|
+
getEndOfDay: () => M,
|
|
35
|
+
getFirstDayOfMonth: () => N,
|
|
36
|
+
getFirstDayOfWeek: () => P,
|
|
37
|
+
getGlobalDensity: () => X,
|
|
38
|
+
getLastDayOfMonth: () => F,
|
|
39
|
+
getRelativeLuminance: () => g,
|
|
40
|
+
getStartOfDay: () => I,
|
|
39
41
|
hslToRgb: () => t,
|
|
40
42
|
hueToRgb: () => n,
|
|
41
|
-
inputIncludesTimePortion: () =>
|
|
42
|
-
isBetween: () =>
|
|
43
|
-
isLeapYear: () =>
|
|
44
|
-
isSameDay: () =>
|
|
45
|
-
isThemeColor: () =>
|
|
46
|
-
isTimeOnlyFormat: () =>
|
|
47
|
-
isUnsupportedColor: () =>
|
|
48
|
-
isValidHex: () =>
|
|
49
|
-
lighten: () =>
|
|
50
|
-
mergeColorSchemes: () =>
|
|
51
|
-
normalizeNumericToken: () =>
|
|
52
|
-
padNumber: () =>
|
|
53
|
-
parseColor: () =>
|
|
54
|
-
parseDate: () =>
|
|
55
|
-
parseDateWithCompletion: () =>
|
|
56
|
-
parseIsoDate: () =>
|
|
43
|
+
inputIncludesTimePortion: () => L,
|
|
44
|
+
isBetween: () => R,
|
|
45
|
+
isLeapYear: () => z,
|
|
46
|
+
isSameDay: () => B,
|
|
47
|
+
isThemeColor: () => y,
|
|
48
|
+
isTimeOnlyFormat: () => V,
|
|
49
|
+
isUnsupportedColor: () => b,
|
|
50
|
+
isValidHex: () => c,
|
|
51
|
+
lighten: () => s,
|
|
52
|
+
mergeColorSchemes: () => _,
|
|
53
|
+
normalizeNumericToken: () => H,
|
|
54
|
+
padNumber: () => U,
|
|
55
|
+
parseColor: () => l,
|
|
56
|
+
parseDate: () => W,
|
|
57
|
+
parseDateWithCompletion: () => G,
|
|
58
|
+
parseIsoDate: () => K,
|
|
57
59
|
rgbToHex: () => r,
|
|
58
60
|
rgbToHsl: () => i,
|
|
59
61
|
rgbToVariableString: () => a,
|
|
60
|
-
setGlobalDensity: () =>
|
|
61
|
-
tryParseColor: () =>
|
|
62
|
-
tryParseRgb: () =>
|
|
63
|
-
uses12HourFormat: () =>
|
|
62
|
+
setGlobalDensity: () => Z,
|
|
63
|
+
tryParseColor: () => u,
|
|
64
|
+
tryParseRgb: () => d,
|
|
65
|
+
uses12HourFormat: () => q
|
|
64
66
|
});
|
|
65
67
|
//#endregion
|
|
66
|
-
export {
|
|
68
|
+
export { Y as DENSITIES, v as THEME_COLOR_KEYS, x as addDays, S as addMonths, C as advancePastFormatLiteral, J as applyMask, w as clampDayByMonthYear, T as clampNumericSegments, E as completePartialDateInput, D as convertDatePatternToMask, o as darken, f as ensureContrast, O as formatDate, k as formatUsesSeconds, A as formatUsesTime, p as getComplementaryColor, m as getContrastRatio, h as getContrastingColor, j as getDaysInMonth, M as getEndOfDay, N as getFirstDayOfMonth, P as getFirstDayOfWeek, X as getGlobalDensity, F as getLastDayOfMonth, g as getRelativeLuminance, I as getStartOfDay, t as hslToRgb, n as hueToRgb, L as inputIncludesTimePortion, R as isBetween, z as isLeapYear, B as isSameDay, y as isThemeColor, V as isTimeOnlyFormat, b as isUnsupportedColor, c as isValidHex, s as lighten, _ as mergeColorSchemes, H as normalizeNumericToken, U as padNumber, l as parseColor, W as parseDate, G as parseDateWithCompletion, K as parseIsoDate, r as rgbToHex, i as rgbToHsl, a as rgbToVariableString, Z as setGlobalDensity, u as tryParseColor, d as tryParseRgb, q as uses12HourFormat, Q as utils_exports };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quidgest/ui",
|
|
3
3
|
"description": "Quidgest's UI framework",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.27.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": "Quidgest",
|
|
@@ -45,21 +45,26 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
|
48
|
-
"@storybook/addon-
|
|
49
|
-
"@storybook/addon-
|
|
50
|
-
"@storybook/
|
|
51
|
-
"@storybook/
|
|
48
|
+
"@storybook/addon-a11y": "^10.6.0",
|
|
49
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
50
|
+
"@storybook/addon-links": "^10.6.0",
|
|
51
|
+
"@storybook/addon-vitest": "^10.6.0",
|
|
52
|
+
"@storybook/vue3": "^10.6.0",
|
|
53
|
+
"@storybook/vue3-vite": "^10.6.0",
|
|
52
54
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
55
|
+
"@vitest/browser-playwright": "^4.1.11",
|
|
53
56
|
"@vue/test-utils": "^2.4.6",
|
|
54
57
|
"acorn": "^8.15.0",
|
|
55
58
|
"acorn-walk": "^8.3.4",
|
|
56
59
|
"autoprefixer": "^10.4.20",
|
|
57
60
|
"cssnano": "^7.0.6",
|
|
61
|
+
"playwright": "1.63.0",
|
|
58
62
|
"postcss": "^8.5.1",
|
|
59
|
-
"storybook": "^10.6.0
|
|
63
|
+
"storybook": "^10.6.0",
|
|
60
64
|
"terser": "^5.44.0",
|
|
61
65
|
"vite": "^8.1.0",
|
|
62
66
|
"vite-plugin-dts": "^4.5.0",
|
|
67
|
+
"vitest": "^4.1.11",
|
|
63
68
|
"vue-tsc": "^2.2.0"
|
|
64
69
|
},
|
|
65
70
|
"peerDependencies": {
|
|
@@ -79,6 +84,7 @@
|
|
|
79
84
|
"build:css": "node build/css.js",
|
|
80
85
|
"type-check": "vue-tsc --noEmit --composite false",
|
|
81
86
|
"storybook": "storybook dev -p 6006",
|
|
87
|
+
"test:storybook": "vitest run --project storybook",
|
|
82
88
|
"build:storybook": "pnpm clean:storybook && storybook build"
|
|
83
89
|
}
|
|
84
90
|
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
/**
|
|
3
|
-
* The source URL of the SVG bundle.
|
|
4
|
-
*/
|
|
5
|
-
src: {
|
|
6
|
-
type: StringConstructor;
|
|
7
|
-
required: true;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* The ID of the SVG symbol to be rendered.
|
|
11
|
-
*/
|
|
12
|
-
symbol: {
|
|
13
|
-
type: StringConstructor;
|
|
14
|
-
default: string;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* The title to be associated with the SVG.
|
|
18
|
-
*/
|
|
19
|
-
title: {
|
|
20
|
-
type: StringConstructor;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* A function to transform the source SVG element before rendering.
|
|
25
|
-
* If not provided, no transformation will be applied.
|
|
26
|
-
*/
|
|
27
|
-
transformSource: {
|
|
28
|
-
type: FunctionConstructor;
|
|
29
|
-
default: undefined;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Determines whether to keep the existing SVG content visible during the loading of a new SVG.
|
|
33
|
-
* Set to `false` to hide content during loading.
|
|
34
|
-
*/
|
|
35
|
-
keepDuringLoading: {
|
|
36
|
-
type: BooleanConstructor;
|
|
37
|
-
default: boolean;
|
|
38
|
-
};
|
|
39
|
-
}>, {}, {
|
|
40
|
-
/** @type SVGElement */
|
|
41
|
-
svgElSource: SVGElement;
|
|
42
|
-
}, {}, {
|
|
43
|
-
copySvgAttrs(target: any, source: any): void;
|
|
44
|
-
copyComponentAttrs(target: any, source: any): void;
|
|
45
|
-
getSvgContent(svgEl: any): any;
|
|
46
|
-
/**
|
|
47
|
-
* Get svgElSource
|
|
48
|
-
* @param {string} src
|
|
49
|
-
*/
|
|
50
|
-
getSource(src: string): Promise<void>;
|
|
51
|
-
/**
|
|
52
|
-
* Get the contents of the SVG
|
|
53
|
-
* @param {string} url
|
|
54
|
-
* @returns {PromiseWithState<Element>}
|
|
55
|
-
*/
|
|
56
|
-
download(url: string): PromiseWithState<Element>;
|
|
57
|
-
}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
58
|
-
loaded: (payload: any) => boolean;
|
|
59
|
-
unloaded: () => true;
|
|
60
|
-
error: (payload: any) => boolean;
|
|
61
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
62
|
-
/**
|
|
63
|
-
* The source URL of the SVG bundle.
|
|
64
|
-
*/
|
|
65
|
-
src: {
|
|
66
|
-
type: StringConstructor;
|
|
67
|
-
required: true;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* The ID of the SVG symbol to be rendered.
|
|
71
|
-
*/
|
|
72
|
-
symbol: {
|
|
73
|
-
type: StringConstructor;
|
|
74
|
-
default: string;
|
|
75
|
-
};
|
|
76
|
-
/**
|
|
77
|
-
* The title to be associated with the SVG.
|
|
78
|
-
*/
|
|
79
|
-
title: {
|
|
80
|
-
type: StringConstructor;
|
|
81
|
-
default: string;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* A function to transform the source SVG element before rendering.
|
|
85
|
-
* If not provided, no transformation will be applied.
|
|
86
|
-
*/
|
|
87
|
-
transformSource: {
|
|
88
|
-
type: FunctionConstructor;
|
|
89
|
-
default: undefined;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Determines whether to keep the existing SVG content visible during the loading of a new SVG.
|
|
93
|
-
* Set to `false` to hide content during loading.
|
|
94
|
-
*/
|
|
95
|
-
keepDuringLoading: {
|
|
96
|
-
type: BooleanConstructor;
|
|
97
|
-
default: boolean;
|
|
98
|
-
};
|
|
99
|
-
}>> & Readonly<{
|
|
100
|
-
onUnloaded?: (() => any) | undefined;
|
|
101
|
-
onLoaded?: ((payload?: any) => any) | undefined;
|
|
102
|
-
onError?: ((payload?: any) => any) | undefined;
|
|
103
|
-
}>, {
|
|
104
|
-
symbol: string;
|
|
105
|
-
title: string;
|
|
106
|
-
transformSource: Function;
|
|
107
|
-
keepDuringLoading: boolean;
|
|
108
|
-
}, {}, {}, {}, never, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
109
|
-
export default _default;
|
|
110
|
-
//# sourceMappingURL=InlineSvg.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"InlineSvg.d.ts","sourceRoot":"","sources":["../../../src/components/QIcon/InlineSvg.js"],"names":[],"mappings":";IAWE;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG;;;;;;IAiBF,uBAAuB;iBAAb,UAAU;;;;;IA+CrB;;;OAGG;mBADQ,MAAM;IAoCjB;;;;OAIG;kBAFQ,MAAM,GACJ,gBAAgB,CAAC,OAAO,CAAC;;;;;;IA7ItC;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;OAEG;;;;;IAMH;;;OAGG;;;;;IAMH;;;OAGG"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { defineComponent as e, h as t } from "vue";
|
|
2
|
-
//#region src/components/QIcon/InlineSvg.js
|
|
3
|
-
var n = {}, r = e({
|
|
4
|
-
name: "InlineSvg",
|
|
5
|
-
inheritAttrs: !1,
|
|
6
|
-
props: {
|
|
7
|
-
src: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: !0
|
|
10
|
-
},
|
|
11
|
-
symbol: {
|
|
12
|
-
type: String,
|
|
13
|
-
default: ""
|
|
14
|
-
},
|
|
15
|
-
title: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: ""
|
|
18
|
-
},
|
|
19
|
-
transformSource: {
|
|
20
|
-
type: Function,
|
|
21
|
-
default: void 0
|
|
22
|
-
},
|
|
23
|
-
keepDuringLoading: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: !0
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
emits: {
|
|
29
|
-
loaded: (e) => typeof e == "object",
|
|
30
|
-
unloaded: () => !0,
|
|
31
|
-
error: (e) => typeof e == "object"
|
|
32
|
-
},
|
|
33
|
-
expose: [],
|
|
34
|
-
data() {
|
|
35
|
-
return { svgElSource: null };
|
|
36
|
-
},
|
|
37
|
-
watch: { src(e) {
|
|
38
|
-
this.getSource(e);
|
|
39
|
-
} },
|
|
40
|
-
async mounted() {
|
|
41
|
-
await this.getSource(this.src);
|
|
42
|
-
},
|
|
43
|
-
methods: {
|
|
44
|
-
copySvgAttrs(e, t) {
|
|
45
|
-
let n = t.attributes;
|
|
46
|
-
if (n) for (let t of n) e[t.name] = t.value;
|
|
47
|
-
},
|
|
48
|
-
copyComponentAttrs(e, t) {
|
|
49
|
-
for (let [n, r] of Object.entries(t)) r !== !1 && r != null && (e[n] = r);
|
|
50
|
-
},
|
|
51
|
-
getSvgContent(e) {
|
|
52
|
-
return this.symbol && (e = e.getElementById(this.symbol), !e) ? null : (this.transformSource && (e = e.cloneNode(!0), e = this.transformSource(e)), this.title && (this.transformSource || (e = e.cloneNode(!0)), i(e, this.title)), e);
|
|
53
|
-
},
|
|
54
|
-
async getSource(e) {
|
|
55
|
-
try {
|
|
56
|
-
n[e] || (n[e] = a(this.download(e))), this.svgElSource && n[e].getIsPending() && !this.keepDuringLoading && (this.svgElSource = null, this.$emit("unloaded"));
|
|
57
|
-
let t = await n[e];
|
|
58
|
-
this.svgElSource = t, await this.$nextTick(), this.$emit("loaded", this.$el);
|
|
59
|
-
} catch (t) {
|
|
60
|
-
this.svgElSource && (this.svgElSource = null, this.$emit("unloaded")), delete n[e], this.$emit("error", t);
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
async download(e) {
|
|
64
|
-
let t = await fetch(e);
|
|
65
|
-
if (!t.ok) throw Error("Error loading SVG");
|
|
66
|
-
let n = await t.text(), r = new DOMParser().parseFromString(n, "text/xml").getElementsByTagName("svg")[0];
|
|
67
|
-
if (!r) throw Error("Loaded file is not a valid SVG");
|
|
68
|
-
return r;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
render() {
|
|
72
|
-
if (!this.svgElSource) return null;
|
|
73
|
-
let e = this.getSvgContent(this.svgElSource);
|
|
74
|
-
if (!e) return t("div", this.$attrs);
|
|
75
|
-
let n = {};
|
|
76
|
-
return this.copySvgAttrs(n, this.svgElSource), this.copySvgAttrs(n, e), this.copyComponentAttrs(n, this.$attrs), n.innerHTML = e.innerHTML, this.$attrs.id || delete n.id, t("svg", n);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
function i(e, t) {
|
|
80
|
-
let n = e.getElementsByTagName("title");
|
|
81
|
-
if (n.length) n[0].textContent = t;
|
|
82
|
-
else {
|
|
83
|
-
let n = document.createElementNS("http://www.w3.org/2000/svg", "title");
|
|
84
|
-
n.textContent = t, e.insertBefore(n, e.firstChild);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
function a(e) {
|
|
88
|
-
if (e.getIsPending) return e;
|
|
89
|
-
let t = !0, n = e.then((e) => (t = !1, e), (e) => {
|
|
90
|
-
throw t = !1, e;
|
|
91
|
-
});
|
|
92
|
-
return n.getIsPending = () => t, n;
|
|
93
|
-
}
|
|
94
|
-
//#endregion
|
|
95
|
-
export { r as default };
|
package/esm/utils/time.d.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines if a given date format string uses 12-hour time format.
|
|
3
|
-
*
|
|
4
|
-
* @param format - The date format string to check. If not provided, returns false.
|
|
5
|
-
* @returns True if the format uses 12-hour time ('hh' or 'a' for AM/PM), false otherwise.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* uses12HourFormat('hh:mm a') // returns true
|
|
10
|
-
* uses12HourFormat('HH:mm') // returns false
|
|
11
|
-
* uses12HourFormat() // returns false
|
|
12
|
-
* ```
|
|
13
|
-
*/
|
|
14
|
-
export declare function uses12HourFormat(format?: string): boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Determines if a date format string includes time components.
|
|
17
|
-
* @param format - The date format string to check
|
|
18
|
-
* @returns True if the format contains time components (hours, minutes, seconds, or meridiem), false otherwise
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* formatUsesTime('YYYY-MM-DD') // false
|
|
22
|
-
* formatUsesTime('YYYY-MM-DD HH:mm') // true
|
|
23
|
-
* formatUsesTime('hh:mm a') // true
|
|
24
|
-
*/
|
|
25
|
-
export declare function formatUsesTime(format?: string): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Checks if a date format string includes seconds.
|
|
28
|
-
* @param format - The date format string to check. Can be undefined.
|
|
29
|
-
* @returns {boolean} Returns true if the format includes seconds ('ss'), false otherwise.
|
|
30
|
-
* @example
|
|
31
|
-
* formatUsesSeconds('HH:mm:ss') // returns true
|
|
32
|
-
* formatUsesSeconds('HH:mm') // returns false
|
|
33
|
-
* formatUsesSeconds() // returns false
|
|
34
|
-
*/
|
|
35
|
-
export declare function formatUsesSeconds(format?: string): boolean;
|
|
36
|
-
//# sourceMappingURL=time.d.ts.map
|
package/esm/utils/time.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../src/utils/time.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAIzD;AAED;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAIvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAI1D"}
|