morya-ui 0.4.0 → 0.4.2
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 +70 -2
- package/dist/Button-BaYLh91a.js +326 -0
- package/dist/{Checkbox-BKt8hdhV.js → Checkbox-LxCFF19I.js} +1 -1
- package/dist/{DatePicker-CSoMFEvh.js → DatePicker-DGPNukEW.js} +3 -3
- package/dist/{Empty-iNcc0G-q.js → Empty-2_f_FgyK.js} +1 -1
- package/dist/{FlyoutSubmenu-C1RfFRzH.js → FlyoutSubmenu-Da6AcoM4.js} +1 -1
- package/dist/{Input-DQHYqvNk.js → Input-NspPDc2R.js} +2 -2
- package/dist/{Loading-BPpR-jGa.js → Loading-BK4dQPCS.js} +10 -10
- package/dist/{Pagination-BkPBWEQq.js → Pagination-tdrlaZ3u.js} +2 -2
- package/dist/{Popover-B_2c9NWs.js → Popover-BumMfUpV.js} +2 -2
- package/dist/{ProgressSpinner-B_OJG_0l.js → ProgressSpinner-BQ1tLioO.js} +1 -1
- package/dist/{Radio-Bxd806ys.js → Radio-BCn2OVCF.js} +1 -1
- package/dist/{Segmented-BRMSmXCl.js → Segmented-ppmDmku5.js} +1 -1
- package/dist/{Select-DzfyO0FE.js → Select-CN1tM76U.js} +8 -6
- package/dist/{Textarea-BBvpgIQL.js → Textarea-Ch1KCXEv.js} +2 -2
- package/dist/{Tooltip-BJp-ZMqQ.js → Tooltip-DKsXxU_B.js} +2 -2
- package/dist/accordion/style.css +39 -20
- package/dist/affix/style.css +39 -20
- package/dist/alert/index.js +2 -2
- package/dist/alert/style.css +39 -20
- package/dist/anchor/style.css +39 -20
- package/dist/auto-complete/index.js +3 -3
- package/dist/auto-complete/style.css +42 -21
- package/dist/avatar/style.css +39 -20
- package/dist/badge/index.js +29 -28
- package/dist/badge/style.css +39 -20
- package/dist/block-ui/index.js +1 -1
- package/dist/block-ui/style.css +39 -20
- package/dist/breadcrumb/index.js +1 -1
- package/dist/breadcrumb/style.css +39 -20
- package/dist/button/index.js +9 -9
- package/dist/button/style.css +503 -795
- package/dist/button/style.js +1 -0
- package/dist/calendar/index.js +3 -3
- package/dist/calendar/style.css +49 -24
- package/dist/card/style.css +40 -21
- package/dist/carousel/index.js +311 -119
- package/dist/carousel/style.css +987 -117
- package/dist/carousel/style.js +1 -1
- package/dist/cascade-select/index.js +4 -4
- package/dist/cascade-select/style.css +54 -22
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/style.css +41 -21
- package/dist/chip/index.js +39 -36
- package/dist/chip/style.css +39 -20
- package/dist/command-menu/index.js +3 -3
- package/dist/command-menu/style.css +39 -20
- package/dist/component-registry.d.ts.map +1 -1
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -1
- package/dist/components/Badge/types.d.ts +3 -0
- package/dist/components/Badge/types.d.ts.map +1 -1
- package/dist/components/Button/Button.vue.d.ts +15 -22
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Button/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/Button/ButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Button/buttonHelpers.d.ts +25 -0
- package/dist/components/Button/buttonHelpers.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/styles.css +463 -781
- package/dist/components/Button/types.d.ts +67 -61
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Card/styles.css +1 -1
- package/dist/components/Carousel/Carousel.vue.d.ts +41 -11
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselItem.vue.d.ts +16 -0
- package/dist/components/Carousel/CarouselItem.vue.d.ts.map +1 -0
- package/dist/components/Carousel/context.d.ts +10 -0
- package/dist/components/Carousel/context.d.ts.map +1 -0
- package/dist/components/Carousel/index.d.ts +2 -1
- package/dist/components/Carousel/index.d.ts.map +1 -1
- package/dist/components/Carousel/styles.css +250 -49
- package/dist/components/Carousel/types.d.ts +64 -9
- package/dist/components/Carousel/types.d.ts.map +1 -1
- package/dist/components/CascadeSelect/styles.css +12 -1
- package/dist/components/Checkbox/styles.css +2 -1
- package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
- package/dist/components/Chip/types.d.ts +3 -0
- package/dist/components/Chip/types.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts +2 -2
- package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/types.d.ts +2 -2
- package/dist/components/ConfirmDialog/types.d.ts.map +1 -1
- package/dist/components/ConfirmDialog/useConfirm.d.ts +1 -1
- package/dist/components/ConfirmDialog/useConfirm.d.ts.map +1 -1
- package/dist/components/ConfirmPopup/ConfirmPopup.vue.d.ts.map +1 -1
- package/dist/components/ConfirmPopup/types.d.ts +3 -3
- package/dist/components/ConfirmPopup/types.d.ts.map +1 -1
- package/dist/components/DatePicker/styles.css +2 -1
- package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
- package/dist/components/Dialog/types.d.ts +3 -3
- package/dist/components/Dialog/types.d.ts.map +1 -1
- package/dist/components/Dialog/useModal.d.ts +2 -2
- package/dist/components/Dialog/useModal.d.ts.map +1 -1
- package/dist/components/Divider/Divider.vue.d.ts +1 -1
- package/dist/components/Divider/Divider.vue.d.ts.map +1 -1
- package/dist/components/Divider/types.d.ts +3 -0
- package/dist/components/Divider/types.d.ts.map +1 -1
- package/dist/components/IconField/styles.css +1 -1
- package/dist/components/Input/styles.css +20 -8
- package/dist/components/InputColor/styles.css +10 -0
- package/dist/components/InputNumber/styles.css +2 -1
- package/dist/components/InputOtp/styles.css +8 -0
- package/dist/components/InputPassword/styles.css +1 -1
- package/dist/components/InputTags/styles.css +9 -0
- package/dist/components/Layout/styles.css +1 -1
- package/dist/components/Listbox/styles.css +3 -0
- package/dist/components/Mentions/Mentions.vue.d.ts +1 -1
- package/dist/components/Mentions/styles.css +13 -4
- package/dist/components/Message/styles.css +4 -2
- package/dist/components/Page/PageFilters.vue.d.ts.map +1 -1
- package/dist/components/Pagination/styles.css +3 -2
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts.map +1 -1
- package/dist/components/ProgressBar/types.d.ts +3 -0
- package/dist/components/ProgressBar/types.d.ts.map +1 -1
- package/dist/components/QRCode/QRCode.vue.d.ts.map +1 -1
- package/dist/components/Radio/styles.css +2 -1
- package/dist/components/Result/styles.css +1 -1
- package/dist/components/Select/Select.vue.d.ts +1 -1
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Select/styles.css +8 -3
- package/dist/components/SelectButton/styles.css +2 -0
- package/dist/components/SplitButton/SplitButton.vue.d.ts +0 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
- package/dist/components/SplitButton/types.d.ts +3 -3
- package/dist/components/SplitButton/types.d.ts.map +1 -1
- package/dist/components/Table/Table.vue.d.ts +4 -4
- package/dist/components/Table/Table.vue.d.ts.map +1 -1
- package/dist/components/Table/render/TableThead.vue.d.ts +2 -0
- package/dist/components/Table/render/TableThead.vue.d.ts.map +1 -1
- package/dist/components/Table/state/internal.d.ts +1 -0
- package/dist/components/Table/state/internal.d.ts.map +1 -1
- package/dist/components/Table/styles.css +9 -0
- package/dist/components/Tag/Tag.vue.d.ts +1 -1
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -1
- package/dist/components/Tag/styles.css +10 -8
- package/dist/components/Tag/types.d.ts +3 -0
- package/dist/components/Tag/types.d.ts.map +1 -1
- package/dist/components/Terminal/styles.css +1 -0
- package/dist/components/Textarea/styles.css +18 -7
- package/dist/components/ToggleButton/styles.css +2 -1
- package/dist/components/Tour/Tour.vue.d.ts.map +1 -1
- package/dist/components/Tree/Tree.vue.d.ts +1 -1
- package/dist/components/TreeSelect/styles.css +12 -1
- package/dist/{config-COgrsSV2.js → config-CB_TiIvg.js} +11 -4
- package/dist/config-provider/index.js +141 -120
- package/dist/config-provider/style.css +514 -801
- package/dist/confirm-dialog/index.js +45 -39
- package/dist/confirm-dialog/style.css +496 -795
- package/dist/confirm-popup/index.js +17 -14
- package/dist/confirm-popup/style.css +496 -795
- package/dist/context-menu/index.js +3 -3
- package/dist/context-menu/style.css +39 -20
- package/dist/data-view/index.js +3 -3
- package/dist/data-view/style.css +42 -22
- package/dist/date-picker/index.js +1 -1
- package/dist/date-picker/style.css +41 -21
- package/dist/descriptions/index.js +1 -1
- package/dist/descriptions/style.css +39 -20
- package/dist/dialog/index.js +68 -55
- package/dist/dialog/style.css +496 -795
- package/dist/divider/index.js +25 -22
- package/dist/divider/style.css +39 -20
- package/dist/dock/style.css +39 -20
- package/dist/drawer/index.js +3 -3
- package/dist/drawer/style.css +39 -20
- package/dist/dropdown/index.js +4 -4
- package/dist/dropdown/style.css +39 -20
- package/dist/empty/index.js +1 -1
- package/dist/empty/style.css +39 -20
- package/dist/fieldset/style.css +39 -20
- package/dist/file-upload/index.js +1 -1
- package/dist/file-upload/style.css +39 -20
- package/dist/flex/index.js +8 -8
- package/dist/flex/style.css +39 -20
- package/dist/float-label/style.css +39 -20
- package/dist/fluid/style.css +39 -20
- package/dist/form/index.js +1 -1
- package/dist/form/style.css +39 -20
- package/dist/gallery/index.js +1 -1
- package/dist/gallery/style.css +39 -20
- package/dist/grid/index.js +5 -5
- package/dist/grid/style.css +39 -20
- package/dist/icon/style.css +39 -20
- package/dist/icon-field/style.css +60 -29
- package/dist/image/index.js +1 -1
- package/dist/image/style.css +39 -20
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6500 -6163
- package/dist/inplace/style.css +39 -20
- package/dist/input/index.js +1 -1
- package/dist/input/style.css +59 -28
- package/dist/input-color/index.js +2 -2
- package/dist/input-color/style.css +49 -20
- package/dist/input-group/style.css +39 -20
- package/dist/input-number/index.js +2 -2
- package/dist/input-number/style.css +41 -21
- package/dist/input-otp/index.js +2 -2
- package/dist/input-otp/style.css +47 -20
- package/dist/input-password/index.js +2 -2
- package/dist/input-password/style.css +40 -21
- package/dist/input-tags/index.js +2 -2
- package/dist/input-tags/style.css +48 -20
- package/dist/knob/style.css +39 -20
- package/dist/label/style.css +39 -20
- package/dist/layout/index.js +1 -1
- package/dist/layout/style.css +40 -21
- package/dist/list/index.js +4 -4
- package/dist/list/style.css +42 -22
- package/dist/listbox/index.js +2 -2
- package/dist/listbox/style.css +42 -20
- package/dist/loading/index.js +1 -1
- package/dist/loading/style.css +39 -20
- package/dist/locale-CR2PIaxt.js +21 -0
- package/dist/mega-menu/index.js +3 -3
- package/dist/mega-menu/style.css +39 -20
- package/dist/mentions/index.js +3 -3
- package/dist/mentions/style.css +52 -24
- package/dist/menu/index.js +4 -4
- package/dist/menu/style.css +39 -20
- package/dist/menubar/index.js +3 -3
- package/dist/menubar/style.css +39 -20
- package/dist/message/index.js +3 -3
- package/dist/message/style.css +43 -22
- package/dist/meter-group/style.css +39 -20
- package/dist/order-list/index.js +1 -1
- package/dist/order-list/style.css +39 -20
- package/dist/page/index.js +4 -7
- package/dist/page/style.css +497 -796
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/style.css +50 -25
- package/dist/panel/index.js +1 -1
- package/dist/panel/style.css +39 -20
- package/dist/pick-list/index.js +1 -1
- package/dist/pick-list/style.css +39 -20
- package/dist/popover/index.js +1 -1
- package/dist/popover/style.css +39 -20
- package/dist/progress-bar/index.js +38 -35
- package/dist/progress-bar/style.css +39 -20
- package/dist/progress-spinner/index.js +1 -1
- package/dist/progress-spinner/style.css +39 -20
- package/dist/qr-code/index.js +3 -3
- package/dist/qr-code/style.css +496 -795
- package/dist/radio/index.js +1 -1
- package/dist/radio/style.css +41 -21
- package/dist/rating/index.js +2 -2
- package/dist/rating/style.css +39 -20
- package/dist/resolver-map.d.ts.map +1 -1
- package/dist/resolver.js +1 -0
- package/dist/result/index.js +1 -1
- package/dist/result/style.css +40 -21
- package/dist/scroll-top/index.js +2 -2
- package/dist/scroll-top/style.css +39 -20
- package/dist/scrollbar/style.css +39 -20
- package/dist/segmented/index.js +1 -1
- package/dist/segmented/style.css +39 -20
- package/dist/select/index.js +1 -1
- package/dist/select/style.css +50 -24
- package/dist/select-button/index.js +1 -1
- package/dist/select-button/style.css +41 -20
- package/dist/shared/componentDefaults.d.ts +6 -0
- package/dist/shared/componentDefaults.d.ts.map +1 -1
- package/dist/shared/styles/select-overlay.css +3 -1
- package/dist/sidebar/index.js +1 -1
- package/dist/sidebar/style.css +39 -20
- package/dist/skeleton/style.css +39 -20
- package/dist/slider/index.js +2 -2
- package/dist/slider/style.css +39 -20
- package/dist/space/index.js +8 -8
- package/dist/space/style.css +39 -20
- package/dist/speed-dial/index.js +3 -3
- package/dist/speed-dial/style.css +39 -20
- package/dist/split-button/index.js +7 -10
- package/dist/split-button/style.css +502 -801
- package/dist/splitter/index.js +1 -1
- package/dist/splitter/style.css +39 -20
- package/dist/statistic/style.css +39 -20
- package/dist/status/index.js +1 -1
- package/dist/status/style.css +39 -20
- package/dist/stepper/style.css +39 -20
- package/dist/styles/base.css +19 -7
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/switch/style.css +39 -20
- package/dist/table/index.js +1628 -1622
- package/dist/table/style.css +51 -22
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/style.css +39 -20
- package/dist/tag/index.js +57 -54
- package/dist/tag/style.css +49 -28
- package/dist/terminal/index.js +1 -1
- package/dist/terminal/style.css +40 -20
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/style.css +57 -27
- package/dist/theme/color.d.ts +5 -0
- package/dist/theme/color.d.ts.map +1 -1
- package/dist/theme/derive.d.ts.map +1 -1
- package/dist/theme/seed.d.ts +2 -2
- package/dist/theme/styles.css +20 -13
- package/dist/tiered-menu/index.js +3 -3
- package/dist/tiered-menu/style.css +39 -20
- package/dist/time-picker/index.js +1 -1
- package/dist/time-picker/style.css +41 -21
- package/dist/timeline/style.css +39 -20
- package/dist/toast/index.js +3 -3
- package/dist/toast/style.css +496 -795
- package/dist/toggle-button/index.js +1 -1
- package/dist/toggle-button/style.css +41 -21
- package/dist/toolbar/style.css +39 -20
- package/dist/tooltip/index.js +1 -1
- package/dist/tooltip/style.css +39 -20
- package/dist/tour/index.js +7 -8
- package/dist/tour/style.css +496 -795
- package/dist/tree/index.js +2 -2
- package/dist/tree/style.css +41 -21
- package/dist/tree-select/index.js +4 -4
- package/dist/tree-select/style.css +56 -23
- package/dist/typography/index.js +2 -2
- package/dist/typography/style.css +57 -27
- package/dist/{useMotionTransition-S2rlviyZ.js → useMotionTransition-D8JOR3ih.js} +1 -1
- package/dist/virtual-scroller/style.css +39 -20
- package/dist/watermark/style.css +39 -20
- package/package.json +1 -1
- package/dist/Button-TaJ0LKtP.js +0 -234
- package/dist/locale-Dnk0UIie.js +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { n as t, r as n, t as r } from "../config-
|
|
2
|
+
import { n as t, r as n, t as r } from "../config-CB_TiIvg.js";
|
|
3
3
|
import "./style.js";
|
|
4
4
|
import { computed as i, createElementBlock as a, defineComponent as o, inject as s, mergeProps as c, onBeforeUnmount as l, openBlock as u, ref as d, renderSlot as f, toValue as ee, unref as te, useAttrs as ne, watch as p } from "vue";
|
|
5
5
|
//#region src/theme/color.ts
|
|
@@ -42,7 +42,7 @@ function b({ r: e, g: t, b: n }, r) {
|
|
|
42
42
|
let i = Number(r.toFixed(3));
|
|
43
43
|
return `rgba(${Math.round(e)}, ${Math.round(t)}, ${Math.round(n)}, ${i})`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function re({ r: e, g: t, b: n }) {
|
|
46
46
|
let r = e / 255, i = t / 255, a = n / 255, o = Math.max(r, i, a), s = o - Math.min(r, i, a), c = 0;
|
|
47
47
|
s !== 0 && (c = o === r ? (i - a) / s % 6 : o === i ? (a - r) / s + 2 : (r - i) / s + 4, c *= 60, c < 0 && (c += 360));
|
|
48
48
|
let l = o === 0 ? 0 : s / o;
|
|
@@ -52,7 +52,7 @@ function x({ r: e, g: t, b: n }) {
|
|
|
52
52
|
v: o
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function x({ h: e, s: t, v: n }) {
|
|
56
56
|
let r = (e % 360 + 360) % 360, i = n * t, a = i * (1 - Math.abs(r / 60 % 2 - 1)), o = n - i, s = 0, c = 0, l = 0;
|
|
57
57
|
return r < 60 ? [s, c, l] = [
|
|
58
58
|
i,
|
|
@@ -84,7 +84,7 @@ function S({ h: e, s: t, v: n }) {
|
|
|
84
84
|
b: (l + o) * 255
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
var
|
|
87
|
+
var S = 2, C = .16, w = .05, T = .05, E = .15, D = 5, O = 4, k = [
|
|
88
88
|
{
|
|
89
89
|
index: 7,
|
|
90
90
|
amount: 15
|
|
@@ -125,43 +125,43 @@ var C = 2, w = .16, T = .05, E = .05, D = .15, O = 5, k = 4, A = [
|
|
|
125
125
|
index: 1,
|
|
126
126
|
amount: 98
|
|
127
127
|
}
|
|
128
|
-
],
|
|
129
|
-
function
|
|
128
|
+
], A = "#141414";
|
|
129
|
+
function j(e) {
|
|
130
130
|
return Math.round(e * 100) / 100;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
let r = Math.round(e.h), i = r >= 60 && r <= 240 ? n ? r -
|
|
132
|
+
function M(e, t, n) {
|
|
133
|
+
let r = Math.round(e.h), i = r >= 60 && r <= 240 ? n ? r - S * t : r + S * t : n ? r + S * t : r - S * t;
|
|
134
134
|
return i < 0 ? i += 360 : i >= 360 && (i -= 360), i;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function N(e, t, n) {
|
|
137
137
|
if (e.h === 0 && e.s === 0) return e.s;
|
|
138
138
|
let r;
|
|
139
|
-
return r = n ? e.s -
|
|
140
|
-
}
|
|
141
|
-
function
|
|
142
|
-
let r = n ? e.v +
|
|
143
|
-
return
|
|
144
|
-
}
|
|
145
|
-
function
|
|
146
|
-
let n = g(e), r =
|
|
147
|
-
for (let e =
|
|
148
|
-
h:
|
|
149
|
-
s:
|
|
150
|
-
v:
|
|
139
|
+
return r = n ? e.s - C * t : t === O ? e.s + C : e.s + w * t, r > 1 && (r = 1), n && t === D && r > .1 && (r = .1), r < .06 && (r = .06), j(r);
|
|
140
|
+
}
|
|
141
|
+
function P(e, t, n) {
|
|
142
|
+
let r = n ? e.v + T * t : e.v - E * t;
|
|
143
|
+
return j(Math.max(0, Math.min(1, r)));
|
|
144
|
+
}
|
|
145
|
+
function F(e, t = {}) {
|
|
146
|
+
let n = g(e), r = re(n), i = [];
|
|
147
|
+
for (let e = D; e > 0; --e) i.push(x({
|
|
148
|
+
h: M(r, e, !0),
|
|
149
|
+
s: N(r, e, !0),
|
|
150
|
+
v: P(r, e, !0)
|
|
151
151
|
}));
|
|
152
152
|
i.push(n);
|
|
153
|
-
for (let e = 1; e <=
|
|
154
|
-
h:
|
|
155
|
-
s:
|
|
156
|
-
v:
|
|
153
|
+
for (let e = 1; e <= O; e += 1) i.push(x({
|
|
154
|
+
h: M(r, e, !1),
|
|
155
|
+
s: N(r, e, !1),
|
|
156
|
+
v: P(r, e, !1)
|
|
157
157
|
}));
|
|
158
158
|
if (t.dark) {
|
|
159
|
-
let e = g(t.backgroundColor ??
|
|
160
|
-
return
|
|
159
|
+
let e = g(t.backgroundColor ?? A);
|
|
160
|
+
return k.map(({ index: t, amount: r }) => I(e, i[t] ?? n, r / 100)).map(y);
|
|
161
161
|
}
|
|
162
162
|
return i.map(y);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function I(e, t, n) {
|
|
165
165
|
let r = _(n, 0, 1);
|
|
166
166
|
return {
|
|
167
167
|
r: e.r + (t.r - e.r) * r,
|
|
@@ -169,7 +169,7 @@ function L(e, t, n) {
|
|
|
169
169
|
b: e.b + (t.b - e.b) * r
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function ie(e, t, n) {
|
|
173
173
|
let r = g(e), i = g(t), a = _(n, 0, 1);
|
|
174
174
|
return y({
|
|
175
175
|
r: r.r + (i.r - r.r) * a,
|
|
@@ -177,11 +177,23 @@ function re(e, t, n) {
|
|
|
177
177
|
b: r.b + (i.b - r.b) * a
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function L(e, t) {
|
|
181
|
+
let n = g(e), r = g(t);
|
|
182
|
+
for (let e = .01; e <= 1; e += .01) {
|
|
183
|
+
let t = Math.round((n.r - r.r * (1 - e)) / e), i = Math.round((n.g - r.g * (1 - e)) / e), a = Math.round((n.b - r.b * (1 - e)) / e);
|
|
184
|
+
if (t >= 0 && t <= 255 && i >= 0 && i <= 255 && a >= 0 && a <= 255) return b({
|
|
185
|
+
r: t,
|
|
186
|
+
g: i,
|
|
187
|
+
b: a
|
|
188
|
+
}, Math.round(e * 100) / 100);
|
|
189
|
+
}
|
|
190
|
+
return b(n, 1);
|
|
191
|
+
}
|
|
192
|
+
function ae(e) {
|
|
181
193
|
let { r: t, g: n, b: r } = g(e);
|
|
182
194
|
return (t * 299 + n * 587 + r * 114) / 1e3 < 128;
|
|
183
195
|
}
|
|
184
|
-
function
|
|
196
|
+
function oe({ r: e, g: t, b: n }) {
|
|
185
197
|
let r = e / 255, i = t / 255, a = n / 255, o = Math.max(r, i, a), s = Math.min(r, i, a), c = o - s, l = 0;
|
|
186
198
|
c !== 0 && (l = o === r ? (i - a) / c % 6 : o === i ? (a - r) / c + 2 : (r - i) / c + 4, l *= 60, l < 0 && (l += 360));
|
|
187
199
|
let u = (o + s) / 2, d = c === 0 ? 0 : c / (1 - Math.abs(2 * u - 1));
|
|
@@ -191,7 +203,7 @@ function ae({ r: e, g: t, b: n }) {
|
|
|
191
203
|
l: u
|
|
192
204
|
};
|
|
193
205
|
}
|
|
194
|
-
function
|
|
206
|
+
function se({ h: e, s: t, l: n }) {
|
|
195
207
|
let r = (e % 360 + 360) % 360, i = (1 - Math.abs(2 * n - 1)) * t, a = i * (1 - Math.abs(r / 60 % 2 - 1)), o = n - i / 2, s = 0, c = 0, l = 0;
|
|
196
208
|
return r < 60 ? [s, c, l] = [
|
|
197
209
|
i,
|
|
@@ -224,8 +236,8 @@ function oe({ h: e, s: t, l: n }) {
|
|
|
224
236
|
};
|
|
225
237
|
}
|
|
226
238
|
function R(e, t) {
|
|
227
|
-
let n =
|
|
228
|
-
return y(
|
|
239
|
+
let n = oe(g(e)), r = t / 100, i = n.l < .5 ? n.l + r * (1 - n.l) : n.l - r;
|
|
240
|
+
return y(se({
|
|
229
241
|
...n,
|
|
230
242
|
l: _(i, 0, 1)
|
|
231
243
|
}));
|
|
@@ -235,7 +247,7 @@ function z(e, t) {
|
|
|
235
247
|
}
|
|
236
248
|
//#endregion
|
|
237
249
|
//#region src/theme/derive.ts
|
|
238
|
-
var
|
|
250
|
+
var ce = [
|
|
239
251
|
1,
|
|
240
252
|
2,
|
|
241
253
|
3,
|
|
@@ -246,7 +258,7 @@ var se = [
|
|
|
246
258
|
8,
|
|
247
259
|
9,
|
|
248
260
|
10
|
|
249
|
-
],
|
|
261
|
+
], le = [
|
|
250
262
|
"primary",
|
|
251
263
|
"success",
|
|
252
264
|
"warning",
|
|
@@ -259,8 +271,8 @@ function B(e, t) {
|
|
|
259
271
|
if (n === void 0) throw Error(`[morya-ui] Missing derived token "${t}". This is a bug in the token engine.`);
|
|
260
272
|
return n;
|
|
261
273
|
}
|
|
262
|
-
function
|
|
263
|
-
let n =
|
|
274
|
+
function ue(e, t) {
|
|
275
|
+
let n = F(e, { dark: t }), r = t ? [
|
|
264
276
|
0,
|
|
265
277
|
1,
|
|
266
278
|
2,
|
|
@@ -302,7 +314,7 @@ function le(e, t) {
|
|
|
302
314
|
function V(e) {
|
|
303
315
|
return e.replace(/([a-z\d])([A-Z])/g, "$1-$2").toLowerCase();
|
|
304
316
|
}
|
|
305
|
-
function
|
|
317
|
+
function de(e, t) {
|
|
306
318
|
let n = {}, r = {
|
|
307
319
|
primary: e.colorPrimary,
|
|
308
320
|
success: e.colorSuccess,
|
|
@@ -311,16 +323,16 @@ function ue(e, t) {
|
|
|
311
323
|
info: e.colorInfo,
|
|
312
324
|
link: e.colorLink || e.colorPrimary
|
|
313
325
|
}, i = {};
|
|
314
|
-
for (let e of
|
|
315
|
-
let a =
|
|
326
|
+
for (let e of le) {
|
|
327
|
+
let a = ue(r[e], t);
|
|
316
328
|
i[e] = a;
|
|
317
329
|
let o = `${e.charAt(0).toUpperCase()}${e.slice(1)}`;
|
|
318
|
-
for (let e of
|
|
330
|
+
for (let e of ce) n[`color${o}${e}`] = a[e];
|
|
319
331
|
n[`color${o}Bg`] = a[1], n[`color${o}BgHover`] = a[2], n[`color${o}Border`] = a[3], n[`color${o}BorderHover`] = a[4], n[`color${o}Hover`] = a[5], n[`color${o}`] = a[6], n[`color${o}Active`] = a[7], n[`color${o}TextHover`] = a[8], n[`color${o}Text`] = a[9], n[`color${o}TextActive`] = a[10];
|
|
320
332
|
}
|
|
321
|
-
return n.colorSuccessHover = i.success[4], n.colorWarningHover = i.warning[4], n.colorInfoHover = i.info[4], n.colorErrorBgActive = i.error[3], n.colorErrorBgFilledHover =
|
|
333
|
+
return n.colorSuccessHover = i.success[4], n.colorWarningHover = i.warning[4], n.colorInfoHover = i.info[4], n.colorErrorBgActive = i.error[3], n.colorErrorBgFilledHover = ie(i.error[1], i.error[3], .5), t && (n.colorPrimaryBg = i.primary[3], n.colorPrimaryBgHover = i.primary[4], n.colorErrorBg = i.error[3], n.colorWarningBg = i.warning[3], n.colorSuccessBg = i.success[3], n.colorInfoBg = i.info[3]), n;
|
|
322
334
|
}
|
|
323
|
-
function
|
|
335
|
+
function fe(e, t) {
|
|
324
336
|
let n = e.colorTextBase || (t ? "#ffffff" : "#000000"), r = e.colorBgBase || (t ? "#000000" : "#ffffff");
|
|
325
337
|
return t ? {
|
|
326
338
|
colorBgBase: r,
|
|
@@ -368,7 +380,7 @@ function de(e, t) {
|
|
|
368
380
|
colorBorderSecondary: R(r, 6)
|
|
369
381
|
};
|
|
370
382
|
}
|
|
371
|
-
function
|
|
383
|
+
function pe(e, t, n) {
|
|
372
384
|
let r = e.colorTextBase || (t ? "#ffffff" : "#000000");
|
|
373
385
|
return {
|
|
374
386
|
colorTextPlaceholder: B(n, "colorTextQuaternary"),
|
|
@@ -384,8 +396,10 @@ function fe(e, t, n) {
|
|
|
384
396
|
colorBgMask: z("#000000", .45),
|
|
385
397
|
colorWhite: "#ffffff",
|
|
386
398
|
colorSplit: B(n, "colorBorderSecondary"),
|
|
387
|
-
controlOutline: B(n, "colorPrimaryBg"),
|
|
399
|
+
controlOutline: L(B(n, "colorPrimaryBg"), B(n, "colorBgContainer")),
|
|
388
400
|
controlOutlineWidth: "2px",
|
|
401
|
+
controlOutlineDanger: L(B(n, "colorErrorBg"), B(n, "colorBgContainer")),
|
|
402
|
+
controlOutlineWarning: L(B(n, "colorWarningBg"), B(n, "colorBgContainer")),
|
|
389
403
|
controlItemBgHover: B(n, "colorFillTertiary"),
|
|
390
404
|
controlItemBgActive: B(n, "colorPrimaryBg"),
|
|
391
405
|
controlItemBgActiveHover: B(n, "colorPrimaryBgHover"),
|
|
@@ -407,7 +421,7 @@ function H(e) {
|
|
|
407
421
|
sizeXXS: `${t - n * 3}px`
|
|
408
422
|
};
|
|
409
423
|
}
|
|
410
|
-
function
|
|
424
|
+
function me(e) {
|
|
411
425
|
let { controlHeight: t } = e;
|
|
412
426
|
return {
|
|
413
427
|
controlHeightXS: `${t * .5}px`,
|
|
@@ -418,7 +432,7 @@ function pe(e) {
|
|
|
418
432
|
controlPaddingHorizontalSM: "8px"
|
|
419
433
|
};
|
|
420
434
|
}
|
|
421
|
-
function
|
|
435
|
+
function he(e) {
|
|
422
436
|
let { fontSize: t } = e, n = t - 2, r = t, i = t + 2, a = t + 6, o = t + 10, s = t + 14, c = t + 24, l = 1.6667, u = 1.5714, d = 1.5, f = (e) => Number(e.toFixed(4));
|
|
423
437
|
return {
|
|
424
438
|
fontSizeSM: `${n}px`,
|
|
@@ -445,7 +459,7 @@ function me(e) {
|
|
|
445
459
|
fontWeightStrong: "600"
|
|
446
460
|
};
|
|
447
461
|
}
|
|
448
|
-
function
|
|
462
|
+
function ge(e) {
|
|
449
463
|
let { borderRadius: t } = e;
|
|
450
464
|
return {
|
|
451
465
|
borderRadiusXS: `${Math.max(t - 4, 2)}px`,
|
|
@@ -455,7 +469,7 @@ function he(e) {
|
|
|
455
469
|
borderRadiusOuter: `${t + 4}px`
|
|
456
470
|
};
|
|
457
471
|
}
|
|
458
|
-
function
|
|
472
|
+
function _e(e) {
|
|
459
473
|
let t = e.motionBase + e.motionUnit, n = e.motionBase + e.motionUnit * 2, r = e.motionBase + e.motionUnit * 3;
|
|
460
474
|
return {
|
|
461
475
|
lineWidth: `${e.lineWidth}px`,
|
|
@@ -475,27 +489,27 @@ function ge(e) {
|
|
|
475
489
|
};
|
|
476
490
|
}
|
|
477
491
|
function U(e, t = {}) {
|
|
478
|
-
let n = t.dark ??
|
|
479
|
-
...
|
|
492
|
+
let n = t.dark ?? ae(e.colorBgBase), r = de(e, n), i = {
|
|
493
|
+
...fe(e, n),
|
|
480
494
|
...r
|
|
481
495
|
};
|
|
482
496
|
return {
|
|
483
497
|
...i,
|
|
484
|
-
...
|
|
498
|
+
...pe(e, n, i),
|
|
485
499
|
...H(e),
|
|
486
|
-
...pe(e),
|
|
487
500
|
...me(e),
|
|
488
501
|
...he(e),
|
|
489
|
-
...ge(e)
|
|
502
|
+
...ge(e),
|
|
503
|
+
..._e(e)
|
|
490
504
|
};
|
|
491
505
|
}
|
|
492
|
-
function
|
|
506
|
+
function ve(e) {
|
|
493
507
|
let t = {};
|
|
494
|
-
for (let [n, r] of Object.entries(e))
|
|
508
|
+
for (let [n, r] of Object.entries(e)) ye.has(n) || (t[`--m-${V(n)}`] = r);
|
|
495
509
|
return t;
|
|
496
510
|
}
|
|
497
|
-
var
|
|
498
|
-
function
|
|
511
|
+
var ye = /* @__PURE__ */ new Set(["fontSizeSM", "fontSizeLG"]);
|
|
512
|
+
function be(e, t) {
|
|
499
513
|
let n = H(e), r = (t) => `${Math.round((e.motionBase + e.motionUnit * t) * 1e3)}ms`;
|
|
500
514
|
return {
|
|
501
515
|
"--m-color-surface": B(t, "colorBgContainer"),
|
|
@@ -507,6 +521,13 @@ function ye(e, t) {
|
|
|
507
521
|
"--m-color-warn": B(t, "colorWarning"),
|
|
508
522
|
"--m-color-info": B(t, "colorInfo"),
|
|
509
523
|
"--m-color-focus-ring": B(t, "colorPrimary"),
|
|
524
|
+
"--m-color-control-outline": B(t, "controlOutline"),
|
|
525
|
+
"--m-color-control-outline-danger": B(t, "controlOutlineDanger"),
|
|
526
|
+
"--m-color-control-outline-warning": B(t, "controlOutlineWarning"),
|
|
527
|
+
"--m-focus-outline-width": B(t, "controlOutlineWidth"),
|
|
528
|
+
"--m-focus-shadow": `0 0 0 ${B(t, "controlOutlineWidth")} ${B(t, "controlOutline")}`,
|
|
529
|
+
"--m-focus-shadow-danger": `0 0 0 ${B(t, "controlOutlineWidth")} ${B(t, "controlOutlineDanger")}`,
|
|
530
|
+
"--m-focus-shadow-warning": `0 0 0 ${B(t, "controlOutlineWidth")} ${B(t, "controlOutlineWarning")}`,
|
|
510
531
|
"--m-color-primary-active": B(t, "colorPrimaryActive"),
|
|
511
532
|
"--m-color-on-emphasis": B(t, "colorTextLightSolid"),
|
|
512
533
|
"--m-color-on-primary": B(t, "colorTextLightSolid"),
|
|
@@ -537,11 +558,11 @@ function ye(e, t) {
|
|
|
537
558
|
"--m-z-sticky": "10"
|
|
538
559
|
};
|
|
539
560
|
}
|
|
540
|
-
function
|
|
561
|
+
function xe(e, t = {}) {
|
|
541
562
|
let n = U(e, t);
|
|
542
563
|
return {
|
|
543
|
-
...
|
|
544
|
-
...
|
|
564
|
+
...ve(n),
|
|
565
|
+
...be(e, n)
|
|
545
566
|
};
|
|
546
567
|
}
|
|
547
568
|
var W = {
|
|
@@ -575,7 +596,7 @@ var W = {
|
|
|
575
596
|
({ ...W }), { ...W };
|
|
576
597
|
//#endregion
|
|
577
598
|
//#region src/theme/createTheme.ts
|
|
578
|
-
var G = "m-theme-vars",
|
|
599
|
+
var G = "m-theme-vars", Se = {
|
|
579
600
|
default: {},
|
|
580
601
|
dark: {
|
|
581
602
|
colorTextBase: "#ffffff",
|
|
@@ -586,10 +607,10 @@ var G = "m-theme-vars", xe = {
|
|
|
586
607
|
sizeStep: 2
|
|
587
608
|
}
|
|
588
609
|
};
|
|
589
|
-
function
|
|
610
|
+
function Ce(e) {
|
|
590
611
|
return `.m-${V(e.replace(/^M(?=[A-Z])/, ""))}`;
|
|
591
612
|
}
|
|
592
|
-
function
|
|
613
|
+
function we(e) {
|
|
593
614
|
let t = {};
|
|
594
615
|
for (let [n, r] of Object.entries(e)) {
|
|
595
616
|
let e = n.startsWith("--") ? n : `--m-${V(n)}`;
|
|
@@ -597,17 +618,17 @@ function Ce(e) {
|
|
|
597
618
|
}
|
|
598
619
|
return t;
|
|
599
620
|
}
|
|
600
|
-
function
|
|
621
|
+
function Te(e) {
|
|
601
622
|
return e.reduce((e, t) => ({
|
|
602
623
|
...e,
|
|
603
|
-
...
|
|
624
|
+
...Se[t]
|
|
604
625
|
}), W);
|
|
605
626
|
}
|
|
606
|
-
function
|
|
627
|
+
function Ee(e = {}) {
|
|
607
628
|
let t = e.algorithm === void 0 ? [] : Array.isArray(e.algorithm) ? e.algorithm : [e.algorithm], n = t.includes("dark"), r = {
|
|
608
|
-
...t.length > 0 ?
|
|
629
|
+
...t.length > 0 ? Te(t) : W,
|
|
609
630
|
...e.seed
|
|
610
|
-
}, i = U(r, { dark: n }), a =
|
|
631
|
+
}, i = U(r, { dark: n }), a = xe(r, { dark: n }), o = Object.entries(a).map(([e, t]) => ` ${e}: ${t};`).join("\n"), s = Object.entries(e.components ?? {}).map(([t, n]) => `${e.selector?.(t) ?? Ce(t)} {\n${Object.entries(we(n)).map(([e, t]) => ` ${e}: ${t};`).join("\n")}\n}`).join("\n\n"), c = [`:root {\n${o}\n}`, s].filter(Boolean).join("\n\n");
|
|
611
632
|
return {
|
|
612
633
|
seed: r,
|
|
613
634
|
tokens: i,
|
|
@@ -651,63 +672,63 @@ function q(e, t, n = []) {
|
|
|
651
672
|
}
|
|
652
673
|
//#endregion
|
|
653
674
|
//#region src/theme/useDensity.ts
|
|
654
|
-
var J = "morya-ui-density", Y = ["wex-design-density"],
|
|
675
|
+
var J = "morya-ui-density", Y = ["wex-design-density"], De = [
|
|
655
676
|
"compact",
|
|
656
677
|
"comfortable",
|
|
657
678
|
"spacious"
|
|
658
|
-
],
|
|
679
|
+
], Oe = d(ke());
|
|
659
680
|
function X(e, t) {
|
|
660
681
|
let n = t ?? (typeof document < "u" ? document.documentElement : void 0);
|
|
661
682
|
n && (n.dataset.mDensity = e);
|
|
662
683
|
}
|
|
663
|
-
function
|
|
684
|
+
function ke() {
|
|
664
685
|
let e = K(J, Y);
|
|
665
|
-
return e &&
|
|
686
|
+
return e && De.includes(e) ? e : "comfortable";
|
|
666
687
|
}
|
|
667
|
-
typeof window < "u" && p(
|
|
688
|
+
typeof window < "u" && p(Oe, (e) => {
|
|
668
689
|
X(e), q(J, e, Y);
|
|
669
690
|
}, { immediate: !0 });
|
|
670
691
|
//#endregion
|
|
671
692
|
//#region src/theme/useMotion.ts
|
|
672
|
-
var Z = "morya-ui-motion", Q = ["wex-design-motion"],
|
|
693
|
+
var Z = "morya-ui-motion", Q = ["wex-design-motion"], Ae = [
|
|
673
694
|
"full",
|
|
674
695
|
"reduced",
|
|
675
696
|
"none"
|
|
676
|
-
],
|
|
677
|
-
function
|
|
697
|
+
], je = d(Fe());
|
|
698
|
+
function Me(e, t) {
|
|
678
699
|
let n = t ?? (typeof document < "u" ? document.documentElement : void 0);
|
|
679
700
|
n && (n.dataset.mMotion = e);
|
|
680
701
|
}
|
|
681
|
-
function
|
|
702
|
+
function Ne(e, t) {
|
|
682
703
|
let n = t ?? (typeof document < "u" ? document.documentElement : void 0);
|
|
683
704
|
n && (e === !1 ? n.dataset.mIgnoreReducedMotion = "true" : delete n.dataset.mIgnoreReducedMotion);
|
|
684
705
|
}
|
|
685
|
-
function
|
|
706
|
+
function Pe() {
|
|
686
707
|
return "full";
|
|
687
708
|
}
|
|
688
|
-
function
|
|
709
|
+
function Fe() {
|
|
689
710
|
let e = K(Z, Q);
|
|
690
|
-
return e &&
|
|
711
|
+
return e && Ae.includes(e) ? e : Pe();
|
|
691
712
|
}
|
|
692
|
-
typeof window < "u" && p(
|
|
693
|
-
|
|
713
|
+
typeof window < "u" && p(je, (e) => {
|
|
714
|
+
Me(e), q(Z, e, Q);
|
|
694
715
|
}, { immediate: !0 });
|
|
695
716
|
//#endregion
|
|
696
717
|
//#region src/theme/index.ts
|
|
697
718
|
function $() {
|
|
698
719
|
return typeof window < "u" && window.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
699
720
|
}
|
|
700
|
-
function
|
|
721
|
+
function Ie(e, t) {
|
|
701
722
|
let n = t ?? (typeof document < "u" ? document.documentElement : void 0);
|
|
702
723
|
n && (n.dataset.theme = e);
|
|
703
724
|
}
|
|
704
725
|
//#endregion
|
|
705
726
|
//#region src/components/ConfigProvider/ConfigProvider.vue?vue&type=script&setup=true&lang.ts
|
|
706
|
-
var
|
|
727
|
+
var Le = [
|
|
707
728
|
"data-m-density",
|
|
708
729
|
"data-theme",
|
|
709
730
|
"dir"
|
|
710
|
-
],
|
|
731
|
+
], Re = /* @__PURE__ */ o({
|
|
711
732
|
inheritAttrs: !1,
|
|
712
733
|
__name: "ConfigProvider",
|
|
713
734
|
props: {
|
|
@@ -749,70 +770,70 @@ var Ie = [
|
|
|
749
770
|
return t(e, v.value);
|
|
750
771
|
});
|
|
751
772
|
n(y);
|
|
752
|
-
let b = i(() => y.value.density ?? "comfortable"),
|
|
773
|
+
let b = i(() => y.value.density ?? "comfortable"), re = i(() => {
|
|
753
774
|
let e = y.value.theme;
|
|
754
775
|
if (e !== void 0) return e === "system" ? $() : e;
|
|
755
|
-
}),
|
|
776
|
+
}), x = i(() => m.globalDensity !== !1), S = i(() => {
|
|
756
777
|
let e = y.value.zIndex;
|
|
757
778
|
if (e != null) return { "--m-z-base": String(e) };
|
|
758
|
-
}),
|
|
759
|
-
function
|
|
760
|
-
|
|
779
|
+
}), C = i(() => y.value.direction ?? "ltr"), w = d(null), T = null;
|
|
780
|
+
function E() {
|
|
781
|
+
T?.(), T = null;
|
|
761
782
|
}
|
|
762
|
-
function
|
|
763
|
-
|
|
783
|
+
function D() {
|
|
784
|
+
E();
|
|
764
785
|
let e = y.value.themeConfig;
|
|
765
786
|
if (!e) return;
|
|
766
|
-
let t =
|
|
767
|
-
if (
|
|
768
|
-
|
|
787
|
+
let t = Ee(e);
|
|
788
|
+
if (x.value) {
|
|
789
|
+
T = t.inject();
|
|
769
790
|
return;
|
|
770
791
|
}
|
|
771
|
-
|
|
792
|
+
w.value && t.apply(w.value);
|
|
772
793
|
}
|
|
773
|
-
p(() => [y.value.themeConfig,
|
|
794
|
+
p(() => [y.value.themeConfig, x.value], D, {
|
|
774
795
|
immediate: !0,
|
|
775
796
|
deep: !0
|
|
776
|
-
}), l(
|
|
777
|
-
let k, A, j, M
|
|
797
|
+
}), l(E);
|
|
798
|
+
let O, k, A, j, M = null;
|
|
799
|
+
function N() {
|
|
800
|
+
M?.removeEventListener("change", P), M = null;
|
|
801
|
+
}
|
|
778
802
|
function P() {
|
|
779
|
-
|
|
803
|
+
y.value.theme === "system" && Ie($());
|
|
780
804
|
}
|
|
781
805
|
function F() {
|
|
782
|
-
|
|
806
|
+
typeof document > "u" || (j = document.documentElement.dataset.mIgnoreReducedMotion, Ne(y.value.respectReducedMotion));
|
|
783
807
|
}
|
|
784
808
|
function I() {
|
|
785
|
-
typeof document > "u"
|
|
786
|
-
}
|
|
787
|
-
function L() {
|
|
788
|
-
if (!S.value || typeof document > "u") return;
|
|
809
|
+
if (!x.value || typeof document > "u") return;
|
|
789
810
|
let { density: e, zIndex: t, theme: n } = y.value;
|
|
790
|
-
e && (
|
|
811
|
+
e && (O = document.documentElement.dataset.mDensity, X(e)), t != null && (k = document.documentElement.style.getPropertyValue("--m-z-base"), document.documentElement.style.setProperty("--m-z-base", String(t))), n !== void 0 && (A = document.documentElement.dataset.theme, Ie(n === "system" ? $() : n)), n === "system" && typeof window < "u" ? (N(), M = window.matchMedia("(prefers-color-scheme: dark)"), M.addEventListener("change", P)) : N();
|
|
791
812
|
}
|
|
792
|
-
return p(() => y.value.respectReducedMotion,
|
|
793
|
-
|
|
813
|
+
return p(() => y.value.respectReducedMotion, F, { immediate: !0 }), p(() => [
|
|
814
|
+
x.value,
|
|
794
815
|
y.value.density,
|
|
795
816
|
y.value.zIndex,
|
|
796
817
|
y.value.theme
|
|
797
|
-
],
|
|
818
|
+
], I, { immediate: !0 }), l(() => {
|
|
798
819
|
if (!(typeof document > "u")) {
|
|
799
|
-
if (
|
|
800
|
-
|
|
820
|
+
if (j !== void 0 && (j ? document.documentElement.dataset.mIgnoreReducedMotion = j : delete document.documentElement.dataset.mIgnoreReducedMotion), !x.value) {
|
|
821
|
+
N();
|
|
801
822
|
return;
|
|
802
823
|
}
|
|
803
|
-
|
|
824
|
+
O !== void 0 && (O ? document.documentElement.dataset.mDensity = O : delete document.documentElement.dataset.mDensity), k !== void 0 && (k ? document.documentElement.style.setProperty("--m-z-base", k) : document.documentElement.style.removeProperty("--m-z-base")), A !== void 0 && (A ? document.documentElement.dataset.theme = A : delete document.documentElement.dataset.theme), N();
|
|
804
825
|
}
|
|
805
826
|
}), (e, t) => (u(), a("div", c({
|
|
806
827
|
ref_key: "rootEl",
|
|
807
|
-
ref:
|
|
828
|
+
ref: w
|
|
808
829
|
}, te(g), {
|
|
809
830
|
class: "m-config-provider",
|
|
810
831
|
"data-m-density": b.value,
|
|
811
|
-
"data-theme":
|
|
812
|
-
dir:
|
|
813
|
-
style:
|
|
814
|
-
}), [f(e.$slots, "default")], 16,
|
|
832
|
+
"data-theme": re.value,
|
|
833
|
+
dir: C.value,
|
|
834
|
+
style: S.value
|
|
835
|
+
}), [f(e.$slots, "default")], 16, Le));
|
|
815
836
|
}
|
|
816
837
|
});
|
|
817
838
|
//#endregion
|
|
818
|
-
export {
|
|
839
|
+
export { Re as MConfigProvider };
|