@m3ui-vue/m3ui-vue 1.8.0 → 1.9.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/dist/API.md +34 -19
- package/dist/MButton-LiZRRP4h.js +171 -0
- package/dist/MButton-LiZRRP4h.js.map +1 -0
- package/dist/{MColorPickerModal-H8nuX0Wu.js → MColorPickerModal-IjciC8zh.js} +185 -184
- package/dist/MColorPickerModal-IjciC8zh.js.map +1 -0
- package/dist/MDialog-BLpfgIA3.js +167 -0
- package/dist/MDialog-BLpfgIA3.js.map +1 -0
- package/dist/MIcon-BSsJZhK7.js +116 -0
- package/dist/MIcon-BSsJZhK7.js.map +1 -0
- package/dist/{MIconButton-BBggVwBV.js → MIconButton-CNjN0xwW.js} +18 -18
- package/dist/{MIconButton-BBggVwBV.js.map → MIconButton-CNjN0xwW.js.map} +1 -1
- package/dist/{MListItem-DiOAxaN7.js → MListItem-BBQ-6i3v.js} +139 -139
- package/dist/MListItem-BBQ-6i3v.js.map +1 -0
- package/dist/{MLoadingIndicator-CuTZYFFj.js → MLoadingIndicator-dejdXpu8.js} +2 -2
- package/dist/{MLoadingIndicator-CuTZYFFj.js.map → MLoadingIndicator-dejdXpu8.js.map} +1 -1
- package/dist/MMenuItem-E31tMzOt.js +577 -0
- package/dist/MMenuItem-E31tMzOt.js.map +1 -0
- package/dist/MPdfViewer-B5Q9Xs9d.js +1866 -0
- package/dist/MPdfViewer-B5Q9Xs9d.js.map +1 -0
- package/dist/MProgressBar-CPrZhQbA.js +179 -0
- package/dist/MProgressBar-CPrZhQbA.js.map +1 -0
- package/dist/{MSeekBar-BCDQTx2t.js → MSeekBar-NwkuAzx-.js} +2 -2
- package/dist/{MSeekBar-BCDQTx2t.js.map → MSeekBar-NwkuAzx-.js.map} +1 -1
- package/dist/{MSegmentedButton-BXzRsg1S.js → MSegmentedButton-DZuZLBML.js} +4 -4
- package/dist/{MSegmentedButton-BXzRsg1S.js.map → MSegmentedButton-DZuZLBML.js.map} +1 -1
- package/dist/MSignaturePad-Bqr-1R9f.js +140 -0
- package/dist/MSignaturePad-Bqr-1R9f.js.map +1 -0
- package/dist/MSlider-B7dIcHVn.js +745 -0
- package/dist/MSlider-B7dIcHVn.js.map +1 -0
- package/dist/{MSpinner-UCdtSOHP.js → MSpinner-CXLY7lWw.js} +2 -2
- package/dist/{MSpinner-UCdtSOHP.js.map → MSpinner-CXLY7lWw.js.map} +1 -1
- package/dist/{MTextField-CYk9yFvi.js → MTextField-CryHMs8-.js} +18 -18
- package/dist/MTextField-CryHMs8-.js.map +1 -0
- package/dist/MTooltip-Cn_DYm9M.js +90 -0
- package/dist/MTooltip-Cn_DYm9M.js.map +1 -0
- package/dist/{_popupPosition-nL8SVKPK.js → _popupPosition-C_lxj9qU.js} +7 -7
- package/dist/_popupPosition-C_lxj9qU.js.map +1 -0
- package/dist/{_useFieldValidation-B0B44M_t.js → _useFieldValidation-CvZnZfl-.js} +2 -2
- package/dist/{_useFieldValidation-B0B44M_t.js.map → _useFieldValidation-CvZnZfl-.js.map} +1 -1
- package/dist/api.json +1 -1
- package/dist/code-editor.js +129 -128
- package/dist/code-editor.js.map +1 -1
- package/dist/components/MAddressField.vue.d.ts +1 -1
- package/dist/components/MAudioPlayer.vue.d.ts +1 -1
- package/dist/components/MAutocomplete.vue.d.ts +1 -1
- package/dist/components/MAvailabilityCalendar.vue.d.ts +3 -3
- package/dist/components/MBadge.vue.d.ts +2 -2
- package/dist/components/MBar.vue.d.ts +1 -1
- package/dist/components/MBeforeAfter.vue.d.ts +3 -3
- package/dist/components/MButton.vue.d.ts +1 -1
- package/dist/components/MCalendarHeatmap.vue.d.ts +1 -1
- package/dist/components/MChatBubble.vue.d.ts +1 -1
- package/dist/components/MCodeEditor.vue.d.ts +1 -1
- package/dist/components/MContainerTransform.vue.d.ts +1 -1
- package/dist/components/MCopyButton.vue.d.ts +2 -2
- package/dist/components/MCountrySelect.vue.d.ts +1 -1
- package/dist/components/MCreditCardInput.vue.d.ts +2 -2
- package/dist/components/MDiffViewer.vue.d.ts +1 -1
- package/dist/components/MDrawCanvas.vue.d.ts +2 -2
- package/dist/components/MExpansionPanel.vue.d.ts +1 -1
- package/dist/components/MExportButton.vue.d.ts +1 -1
- package/dist/components/MFab.vue.d.ts +1 -1
- package/dist/components/MFilterBuilder.vue.d.ts +1 -1
- package/dist/components/MFlex.vue.d.ts +2 -2
- package/dist/components/MFloorPlan.vue.d.ts +2 -2
- package/dist/components/MFlow.vue.d.ts +2 -2
- package/dist/components/MFormRenderer.vue.d.ts +2 -2
- package/dist/components/MGantt.vue.d.ts +2 -2
- package/dist/components/MGanttControls.vue.d.ts +1 -1
- package/dist/components/MGrid.vue.d.ts +1 -1
- package/dist/components/MIcon.vue.d.ts +3 -5
- package/dist/components/MIconButton.vue.d.ts +1 -1
- package/dist/components/MLightbox.vue.d.ts +2 -2
- package/dist/components/MMapMeasure.vue.d.ts +2 -2
- package/dist/components/MMenu.vue.d.ts +6 -3
- package/dist/components/MMortgageCalculator.vue.d.ts +2 -2
- package/dist/components/MMultiAutocomplete.vue.d.ts +1 -1
- package/dist/components/MMultiSelect.vue.d.ts +1 -1
- package/dist/components/MNavigationDrawer.vue.d.ts +5 -4
- package/dist/components/MNavigationRail.vue.d.ts +1 -1
- package/dist/components/MNumberField.vue.d.ts +1 -1
- package/dist/components/MOdontogram.vue.d.ts +2 -2
- package/dist/components/MPdfSigner.vue.d.ts +1 -1
- package/dist/components/MPhoneInput.vue.d.ts +2 -2
- package/dist/components/MPinInput.vue.d.ts +3 -3
- package/dist/components/MPosKeypad.vue.d.ts +1 -1
- package/dist/components/MProductConfigurator.vue.d.ts +1 -1
- package/dist/components/MResourceTimeline.vue.d.ts +2 -2
- package/dist/components/MRichTextEditor.vue.d.ts +1 -1
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MSearchBar.vue.d.ts +2 -2
- package/dist/components/MSearchField.vue.d.ts +1 -1
- package/dist/components/MSeatMap.vue.d.ts +1 -1
- package/dist/components/MSeekBar.vue.d.ts +2 -2
- package/dist/components/MSelect.vue.d.ts +1 -1
- package/dist/components/MShortNavigationBar.vue.d.ts +1 -1
- package/dist/components/MSkeleton.vue.d.ts +1 -1
- package/dist/components/MSpreadsheet.vue.d.ts +2 -2
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSubtitle.vue.d.ts +1 -1
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTagInput.vue.d.ts +1 -1
- package/dist/components/MText.vue.d.ts +1 -1
- package/dist/components/MTextField.vue.d.ts +3 -3
- package/dist/components/MTimeScroll.vue.d.ts +1 -1
- package/dist/components/MTimezoneSelect.vue.d.ts +1 -1
- package/dist/components/MTitle.vue.d.ts +1 -1
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MTooltip.vue.d.ts +1 -1
- package/dist/components/MTopAppBar.vue.d.ts +2 -2
- package/dist/components/MVitalsChart.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MDrawerItemList.vue.d.ts +8 -1
- package/dist/composables/_fieldLayout.d.ts +8 -8
- package/dist/composables/_popupPosition.d.ts +3 -2
- package/dist/composables/_rtl.d.ts +26 -0
- package/dist/composables/useColorPalette.d.ts +1 -1
- package/dist/composables/useLocale.d.ts +4 -0
- package/dist/draw.js +5 -5
- package/dist/flow.js +2 -2
- package/dist/gantt.js +3 -3
- package/dist/locales/ar.d.ts +6 -0
- package/dist/locales/index.d.ts +1 -0
- package/dist/locales/index.js +768 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +11962 -12039
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +1127 -1149
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +1 -1
- package/dist/markdown.js.map +1 -1
- package/dist/media.js +7 -7
- package/dist/pdf-sign.d.ts +3 -0
- package/dist/pdf-sign.js +548 -0
- package/dist/pdf-sign.js.map +1 -0
- package/dist/pdf.d.ts +0 -3
- package/dist/pdf.js +1 -2400
- package/dist/plugin.d.ts +8 -0
- package/dist/rich-text-editor.js +79 -77
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles/theme.css +13 -0
- package/dist/styles.css +1 -1
- package/dist/terminal.js +5 -2
- package/dist/terminal.js.map +1 -1
- package/dist/{useLocale-DL96OFgr.js → useLocale-ybIju59R.js} +3 -1
- package/dist/useLocale-ybIju59R.js.map +1 -0
- package/dist/vTooltip-xESB2YOb.js +154 -0
- package/dist/vTooltip-xESB2YOb.js.map +1 -0
- package/package.json +5 -1
- package/src/__tests__/MAddressField.test.ts +1 -1
- package/src/__tests__/MChip.test.ts +3 -3
- package/src/__tests__/MFab.test.ts +6 -6
- package/src/__tests__/MListItemNestedControl.test.ts +2 -2
- package/src/__tests__/MScheduler.test.ts +1 -1
- package/src/__tests__/MTrackingTimeline.test.ts +1 -1
- package/src/__tests__/MWindow.test.ts +16 -0
- package/src/__tests__/fieldOverflow.test.ts +9 -9
- package/src/__tests__/hydration.test.ts +39 -0
- package/src/__tests__/localePresets.test.ts +2 -0
- package/src/__tests__/rtl.test.ts +167 -0
- package/src/__tests__/ssr.test.ts +6 -0
- package/src/components/MAlert.vue +1 -1
- package/src/components/MAutocomplete.vue +7 -7
- package/src/components/MAvailabilityCalendar.vue +5 -3
- package/src/components/MBadge.vue +12 -3
- package/src/components/MBar.vue +1 -1
- package/src/components/MBottomAppBar.vue +1 -1
- package/src/components/MCalendar.vue +3 -3
- package/src/components/MCalendarHeatmap.vue +3 -3
- package/src/components/MChatBubble.vue +3 -3
- package/src/components/MChip.vue +6 -6
- package/src/components/MCodeEditor.vue +7 -3
- package/src/components/MColorPicker.vue +1 -1
- package/src/components/MCommandPalette.vue +1 -1
- package/src/components/MContainerTransform.vue +1 -1
- package/src/components/MContextMenu.vue +1 -1
- package/src/components/MDataTable.vue +5 -5
- package/src/components/MDatePicker.vue +3 -2
- package/src/components/MDateRangePicker.vue +3 -2
- package/src/components/MDialog.vue +5 -5
- package/src/components/MDiffViewer.vue +1 -1
- package/src/components/MDivider.vue +1 -1
- package/src/components/MDragDropList.vue +1 -1
- package/src/components/MEmojiSelector.vue +11 -7
- package/src/components/MExpansionPanel.vue +1 -1
- package/src/components/MFab.vue +5 -5
- package/src/components/MFormBuilder.vue +3 -3
- package/src/components/MIcon.vue +14 -2
- package/src/components/MJsonEditor.vue +1 -3
- package/src/components/MJsonViewer.vue +1 -1
- package/src/components/MKanban.vue +2 -1
- package/src/components/MListDetail.vue +2 -2
- package/src/components/MListGroup.vue +1 -1
- package/src/components/MListItem.vue +5 -5
- package/src/components/MListSubheader.vue +1 -1
- package/src/components/MMapDraw.vue +3 -2
- package/src/components/MMapHover.vue +2 -1
- package/src/components/MMapMeasure.vue +2 -1
- package/src/components/MMapRoute.vue +2 -1
- package/src/components/MMarkdown.vue +9 -6
- package/src/components/MMaskField.vue +6 -6
- package/src/components/MMenu.vue +13 -6
- package/src/components/MMenuItem.vue +8 -6
- package/src/components/MMultiAutocomplete.vue +9 -8
- package/src/components/MMultiSelect.vue +9 -8
- package/src/components/MNavigationDrawer.vue +39 -27
- package/src/components/MNavigationRail.vue +28 -19
- package/src/components/MNavigationSuite.vue +1 -1
- package/src/components/MNotificationCenter.vue +1 -1
- package/src/components/MNotificationHost.vue +1 -1
- package/src/components/MNumberField.vue +6 -6
- package/src/components/MOrderTicket.vue +1 -1
- package/src/components/MPageProgress.vue +1 -1
- package/src/components/MPdfSigner.vue +1 -1
- package/src/components/MPhoneInput.vue +5 -4
- package/src/components/MPinInput.vue +3 -2
- package/src/components/MPosKeypad.vue +2 -1
- package/src/components/MProductConfigurator.vue +2 -1
- package/src/components/MProgressBar.vue +2 -2
- package/src/components/MRichTextEditor.vue +8 -4
- package/src/components/MScheduler.vue +14 -14
- package/src/components/MSearchField.vue +1 -1
- package/src/components/MSeatMap.vue +2 -1
- package/src/components/MSegmentedButton.vue +1 -1
- package/src/components/MSelect.vue +7 -7
- package/src/components/MSideSheet.vue +3 -2
- package/src/components/MSimpleCarousel.vue +20 -11
- package/src/components/MSlider.vue +15 -5
- package/src/components/MSnackbar.vue +2 -2
- package/src/components/MSplitButton.vue +3 -2
- package/src/components/MSplitter.vue +6 -3
- package/src/components/MSpotlightSearch.vue +1 -1
- package/src/components/MSwitch.vue +5 -5
- package/src/components/MTable.vue +3 -3
- package/src/components/MTabs.vue +4 -1
- package/src/components/MTagInput.vue +6 -6
- package/src/components/MTerminal.vue +1 -1
- package/src/components/MText.vue +1 -1
- package/src/components/MTextField.vue +7 -7
- package/src/components/MTimePicker.vue +3 -2
- package/src/components/MTimePickerModal.vue +2 -2
- package/src/components/MTimeScroll.vue +1 -1
- package/src/components/MTimeline.vue +12 -12
- package/src/components/MToolbar.vue +3 -3
- package/src/components/MTrackingTimeline.vue +3 -2
- package/src/components/MTransition.vue +8 -3
- package/src/components/MTreeTable.vue +1 -1
- package/src/components/MTypewriter.vue +1 -1
- package/src/components/MVirtualTable.vue +2 -2
- package/src/components/MWindow.vue +4 -3
- package/src/components/_MColorPanel.vue +5 -4
- package/src/components/_MDrawerItemList.vue +9 -5
- package/src/components/_MMapAttribution.vue +2 -1
- package/src/components/_MMonthYearButton.vue +1 -1
- package/src/components/_MTransferPane.vue +8 -1
- package/src/components/_MTreeNode.vue +3 -3
- package/src/components/_MYearGrid.vue +4 -2
- package/src/composables/_fieldLayout.ts +19 -19
- package/src/composables/_popupPosition.ts +5 -3
- package/src/composables/_rtl.ts +76 -0
- package/src/composables/_useMenuNav.ts +24 -17
- package/src/composables/_useSheetMotion.ts +10 -3
- package/src/composables/pdfSign.ts +2 -2
- package/src/composables/useLocale.ts +6 -0
- package/src/locales/ar.ts +798 -0
- package/src/locales/de.ts +2 -0
- package/src/locales/es.ts +2 -0
- package/src/locales/fr.ts +2 -0
- package/src/locales/index.ts +1 -0
- package/src/locales/ja.ts +2 -0
- package/src/locales/ko.ts +2 -0
- package/src/locales/pt.ts +2 -0
- package/src/locales/zh.ts +2 -0
- package/src/pdf-sign.ts +5 -0
- package/src/pdf.ts +0 -3
- package/src/plugin.ts +10 -0
- package/src/styles/theme.css +13 -0
- package/dist/MColorPickerModal-H8nuX0Wu.js.map +0 -1
- package/dist/MDialog-B42Mhn8W.js +0 -331
- package/dist/MDialog-B42Mhn8W.js.map +0 -1
- package/dist/MIcon-DpajuUTJ.js +0 -33
- package/dist/MIcon-DpajuUTJ.js.map +0 -1
- package/dist/MListItem-DiOAxaN7.js.map +0 -1
- package/dist/MMenuItem-BuxYoASE.js +0 -574
- package/dist/MMenuItem-BuxYoASE.js.map +0 -1
- package/dist/MSignaturePad-BTqGaPXA.js +0 -313
- package/dist/MSignaturePad-BTqGaPXA.js.map +0 -1
- package/dist/MSlider-D_O8J9YH.js +0 -739
- package/dist/MSlider-D_O8J9YH.js.map +0 -1
- package/dist/MTextField-CYk9yFvi.js.map +0 -1
- package/dist/MTooltip-CK39Zon4.js +0 -183
- package/dist/MTooltip-CK39Zon4.js.map +0 -1
- package/dist/_popupPosition-nL8SVKPK.js.map +0 -1
- package/dist/pdf.js.map +0 -1
- package/dist/useLocale-DL96OFgr.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as a } from "./_useFieldValidation-
|
|
1
|
+
import { t as e } from "./MIcon-BSsJZhK7.js";
|
|
2
|
+
import { i as t } from "./useLocale-ybIju59R.js";
|
|
3
|
+
import { a as n, i as r, s as i } from "./MIconButton-CNjN0xwW.js";
|
|
4
|
+
import { n as a } from "./_useFieldValidation-CvZnZfl-.js";
|
|
5
5
|
import { Transition as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, getCurrentInstance as h, h as g, inject as _, mergeProps as v, nextTick as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, onUnmounted as w, onUpdated as T, openBlock as E, provide as D, ref as O, renderSlot as k, resolveDynamicComponent as ee, shallowRef as A, toDisplayString as j, unref as M, useId as te, useSlots as N, watch as P, withCtx as F, withModifiers as I } from "vue";
|
|
6
6
|
// src/composables/_useFollowAnchor.ts
|
|
7
7
|
var L = /(auto|scroll|hidden|clip)/;
|
|
@@ -201,17 +201,17 @@ var ne = /* @__PURE__ */ m({
|
|
|
201
201
|
name: {}
|
|
202
202
|
},
|
|
203
203
|
emits: ["update:modelValue", "blur"],
|
|
204
|
-
setup(
|
|
205
|
-
let
|
|
206
|
-
value: () =>
|
|
207
|
-
rules: () =>
|
|
208
|
-
required: () =>
|
|
209
|
-
error: () =>
|
|
210
|
-
errorLabel: () =>
|
|
211
|
-
name: () =>
|
|
212
|
-
validateOn: () =>
|
|
213
|
-
validateDebounce: () =>
|
|
214
|
-
disabled: () =>
|
|
204
|
+
setup(t, { expose: n, emit: r }) {
|
|
205
|
+
let i = t, o = r, s = O(null), c = a({
|
|
206
|
+
value: () => i.modelValue,
|
|
207
|
+
rules: () => i.rules,
|
|
208
|
+
required: () => i.required,
|
|
209
|
+
error: () => i.error,
|
|
210
|
+
errorLabel: () => i.errorLabel,
|
|
211
|
+
name: () => i.name,
|
|
212
|
+
validateOn: () => i.validateOn,
|
|
213
|
+
validateDebounce: () => i.validateDebounce,
|
|
214
|
+
disabled: () => i.disabled,
|
|
215
215
|
focus: () => {
|
|
216
216
|
s.value?.focus();
|
|
217
217
|
},
|
|
@@ -228,44 +228,44 @@ var ne = /* @__PURE__ */ m({
|
|
|
228
228
|
tertiary: "bg-tertiary",
|
|
229
229
|
error: "bg-error"
|
|
230
230
|
};
|
|
231
|
-
return
|
|
231
|
+
return n({
|
|
232
232
|
validate: c.validate,
|
|
233
233
|
resetValidation: c.resetValidation
|
|
234
|
-
}), (
|
|
234
|
+
}), (n, r) => (E(), u("label", { class: b(["group inline-flex gap-2 select-none", [M(m) ? "cursor-not-allowed" : "cursor-pointer", M(g) ? "items-start" : "items-center"]]) }, [d("span", {
|
|
235
235
|
class: "relative -m-[11px] inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full",
|
|
236
236
|
style: x(M(g) ? { marginTop: "-8px" } : void 0)
|
|
237
237
|
}, [
|
|
238
238
|
d("input", {
|
|
239
239
|
type: "checkbox",
|
|
240
240
|
class: "peer sr-only",
|
|
241
|
-
checked:
|
|
241
|
+
checked: t.modelValue,
|
|
242
242
|
disabled: M(m),
|
|
243
243
|
ref_key: "inputEl",
|
|
244
244
|
ref: s,
|
|
245
|
-
name:
|
|
246
|
-
required:
|
|
247
|
-
"aria-label":
|
|
245
|
+
name: t.name,
|
|
246
|
+
required: t.required,
|
|
247
|
+
"aria-label": t.ariaLabel,
|
|
248
248
|
"aria-invalid": M(h) || void 0,
|
|
249
249
|
"aria-describedby": M(g) ? M(_) : void 0,
|
|
250
|
-
onChange:
|
|
251
|
-
onBlur:
|
|
250
|
+
onChange: r[0] ||= (e) => o("update:modelValue", !t.modelValue),
|
|
251
|
+
onBlur: r[1] ||= (e) => {
|
|
252
252
|
M(c).onBlur(), o("blur", e);
|
|
253
253
|
}
|
|
254
254
|
}, null, 40, G),
|
|
255
255
|
M(m) ? l("", !0) : (E(), u("span", {
|
|
256
256
|
key: 0,
|
|
257
|
-
class: b(["pointer-events-none absolute inset-0 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12]", M(h) ? "bg-error" :
|
|
257
|
+
class: b(["pointer-events-none absolute inset-0 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12]", M(h) ? "bg-error" : t.modelValue || t.indeterminate ? y[t.color] : "bg-on-surface"])
|
|
258
258
|
}, null, 2)),
|
|
259
259
|
M(m) ? l("", !0) : (E(), u("span", se)),
|
|
260
|
-
d("span", { class: b(["relative inline-flex h-4.5 w-4.5 items-center justify-center rounded-[2px] border-2 transition-colors", M(m) ?
|
|
261
|
-
name:
|
|
260
|
+
d("span", { class: b(["relative inline-flex h-4.5 w-4.5 items-center justify-center rounded-[2px] border-2 transition-colors", M(m) ? t.modelValue || t.indeterminate ? "border-on-surface/38 bg-on-surface/38 text-surface" : "border-on-surface/38 text-transparent" : M(h) ? t.modelValue || t.indeterminate ? ue : "border-error text-transparent" : t.modelValue || t.indeterminate ? v[t.color] : "border-on-surface-variant text-transparent group-hover:border-on-surface group-active:border-on-surface"]) }, [p(e, {
|
|
261
|
+
name: t.indeterminate ? "remove" : "check",
|
|
262
262
|
size: 18,
|
|
263
|
-
class: b(["transition-[opacity,transform] duration-150",
|
|
263
|
+
class: b(["transition-[opacity,transform] duration-150", t.modelValue || t.indeterminate ? "scale-100 opacity-100" : "scale-0 opacity-0"])
|
|
264
264
|
}, null, 8, ["name", "class"])], 2)
|
|
265
|
-
], 4),
|
|
265
|
+
], 4), t.label || n.$slots.default || M(g) ? (E(), u("span", ce, [t.label || n.$slots.default ? (E(), u("span", {
|
|
266
266
|
key: 0,
|
|
267
267
|
class: b(["text-body-large", M(m) ? "text-on-surface/38" : "text-on-surface"])
|
|
268
|
-
}, [k(
|
|
268
|
+
}, [k(n.$slots, "default", {}, () => [f(j(t.label), 1)]), t.required ? (E(), u("span", K, "\xA0*")) : l("", !0)], 2)) : l("", !0), M(g) ? (E(), u("span", {
|
|
269
269
|
key: 1,
|
|
270
270
|
id: M(_),
|
|
271
271
|
role: "alert",
|
|
@@ -313,7 +313,7 @@ var ne = /* @__PURE__ */ m({
|
|
|
313
313
|
"error",
|
|
314
314
|
"tertiary",
|
|
315
315
|
"secondary"
|
|
316
|
-
], m = a, h = o, g =
|
|
316
|
+
], m = a, h = o, g = t(), _ = N(), v = s(() => !!m.tone && !f.includes(m.tone)), y = s(() => {
|
|
317
317
|
if (v.value) return {
|
|
318
318
|
"--chip-bg": m.tone + "22",
|
|
319
319
|
"--chip-color": m.tone
|
|
@@ -337,16 +337,16 @@ var ne = /* @__PURE__ */ m({
|
|
|
337
337
|
if (e) return ["bg-secondary-container text-on-secondary-container", m.elevated ? "shadow-elevation-1 hover:shadow-elevation-2" : ""];
|
|
338
338
|
let t = m.type === "assist" ? "text-on-surface" : "text-on-surface-variant";
|
|
339
339
|
return m.elevated && m.type !== "input" ? ["bg-surface-container-low shadow-elevation-1 hover:shadow-elevation-2", t] : ["border border-outline-variant", t];
|
|
340
|
-
}), j = s(() => m.disabled ? "" : m.type === "assist" || m.type === "suggestion" ? "text-primary" : m.selected ? "text-on-secondary-container" : "text-on-surface-variant"), te = s(() => m.type === "input" ? [T.value ? "
|
|
341
|
-
|
|
340
|
+
}), j = s(() => m.disabled ? "" : m.type === "assist" || m.type === "suggestion" ? "text-primary" : m.selected ? "text-on-secondary-container" : "text-on-surface-variant"), te = s(() => m.type === "input" ? [T.value ? "ps-1" : m.icon ? "ps-2" : "ps-3", D.value ? "pe-2" : "pe-3"] : [m.icon || z.value ? "ps-2" : "ps-4", D.value ? "pe-2" : "pe-4"]), P = O(!1), L = O(), R = O(), z = s(() => m.type === "filter" && !m.icon);
|
|
341
|
+
i(() => m.type === "filter" || m.type === "input" ? [P.value ? 8 : m.selected ? 16 : 12, z.value ? m.selected ? 26 : 8 : 0] : [], ([e, t]) => {
|
|
342
342
|
L.value && e !== void 0 && (L.value.style.borderRadius = `${e}px`), R.value && t !== void 0 && (R.value.style.width = `${t}px`);
|
|
343
|
-
},
|
|
343
|
+
}, n), i(() => z.value ? [+!!m.selected] : [], ([e]) => {
|
|
344
344
|
R.value && e !== void 0 && (R.value.style.opacity = String(e));
|
|
345
|
-
},
|
|
345
|
+
}, r);
|
|
346
346
|
function ne() {
|
|
347
347
|
m.disabled || (w.value && h("update:selected", !m.selected), h("click"));
|
|
348
348
|
}
|
|
349
|
-
return (
|
|
349
|
+
return (t, n) => a.type ? (E(), u("span", {
|
|
350
350
|
key: 0,
|
|
351
351
|
ref_key: "typedEl",
|
|
352
352
|
ref: L,
|
|
@@ -356,16 +356,16 @@ var ne = /* @__PURE__ */ m({
|
|
|
356
356
|
class: b(["flex h-full items-center gap-2 outline-none before:pointer-events-none before:absolute before:inset-0 before:bg-current before:opacity-0 before:transition-opacity", [te.value, a.disabled ? "cursor-not-allowed" : "cursor-pointer hover:before:opacity-[0.08] active:before:opacity-[0.12]"]]),
|
|
357
357
|
disabled: a.disabled,
|
|
358
358
|
"aria-pressed": w.value ? a.selected : void 0,
|
|
359
|
-
onPointerdown:
|
|
360
|
-
onPointerup:
|
|
361
|
-
onPointerleave:
|
|
362
|
-
onPointercancel:
|
|
359
|
+
onPointerdown: n[0] ||= (e) => P.value = !0,
|
|
360
|
+
onPointerup: n[1] ||= (e) => P.value = !1,
|
|
361
|
+
onPointerleave: n[2] ||= (e) => P.value = !1,
|
|
362
|
+
onPointercancel: n[3] ||= (e) => P.value = !1,
|
|
363
363
|
onClick: ne
|
|
364
364
|
}, [
|
|
365
365
|
T.value ? (E(), u("span", {
|
|
366
366
|
key: 0,
|
|
367
367
|
class: b(["-my-1 flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full", a.disabled ? "opacity-38" : ""])
|
|
368
|
-
}, [k(
|
|
368
|
+
}, [k(t.$slots, "avatar")], 2)) : a.icon ? (E(), c(e, {
|
|
369
369
|
key: 1,
|
|
370
370
|
name: a.icon,
|
|
371
371
|
size: 18,
|
|
@@ -379,19 +379,19 @@ var ne = /* @__PURE__ */ m({
|
|
|
379
379
|
key: 2,
|
|
380
380
|
ref_key: "checkEl",
|
|
381
381
|
ref: R,
|
|
382
|
-
class: "-
|
|
382
|
+
class: "-me-2 flex shrink-0 overflow-hidden",
|
|
383
383
|
style: {
|
|
384
384
|
width: "8px",
|
|
385
385
|
opacity: "0"
|
|
386
386
|
},
|
|
387
387
|
"aria-hidden": "true"
|
|
388
|
-
}, [p(
|
|
388
|
+
}, [p(e, {
|
|
389
389
|
name: "check",
|
|
390
390
|
size: 18,
|
|
391
391
|
class: b(["shrink-0", j.value])
|
|
392
392
|
}, null, 8, ["class"])], 512)) : l("", !0),
|
|
393
|
-
d("span", pe, [k(
|
|
394
|
-
a.trailingIcon ? (E(), c(
|
|
393
|
+
d("span", pe, [k(t.$slots, "default")]),
|
|
394
|
+
a.trailingIcon ? (E(), c(e, {
|
|
395
395
|
key: 3,
|
|
396
396
|
name: a.trailingIcon,
|
|
397
397
|
size: 18,
|
|
@@ -400,11 +400,11 @@ var ne = /* @__PURE__ */ m({
|
|
|
400
400
|
], 42, fe), a.type === "input" && a.removable ? (E(), u("button", {
|
|
401
401
|
key: 0,
|
|
402
402
|
type: "button",
|
|
403
|
-
class: b(["relative -
|
|
403
|
+
class: b(["relative -ms-1 me-2 flex h-6 w-6 shrink-0 items-center justify-center rounded-full outline-none hover:bg-on-surface/8 focus-visible:ring-2 focus-visible:ring-secondary", a.disabled ? "cursor-not-allowed" : "cursor-pointer"]),
|
|
404
404
|
"aria-label": M(g).remove,
|
|
405
405
|
disabled: a.disabled,
|
|
406
|
-
onClick:
|
|
407
|
-
}, [p(
|
|
406
|
+
onClick: n[4] ||= I((e) => h("remove"), ["stop"])
|
|
407
|
+
}, [p(e, {
|
|
408
408
|
name: "close",
|
|
409
409
|
size: 18
|
|
410
410
|
})], 10, q)) : l("", !0)], 2)) : (E(), c(ee(a.clickable ? "button" : "span"), {
|
|
@@ -418,23 +418,23 @@ var ne = /* @__PURE__ */ m({
|
|
|
418
418
|
a.disabled ? "cursor-not-allowed" : ""
|
|
419
419
|
]]),
|
|
420
420
|
style: x(y.value),
|
|
421
|
-
onClick:
|
|
421
|
+
onClick: n[6] ||= (e) => a.clickable && !a.disabled && h("click")
|
|
422
422
|
}, {
|
|
423
423
|
default: F(() => [
|
|
424
|
-
a.icon ? (E(), c(
|
|
424
|
+
a.icon ? (E(), c(e, {
|
|
425
425
|
key: 0,
|
|
426
426
|
name: a.icon,
|
|
427
427
|
size: 18
|
|
428
428
|
}, null, 8, ["name"])) : l("", !0),
|
|
429
|
-
k(
|
|
429
|
+
k(t.$slots, "default"),
|
|
430
430
|
a.removable ? (E(), u("button", {
|
|
431
431
|
key: 1,
|
|
432
432
|
type: "button",
|
|
433
|
-
class: "-
|
|
433
|
+
class: "-me-1 ms-0.5 inline-flex items-center justify-center rounded-full hover:bg-on-surface/12",
|
|
434
434
|
"aria-label": M(g).remove,
|
|
435
435
|
disabled: a.disabled,
|
|
436
|
-
onClick:
|
|
437
|
-
}, [p(
|
|
436
|
+
onClick: n[5] ||= I((e) => h("remove"), ["stop"])
|
|
437
|
+
}, [p(e, {
|
|
438
438
|
name: "close",
|
|
439
439
|
size: 16
|
|
440
440
|
})], 8, J)) : l("", !0)
|
|
@@ -483,17 +483,17 @@ var ne = /* @__PURE__ */ m({
|
|
|
483
483
|
name: {}
|
|
484
484
|
},
|
|
485
485
|
emits: ["update:modelValue", "blur"],
|
|
486
|
-
setup(
|
|
487
|
-
let
|
|
488
|
-
value: () =>
|
|
489
|
-
rules: () =>
|
|
490
|
-
required: () =>
|
|
491
|
-
error: () =>
|
|
492
|
-
errorLabel: () =>
|
|
493
|
-
name: () =>
|
|
494
|
-
validateOn: () =>
|
|
495
|
-
validateDebounce: () =>
|
|
496
|
-
disabled: () =>
|
|
486
|
+
setup(t, { expose: n, emit: r }) {
|
|
487
|
+
let i = t, m = r, h = O(null), g = a({
|
|
488
|
+
value: () => i.modelValue,
|
|
489
|
+
rules: () => i.rules,
|
|
490
|
+
required: () => i.required,
|
|
491
|
+
error: () => i.error,
|
|
492
|
+
errorLabel: () => i.errorLabel,
|
|
493
|
+
name: () => i.name,
|
|
494
|
+
validateOn: () => i.validateOn,
|
|
495
|
+
validateDebounce: () => i.validateDebounce,
|
|
496
|
+
disabled: () => i.disabled,
|
|
497
497
|
focus: () => {
|
|
498
498
|
h.value?.focus();
|
|
499
499
|
},
|
|
@@ -526,52 +526,52 @@ var ne = /* @__PURE__ */ m({
|
|
|
526
526
|
function A() {
|
|
527
527
|
k.value = !1;
|
|
528
528
|
}
|
|
529
|
-
let te = s(() => k.value ? 28 / 24 :
|
|
530
|
-
transform: `translateY(-50%) translateX(${
|
|
531
|
-
transition:
|
|
529
|
+
let te = s(() => k.value ? 28 / 24 : i.modelValue ? 1 : 16 / 24), N = s(() => ({
|
|
530
|
+
transform: `translateY(-50%) translateX(calc(${i.modelValue ? 18 : 0}px * var(--m3-dir, 1))) scale(${te.value})`,
|
|
531
|
+
transition: i.modelValue ? "transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 280ms ease" : "transform 240ms cubic-bezier(0.2, 0, 0, 1), background-color 240ms ease"
|
|
532
532
|
})), P = s(() => ({
|
|
533
|
-
transform: `translateX(${
|
|
534
|
-
transition:
|
|
533
|
+
transform: `translateX(calc(${i.modelValue ? 18 : 0}px * var(--m3-dir, 1)))`,
|
|
534
|
+
transition: i.modelValue ? "transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1)" : "transform 240ms cubic-bezier(0.2, 0, 0, 1)"
|
|
535
535
|
}));
|
|
536
|
-
return
|
|
536
|
+
return n({
|
|
537
537
|
validate: g.validate,
|
|
538
538
|
resetValidation: g.resetValidation
|
|
539
|
-
}), (
|
|
539
|
+
}), (n, r) => (E(), u("label", {
|
|
540
540
|
class: b(["group inline-flex gap-3 select-none", [M(_) ? "cursor-not-allowed opacity-[0.38]" : "cursor-pointer", M(y) ? "items-start" : "items-center"]]),
|
|
541
541
|
onPointerdown: ee,
|
|
542
542
|
onPointerup: A,
|
|
543
543
|
onPointerleave: A,
|
|
544
544
|
onPointercancel: A
|
|
545
|
-
}, [d("span", he, [d("span", { class: b(["relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200",
|
|
545
|
+
}, [d("span", he, [d("span", { class: b(["relative inline-flex h-8 w-[52px] items-center rounded-full border-2 transition-colors duration-200", t.modelValue ? C[t.color] : "border-outline bg-surface-container-highest"]) }, [
|
|
546
546
|
d("input", {
|
|
547
547
|
type: "checkbox",
|
|
548
548
|
class: "peer sr-only",
|
|
549
|
-
checked:
|
|
549
|
+
checked: t.modelValue,
|
|
550
550
|
disabled: M(_),
|
|
551
551
|
ref_key: "inputEl",
|
|
552
552
|
ref: h,
|
|
553
553
|
role: "switch",
|
|
554
|
-
name:
|
|
555
|
-
required:
|
|
554
|
+
name: t.name,
|
|
555
|
+
required: t.required,
|
|
556
556
|
"aria-invalid": M(v) || void 0,
|
|
557
557
|
"aria-describedby": M(y) ? M(S) : void 0,
|
|
558
|
-
onChange:
|
|
559
|
-
onBlur:
|
|
558
|
+
onChange: r[0] ||= (e) => m("update:modelValue", !t.modelValue),
|
|
559
|
+
onBlur: r[1] ||= (e) => {
|
|
560
560
|
M(g).onBlur(), m("blur", e);
|
|
561
561
|
}
|
|
562
562
|
}, null, 40, ge),
|
|
563
563
|
M(_) ? l("", !0) : (E(), u("span", {
|
|
564
564
|
key: 0,
|
|
565
|
-
class: b(["pointer-events-none absolute top-1/2 -
|
|
565
|
+
class: b(["pointer-events-none absolute top-1/2 -start-1 h-10 w-10 -translate-y-1/2 rounded-full opacity-0 transition-opacity duration-150 group-hover:opacity-[0.08] group-active:opacity-[0.12] peer-focus-visible:opacity-[0.08]", t.modelValue ? D[t.color] : "bg-on-surface-variant"]),
|
|
566
566
|
style: x(P.value)
|
|
567
567
|
}, null, 6)),
|
|
568
568
|
M(_) ? l("", !0) : (E(), u("span", {
|
|
569
569
|
key: 1,
|
|
570
|
-
class: "pointer-events-none absolute top-1/2 -
|
|
570
|
+
class: "pointer-events-none absolute top-1/2 -start-1 h-10 w-10 -translate-y-1/2 rounded-full ring-0 ring-secondary transition-[box-shadow] duration-150 peer-focus-visible:ring-2",
|
|
571
571
|
style: x(P.value)
|
|
572
572
|
}, null, 4)),
|
|
573
573
|
d("span", {
|
|
574
|
-
class: b(["absolute
|
|
574
|
+
class: b(["absolute start-1 top-1/2 flex h-6 w-6 items-center justify-center rounded-full will-change-transform", t.modelValue ? [w[t.color], "shadow-sm"] : ve]),
|
|
575
575
|
style: x(N.value)
|
|
576
576
|
}, [p(o, {
|
|
577
577
|
"enter-active-class": "transition-opacity duration-150 delay-[120ms]",
|
|
@@ -581,18 +581,18 @@ var ne = /* @__PURE__ */ m({
|
|
|
581
581
|
"leave-from-class": "opacity-100",
|
|
582
582
|
"leave-to-class": "opacity-0"
|
|
583
583
|
}, {
|
|
584
|
-
default: F(() => [
|
|
584
|
+
default: F(() => [t.modelValue && t.icon ? (E(), c(e, {
|
|
585
585
|
key: 0,
|
|
586
586
|
name: "check",
|
|
587
587
|
size: 14,
|
|
588
|
-
class: b(T[
|
|
588
|
+
class: b(T[t.color])
|
|
589
589
|
}, null, 8, ["class"])) : l("", !0)]),
|
|
590
590
|
_: 1
|
|
591
591
|
})], 6)
|
|
592
|
-
], 2)]),
|
|
592
|
+
], 2)]), t.label || M(y) ? (E(), u("span", {
|
|
593
593
|
key: 0,
|
|
594
594
|
class: b(["flex flex-col", M(y) && "pt-1"])
|
|
595
|
-
}, [
|
|
595
|
+
}, [t.label ? (E(), u("span", X, [f(j(t.label), 1), t.required ? (E(), u("span", Z, "\xA0*")) : l("", !0)])) : l("", !0), M(y) ? (E(), u("span", {
|
|
596
596
|
key: 1,
|
|
597
597
|
id: M(S),
|
|
598
598
|
role: "alert",
|
|
@@ -730,32 +730,32 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
730
730
|
"update:trailingValue",
|
|
731
731
|
"update:expanded"
|
|
732
732
|
],
|
|
733
|
-
setup(
|
|
734
|
-
let
|
|
735
|
-
P(() =>
|
|
733
|
+
setup(t, { emit: n }) {
|
|
734
|
+
let r = t, a = n, f = h(), m = () => !!f?.vnode.props?.onClick, y = O(r.expanded ?? !1);
|
|
735
|
+
P(() => r.expanded, (e) => {
|
|
736
736
|
e !== void 0 && (y.value = e);
|
|
737
737
|
});
|
|
738
|
-
let S = s(() => y.value), C = _("m-list", null), w = s(() =>
|
|
739
|
-
if (D.value) return B.value && !
|
|
740
|
-
if (N.value) return
|
|
738
|
+
let S = s(() => y.value), C = _("m-list", null), w = s(() => r.lines ? r.lines : C?.lines.value ? C.lines.value : r.description || r.overline && r.subtitle ? 3 : r.subtitle || r.overline ? 2 : 1), T = s(() => r.clickable || r.href || r.to || m() || C?.selectable.value || r.expandable), D = s(() => !!C?.selectable.value && r.value != null && !r.href && !r.to && !r.expandable), A = s(() => !!(r.href || r.to)), N = s(() => !D.value && !A.value && !r.expandable && (r.clickable || m())), I = s(() => A.value || N.value), L = s(() => D.value ? "option" : N.value ? "button" : A.value ? void 0 : "listitem"), R = s(() => {
|
|
739
|
+
if (D.value) return B.value && !r.disabled ? 0 : -1;
|
|
740
|
+
if (N.value) return r.disabled ? -1 : 0;
|
|
741
741
|
});
|
|
742
742
|
function z(e) {
|
|
743
743
|
(D.value || N.value) && (e.key !== "Enter" && e.key !== " " || e.target !== e.currentTarget || (e.preventDefault(), $(e)));
|
|
744
744
|
}
|
|
745
|
-
let B = s(() =>
|
|
745
|
+
let B = s(() => r.active ? !0 : C?.selectable.value && r.value != null ? C.selected.value === r.value : !1), V = s(() => r.leading ? r.leading : r.icon ? "icon" : r.avatarName ? "avatar" : r.image ? "image" : null), H = s(() => r.expandable ? "expand" : r.trailing ? r.trailing : r.trailingIcon ? "icon" : r.trailingText ? "text" : null), re = {
|
|
746
746
|
primary: "bg-primary-container text-on-primary-container",
|
|
747
747
|
secondary: "bg-secondary-container text-on-secondary-container",
|
|
748
748
|
tertiary: "bg-tertiary-container text-on-tertiary-container",
|
|
749
749
|
error: "bg-error-container text-on-error-container",
|
|
750
750
|
success: "bg-success-container text-on-success-container"
|
|
751
751
|
}, ie = s(() => C?.dense.value ?? !1), U = s(() => C?.nav.value ?? !1), W = s(() => C?.segmented.value ?? !1), ae = s(() => C?.dividers.value ?? !1), oe = s(() => B.value ? "text-on-secondary-container" : "text-on-surface"), G = s(() => B.value ? "text-on-secondary-container" : "text-on-surface-variant"), se = s(() => ie.value ? "" : w.value === 3 ? "min-h-22" : w.value === 2 ? "min-h-18" : "min-h-14"), ce = s(() => [
|
|
752
|
-
"mli-row relative flex w-full items-center gap-4 text-
|
|
752
|
+
"mli-row relative flex w-full items-center gap-4 text-start",
|
|
753
753
|
W.value ? "bg-surface-container px-4" : U.value ? "rounded-full px-4" : "px-4",
|
|
754
754
|
ie.value ? "py-1" : w.value === 3 ? "py-3" : "py-2",
|
|
755
755
|
se.value,
|
|
756
|
-
T.value && !
|
|
756
|
+
T.value && !r.disabled && "cursor-pointer",
|
|
757
757
|
B.value && "bg-secondary-container text-on-secondary-container",
|
|
758
|
-
|
|
758
|
+
r.disabled && "opacity-[0.38] pointer-events-none"
|
|
759
759
|
]), K = O(null), le = O(null), ue = (e, { slots: t }) => I.value ? g("li", {
|
|
760
760
|
role: "listitem",
|
|
761
761
|
ref: (e) => {
|
|
@@ -763,21 +763,21 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
763
763
|
}
|
|
764
764
|
}, t.default?.()) : t.default?.(), fe = O(null), pe = (e) => e && "$el" in e ? e.$el : e, q = O(!1), J = O(!1), Y = O(!1), me = s(() => W.value ? C?.segmentPosition(I.value ? le.value : pe(K.value)) : void 0), he = s(() => {
|
|
765
765
|
if (U.value) return [];
|
|
766
|
-
let e = T.value && !
|
|
766
|
+
let e = T.value && !r.disabled, t = e && J.value || B.value || e && Y.value ? ke : e && q.value ? Oe : null;
|
|
767
767
|
if (t !== null) return [
|
|
768
768
|
t,
|
|
769
769
|
t,
|
|
770
770
|
t,
|
|
771
771
|
t
|
|
772
772
|
];
|
|
773
|
-
let
|
|
773
|
+
let n = me.value, i = n === "first" || n === "single" ? ke : De, a = n === "last" || n === "single" ? ke : De;
|
|
774
774
|
return [
|
|
775
775
|
i,
|
|
776
776
|
i,
|
|
777
777
|
a,
|
|
778
778
|
a
|
|
779
779
|
];
|
|
780
|
-
}), { snap: ge } =
|
|
780
|
+
}), { snap: ge } = i(() => he.value, (e) => {
|
|
781
781
|
let t = fe.value ?? pe(K.value);
|
|
782
782
|
t && (t.style.borderRadius = e.length ? e.map((e) => `${e}px`).join(" ") : "");
|
|
783
783
|
});
|
|
@@ -798,43 +798,43 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
798
798
|
function Q() {
|
|
799
799
|
J.value = !1;
|
|
800
800
|
}
|
|
801
|
-
let be = s(() => !T.value ||
|
|
801
|
+
let be = s(() => !T.value || r.disabled ? 0 : J.value ? .12 : q.value ? .08 : 0), xe = s(() => r.indent === void 0 ? void 0 : { paddingInlineStart: typeof r.indent == "number" ? `${r.indent}px` : r.indent });
|
|
802
802
|
function je(e) {
|
|
803
803
|
Y.value = e.currentTarget.matches(":focus-visible");
|
|
804
804
|
}
|
|
805
805
|
function Me() {
|
|
806
806
|
Y.value = !1;
|
|
807
807
|
}
|
|
808
|
-
let Ne = s(() =>
|
|
808
|
+
let Ne = s(() => r.href ? "a" : r.to ? "router-link" : N.value ? "div" : "li"), Pe = s(() => r.href ? { href: r.href } : r.to ? { to: r.to } : {}), Fe = te();
|
|
809
809
|
function Ie(e) {
|
|
810
810
|
(e.key === "Enter" || e.key === " ") && e.target === e.currentTarget && (e.preventDefault(), $(e));
|
|
811
811
|
}
|
|
812
812
|
function Le(e) {
|
|
813
|
-
|
|
813
|
+
r.disabled || (y.value = !y.value, a("update:expanded", y.value), a("click", e));
|
|
814
814
|
}
|
|
815
815
|
function $(e) {
|
|
816
|
-
if (!
|
|
817
|
-
if (
|
|
816
|
+
if (!r.disabled) {
|
|
817
|
+
if (r.expandable) {
|
|
818
818
|
if (X(e)) return;
|
|
819
819
|
Le(e);
|
|
820
|
-
} else C?.selectable.value &&
|
|
820
|
+
} else C?.selectable.value && r.value != null && C.select(r.value), a("click", e);
|
|
821
821
|
}
|
|
822
822
|
}
|
|
823
823
|
function Re() {
|
|
824
|
-
a("update:trailingValue", !
|
|
824
|
+
a("update:trailingValue", !r.trailingValue);
|
|
825
825
|
}
|
|
826
|
-
return (
|
|
826
|
+
return (n, r) => t.expandable ? (E(), u("li", v({
|
|
827
827
|
key: 0,
|
|
828
828
|
ref_key: "rootEl",
|
|
829
829
|
ref: K
|
|
830
|
-
},
|
|
830
|
+
}, n.$attrs, { role: "listitem" }), [d("div", {
|
|
831
831
|
ref_key: "shapeEl",
|
|
832
832
|
ref: fe,
|
|
833
833
|
role: "button",
|
|
834
|
-
tabindex:
|
|
834
|
+
tabindex: t.disabled ? -1 : 0,
|
|
835
835
|
"aria-expanded": S.value,
|
|
836
836
|
"aria-controls": M(Fe),
|
|
837
|
-
"aria-disabled":
|
|
837
|
+
"aria-disabled": t.disabled || void 0,
|
|
838
838
|
class: b(["focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary", ce.value]),
|
|
839
839
|
onClick: $,
|
|
840
840
|
onKeydown: Ie,
|
|
@@ -852,21 +852,21 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
852
852
|
style: x({ opacity: be.value }),
|
|
853
853
|
"aria-hidden": "true"
|
|
854
854
|
}, null, 6),
|
|
855
|
-
k(
|
|
855
|
+
k(n.$slots, "leading", {}, () => [V.value === "icon" ? (E(), c(e, {
|
|
856
856
|
key: 0,
|
|
857
|
-
name:
|
|
857
|
+
name: t.icon,
|
|
858
858
|
size: 24,
|
|
859
859
|
class: b(["shrink-0", G.value])
|
|
860
860
|
}, null, 8, ["name", "class"])) : l("", !0)]),
|
|
861
|
-
d("div", Ce, [k(
|
|
861
|
+
d("div", Ce, [k(n.$slots, "overline", {}, () => [t.overline ? (E(), u("p", {
|
|
862
862
|
key: 0,
|
|
863
863
|
class: b(["truncate text-label-small", G.value])
|
|
864
|
-
}, j(
|
|
864
|
+
}, j(t.overline), 3)) : l("", !0)]), k(n.$slots, "default", {}, () => [d("p", { class: b(["truncate text-body-large", oe.value]) }, j(t.title), 3), t.subtitle && w.value >= 2 ? (E(), u("p", {
|
|
865
865
|
key: 0,
|
|
866
866
|
class: b(["text-body-medium", [G.value, w.value === 2 && "truncate"]])
|
|
867
|
-
}, j(
|
|
868
|
-
k(
|
|
869
|
-
p(
|
|
867
|
+
}, j(t.subtitle), 3)) : l("", !0)])]),
|
|
868
|
+
k(n.$slots, "trailing"),
|
|
869
|
+
p(e, {
|
|
870
870
|
name: S.value ? "expand_less" : "expand_more",
|
|
871
871
|
size: 20,
|
|
872
872
|
class: b(["shrink-0", G.value])
|
|
@@ -879,7 +879,7 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
879
879
|
}, [d("div", {
|
|
880
880
|
class: "mli-expand-body",
|
|
881
881
|
style: x(xe.value)
|
|
882
|
-
}, [k(
|
|
882
|
+
}, [k(n.$slots, "children")], 4)], 8, we)) : l("", !0)]),
|
|
883
883
|
_: 3
|
|
884
884
|
})], 16)) : (E(), c(ue, { key: 1 }, {
|
|
885
885
|
default: F(() => [(E(), c(ee(Ne.value), v({
|
|
@@ -888,12 +888,12 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
888
888
|
ref: K
|
|
889
889
|
}, {
|
|
890
890
|
...Pe.value,
|
|
891
|
-
...
|
|
891
|
+
...n.$attrs
|
|
892
892
|
}, {
|
|
893
893
|
role: L.value,
|
|
894
894
|
tabindex: R.value,
|
|
895
895
|
"aria-selected": D.value ? B.value : void 0,
|
|
896
|
-
"aria-disabled": (D.value || N.value) &&
|
|
896
|
+
"aria-disabled": (D.value || N.value) && t.disabled ? "true" : void 0,
|
|
897
897
|
onClick: $,
|
|
898
898
|
onKeydown: z,
|
|
899
899
|
onPointerenter: Z,
|
|
@@ -913,27 +913,27 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
913
913
|
}, null, 6),
|
|
914
914
|
ae.value ? (E(), u("div", {
|
|
915
915
|
key: 0,
|
|
916
|
-
class: b(["absolute top-0
|
|
916
|
+
class: b(["absolute top-0 end-0 h-px bg-outline-variant", ae.value === "inset" ? "start-16" : "start-0"])
|
|
917
917
|
}, null, 2)) : l("", !0),
|
|
918
|
-
k(
|
|
918
|
+
k(n.$slots, "leading", {}, () => [V.value === "icon" ? (E(), c(e, {
|
|
919
919
|
key: 0,
|
|
920
|
-
name:
|
|
920
|
+
name: t.icon,
|
|
921
921
|
size: 24,
|
|
922
922
|
class: b(["shrink-0", G.value])
|
|
923
923
|
}, null, 8, ["name", "class"])) : V.value === "icon-container" ? (E(), u("div", {
|
|
924
924
|
key: 1,
|
|
925
|
-
class: b(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", re[
|
|
926
|
-
}, [p(
|
|
927
|
-
name:
|
|
925
|
+
class: b(["flex h-10 w-10 shrink-0 items-center justify-center rounded-full", re[t.iconContainerColor || "primary"]])
|
|
926
|
+
}, [p(e, {
|
|
927
|
+
name: t.icon,
|
|
928
928
|
size: 24
|
|
929
929
|
}, null, 8, ["name"])], 2)) : V.value === "avatar" ? (E(), c(ne, {
|
|
930
930
|
key: 2,
|
|
931
|
-
name:
|
|
931
|
+
name: t.avatarName,
|
|
932
932
|
size: 40,
|
|
933
933
|
class: "shrink-0"
|
|
934
934
|
}, null, 8, ["name"])) : V.value === "image" ? (E(), u("img", {
|
|
935
935
|
key: 3,
|
|
936
|
-
src:
|
|
936
|
+
src: t.image,
|
|
937
937
|
alt: "",
|
|
938
938
|
class: "h-14 w-14 shrink-0 rounded-md object-cover"
|
|
939
939
|
}, null, 8, Te)) : V.value === "checkbox" ? (E(), c(de, {
|
|
@@ -942,35 +942,35 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
942
942
|
class: "shrink-0",
|
|
943
943
|
"data-mli-part": ""
|
|
944
944
|
}, null, 8, ["model-value"])) : l("", !0)]),
|
|
945
|
-
d("div", Ee, [k(
|
|
945
|
+
d("div", Ee, [k(n.$slots, "overline", {}, () => [t.overline ? (E(), u("p", {
|
|
946
946
|
key: 0,
|
|
947
947
|
class: b(["truncate text-label-small", G.value])
|
|
948
|
-
}, j(
|
|
949
|
-
d("p", { class: b(["truncate text-body-large", oe.value]) }, j(
|
|
950
|
-
|
|
948
|
+
}, j(t.overline), 3)) : l("", !0)]), k(n.$slots, "default", {}, () => [
|
|
949
|
+
d("p", { class: b(["truncate text-body-large", oe.value]) }, j(t.title), 3),
|
|
950
|
+
t.subtitle && w.value >= 2 ? (E(), u("p", {
|
|
951
951
|
key: 0,
|
|
952
952
|
class: b(["text-body-medium", [G.value, w.value === 2 && "truncate"]])
|
|
953
|
-
}, j(
|
|
954
|
-
|
|
953
|
+
}, j(t.subtitle), 3)) : l("", !0),
|
|
954
|
+
t.description && w.value >= 3 ? (E(), u("p", {
|
|
955
955
|
key: 1,
|
|
956
956
|
class: b(["line-clamp-2 text-body-small", G.value])
|
|
957
|
-
}, j(
|
|
957
|
+
}, j(t.description), 3)) : l("", !0)
|
|
958
958
|
])]),
|
|
959
|
-
k(
|
|
959
|
+
k(n.$slots, "trailing", {}, () => [H.value === "icon" ? (E(), c(e, {
|
|
960
960
|
key: 0,
|
|
961
|
-
name:
|
|
961
|
+
name: t.trailingIcon,
|
|
962
962
|
size: 24,
|
|
963
963
|
class: b(["shrink-0", G.value])
|
|
964
964
|
}, null, 8, ["name", "class"])) : H.value === "text" ? (E(), u("span", {
|
|
965
965
|
key: 1,
|
|
966
966
|
class: b(["shrink-0 text-label-small", G.value])
|
|
967
|
-
}, j(
|
|
967
|
+
}, j(t.trailingText), 3)) : H.value === "switch" ? (E(), c(ye, {
|
|
968
968
|
key: 2,
|
|
969
|
-
"model-value": !!
|
|
969
|
+
"model-value": !!t.trailingValue,
|
|
970
970
|
"onUpdate:modelValue": Re
|
|
971
971
|
}, null, 8, ["model-value"])) : H.value === "checkbox" ? (E(), c(de, {
|
|
972
972
|
key: 3,
|
|
973
|
-
"model-value": !!
|
|
973
|
+
"model-value": !!t.trailingValue,
|
|
974
974
|
"onUpdate:modelValue": Re
|
|
975
975
|
}, null, 8, ["model-value"])) : l("", !0)])
|
|
976
976
|
]),
|
|
@@ -988,4 +988,4 @@ var be = ["role"], xe = /* @__PURE__ */ m({
|
|
|
988
988
|
});
|
|
989
989
|
export { me as a, ne as c, ye as i, z as l, xe as n, de as o, Q as r, oe as s, je as t };
|
|
990
990
|
|
|
991
|
-
//# sourceMappingURL=MListItem-
|
|
991
|
+
//# sourceMappingURL=MListItem-BBQ-6i3v.js.map
|