@m3ui-vue/m3ui-vue 1.8.1 → 1.10.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/README.md +2 -0
- package/dist/API.md +329 -21
- package/dist/{MButton-B6eZTfFV.js → MButton-B9RCM06i.js} +5 -5
- package/dist/MButton-B9RCM06i.js.map +1 -0
- package/dist/{MColorPickerModal-Dajjf6tH.js → MColorPickerModal-ChRtcZOo.js} +185 -185
- package/dist/MColorPickerModal-ChRtcZOo.js.map +1 -0
- package/dist/{MDialog-DQvE_JBv.js → MDialog-dk07tify.js} +7 -7
- package/dist/{MDialog-DQvE_JBv.js.map → MDialog-dk07tify.js.map} +1 -1
- package/dist/MIcon-BSsJZhK7.js +116 -0
- package/dist/MIcon-BSsJZhK7.js.map +1 -0
- package/dist/{MIconButton-BBggVwBV.js → MIconButton-CrBPZidd.js} +59 -52
- package/dist/MIconButton-CrBPZidd.js.map +1 -0
- package/dist/MListItem-h9H223vx.js +1239 -0
- package/dist/MListItem-h9H223vx.js.map +1 -0
- package/dist/{MLoadingIndicator-CuTZYFFj.js → MLoadingIndicator-YTV1Ov5w.js} +2 -2
- package/dist/{MLoadingIndicator-CuTZYFFj.js.map → MLoadingIndicator-YTV1Ov5w.js.map} +1 -1
- package/dist/MMenuItem-US0Zbglq.js +596 -0
- package/dist/MMenuItem-US0Zbglq.js.map +1 -0
- package/dist/{MPdfViewer-C5ngKPRM.js → MPdfViewer-DL9mRsd2.js} +9 -9
- package/dist/{MPdfViewer-C5ngKPRM.js.map → MPdfViewer-DL9mRsd2.js.map} +1 -1
- package/dist/MProgressBar-BzZMxq7M.js +254 -0
- package/dist/MProgressBar-BzZMxq7M.js.map +1 -0
- package/dist/{MSeekBar-BCDQTx2t.js → MSeekBar-JFZcoJ8y.js} +2 -2
- package/dist/{MSeekBar-BCDQTx2t.js.map → MSeekBar-JFZcoJ8y.js.map} +1 -1
- package/dist/MSegmentedButton-DMou-8sG.js +106 -0
- package/dist/MSegmentedButton-DMou-8sG.js.map +1 -0
- package/dist/{MSignaturePad-CxOtelzE.js → MSignaturePad-WuvE_Cyl.js} +2 -2
- package/dist/{MSignaturePad-CxOtelzE.js.map → MSignaturePad-WuvE_Cyl.js.map} +1 -1
- package/dist/MSlider-7TzhFHKS.js +745 -0
- package/dist/MSlider-7TzhFHKS.js.map +1 -0
- package/dist/{MSpinner-UCdtSOHP.js → MSpinner-CkIVBuGE.js} +2 -2
- package/dist/{MSpinner-UCdtSOHP.js.map → MSpinner-CkIVBuGE.js.map} +1 -1
- package/dist/{MTextField-CYk9yFvi.js → MTextField-B6_iOczK.js} +18 -18
- package/dist/MTextField-B6_iOczK.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-COBJ1tWr.js} +2 -2
- package/dist/{_useFieldValidation-B0B44M_t.js.map → _useFieldValidation-COBJ1tWr.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/MAvatarGroup.vue.d.ts +48 -0
- 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/MCommentThread.vue.d.ts +42 -0
- package/dist/components/MContainer.vue.d.ts +1 -1
- package/dist/components/MContainerTransform.vue.d.ts +1 -1
- package/dist/components/MContextMenu.vue.d.ts +7 -0
- 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/MDataTable.vue.d.ts +7 -0
- 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/MList.vue.d.ts +11 -0
- package/dist/components/MListDetail.vue.d.ts +22 -0
- package/dist/components/MListItem.vue.d.ts +9 -1
- package/dist/components/MMapMeasure.vue.d.ts +2 -2
- package/dist/components/MMenu.vue.d.ts +16 -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/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/MReactions.vue.d.ts +35 -0
- package/dist/components/MResourceTimeline.vue.d.ts +2 -2
- package/dist/components/MRichTextEditor.vue.d.ts +1 -1
- package/dist/components/MScaffold.vue.d.ts +45 -0
- package/dist/components/MScheme.vue.d.ts +1 -1
- package/dist/components/MScrollField.vue.d.ts +4 -1
- package/dist/components/MScrollable.vue.d.ts +5 -4
- 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 +3 -3
- package/dist/components/MStack.vue.d.ts +2 -2
- package/dist/components/MSubtitle.vue.d.ts +1 -1
- package/dist/components/MSupportingPane.vue.d.ts +22 -0
- package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
- package/dist/components/MSwitch.vue.d.ts +1 -1
- package/dist/components/MTable.vue.d.ts +7 -0
- 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/MVirtualList.vue.d.ts +51 -0
- package/dist/components/MVitalsChart.vue.d.ts +1 -1
- package/dist/components/MWindow.vue.d.ts +3 -3
- package/dist/components/_MComment.vue.d.ts +8 -0
- package/dist/components/_MCommentComposer.vue.d.ts +23 -0
- package/dist/components/_MDrawerItemList.vue.d.ts +8 -1
- package/dist/components/_commentThread.d.ts +41 -0
- package/dist/composables/_fieldLayout.d.ts +8 -8
- package/dist/composables/_menuGroups.d.ts +7 -0
- package/dist/composables/_popupPosition.d.ts +3 -2
- package/dist/composables/_rtl.d.ts +26 -0
- package/dist/composables/_usePaneResize.d.ts +45 -0
- package/dist/composables/useColorPalette.d.ts +1 -1
- package/dist/composables/useLocale.d.ts +26 -0
- package/dist/composables/useUndo.d.ts +45 -0
- package/dist/directives/vRipple.d.ts +4 -0
- package/dist/draw.js +5 -5
- package/dist/flow.js +2 -2
- package/dist/gantt.js +3 -3
- package/dist/index.d.ts +12 -0
- package/dist/locales/ar.d.ts +6 -0
- package/dist/locales/index.d.ts +1 -0
- package/dist/locales/index.js +896 -1
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +10862 -9655
- 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.js +9 -9
- package/dist/pdf.js +1 -1
- package/dist/plugin.d.ts +14 -0
- package/dist/rich-text-editor.js +79 -78
- package/dist/rich-text-editor.js.map +1 -1
- package/dist/styles/theme.css +56 -6
- 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-YRaOT12S.js} +19 -1
- package/dist/useLocale-YRaOT12S.js.map +1 -0
- package/dist/vTooltip-xESB2YOb.js +154 -0
- package/dist/vTooltip-xESB2YOb.js.map +1 -0
- package/package.json +1 -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 +3 -3
- package/src/__tests__/MListMultiSelect.test.ts +132 -0
- package/src/__tests__/MMenu.test.ts +152 -0
- package/src/__tests__/MProgressBar.test.ts +84 -1
- package/src/__tests__/MScheduler.test.ts +1 -1
- package/src/__tests__/MScrollField.test.ts +16 -0
- package/src/__tests__/MScrollable.test.ts +61 -5
- package/src/__tests__/MSwitch.test.ts +83 -0
- package/src/__tests__/MTrackingTimeline.test.ts +1 -1
- package/src/__tests__/MWindow.test.ts +16 -0
- package/src/__tests__/adaptiveLayouts.test.ts +167 -0
- package/src/__tests__/backlogComponents.test.ts +249 -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__/popupPosition.test.ts +4 -0
- package/src/__tests__/rtl.test.ts +167 -0
- package/src/__tests__/ssr.test.ts +6 -0
- package/src/__tests__/stateLayerOpacity.test.ts +65 -0
- package/src/__tests__/tableCheckboxReveal.test.ts +35 -0
- package/src/__tests__/vRipple.test.ts +62 -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/MAvatarGroup.vue +150 -0
- package/src/components/MBadge.vue +12 -3
- package/src/components/MBar.vue +1 -1
- package/src/components/MBottomAppBar.vue +1 -1
- package/src/components/MButton.vue +1 -1
- package/src/components/MButtonGroup.vue +1 -1
- package/src/components/MCalendar.vue +3 -3
- package/src/components/MCalendarHeatmap.vue +3 -3
- package/src/components/MCard.vue +4 -2
- package/src/components/MChatBubble.vue +3 -3
- package/src/components/MCheckbox.vue +13 -2
- package/src/components/MChip.vue +12 -9
- package/src/components/MCircleProgressBar.vue +69 -21
- package/src/components/MCodeEditor.vue +7 -3
- package/src/components/MColorPicker.vue +1 -1
- package/src/components/MCommandPalette.vue +1 -1
- package/src/components/MCommentThread.vue +131 -0
- package/src/components/MContainerTransform.vue +1 -1
- package/src/components/MContextMenu.vue +18 -31
- package/src/components/MDataTable.vue +21 -11
- 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 +7 -7
- package/src/components/MFormBuilder.vue +3 -3
- package/src/components/MIcon.vue +14 -2
- package/src/components/MIconButton.vue +2 -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/MList.vue +163 -5
- package/src/components/MListDetail.vue +102 -16
- package/src/components/MListGroup.vue +1 -1
- package/src/components/MListItem.vue +71 -11
- 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 +59 -45
- package/src/components/MMenuItem.vue +54 -18
- 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/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 +185 -52
- package/src/components/MRadio.vue +14 -2
- package/src/components/MReactions.vue +161 -0
- package/src/components/MRichTextEditor.vue +8 -4
- package/src/components/MScaffold.vue +213 -0
- package/src/components/MScheduler.vue +14 -14
- package/src/components/MScrollField.vue +15 -12
- package/src/components/MScrollable.vue +187 -46
- package/src/components/MSearchField.vue +1 -1
- package/src/components/MSeatMap.vue +2 -1
- package/src/components/MSegmentedButton.vue +4 -2
- 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/MSupportingPane.vue +102 -12
- package/src/components/MSwitch.vue +94 -11
- package/src/components/MTable.vue +20 -7
- 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 +2 -2
- package/src/components/MTimeline.vue +12 -12
- package/src/components/MToggleButton.vue +2 -2
- 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/MVirtualList.vue +222 -0
- package/src/components/MVirtualTable.vue +2 -2
- package/src/components/MWindow.vue +4 -3
- package/src/components/_MColorPanel.vue +5 -4
- package/src/components/_MComment.vue +142 -0
- package/src/components/_MCommentComposer.vue +68 -0
- 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/components/_commentThread.ts +46 -0
- package/src/composables/_fieldLayout.ts +19 -19
- package/src/composables/_menuGroups.ts +31 -0
- package/src/composables/_popupPosition.ts +5 -3
- package/src/composables/_rtl.ts +76 -0
- package/src/composables/_useMenuNav.ts +24 -17
- package/src/composables/_usePaneResize.ts +271 -0
- package/src/composables/_useSheetMotion.ts +10 -3
- package/src/composables/useLocale.ts +44 -0
- package/src/composables/useUndo.ts +170 -0
- package/src/directives/vRipple.ts +18 -5
- package/src/index.ts +12 -0
- package/src/locales/ar.ts +814 -0
- package/src/locales/de.ts +18 -0
- package/src/locales/es.ts +18 -0
- package/src/locales/fr.ts +18 -0
- package/src/locales/index.ts +1 -0
- package/src/locales/ja.ts +18 -0
- package/src/locales/ko.ts +18 -0
- package/src/locales/pt.ts +18 -0
- package/src/locales/zh.ts +18 -0
- package/src/plugin.ts +17 -0
- package/src/styles/theme.css +56 -6
- package/dist/MButton-B6eZTfFV.js.map +0 -1
- package/dist/MColorPickerModal-Dajjf6tH.js.map +0 -1
- package/dist/MIcon-DpajuUTJ.js +0 -33
- package/dist/MIcon-DpajuUTJ.js.map +0 -1
- package/dist/MIconButton-BBggVwBV.js.map +0 -1
- package/dist/MListItem-DiOAxaN7.js +0 -991
- 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/MProgressBar-BWly1UKN.js +0 -179
- package/dist/MProgressBar-BWly1UKN.js.map +0 -1
- package/dist/MSegmentedButton-BXzRsg1S.js +0 -105
- package/dist/MSegmentedButton-BXzRsg1S.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/useLocale-DL96OFgr.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { t as e } from "./MButton-
|
|
2
|
-
import { t } from "./MDialog-
|
|
3
|
-
import { t as n } from "./MIcon-
|
|
4
|
-
import { t as r } from "./
|
|
5
|
-
import { i } from "./
|
|
6
|
-
import { i as a
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { t as e } from "./MButton-B9RCM06i.js";
|
|
2
|
+
import { t } from "./MDialog-dk07tify.js";
|
|
3
|
+
import { t as n } from "./MIcon-BSsJZhK7.js";
|
|
4
|
+
import { t as r } from "./vTooltip-xESB2YOb.js";
|
|
5
|
+
import { t as i } from "./MIconButton-CrBPZidd.js";
|
|
6
|
+
import { i as a } from "./useLocale-YRaOT12S.js";
|
|
7
|
+
import { i as o, o as s } from "./_storageKeys-C4W_4xK4.js";
|
|
8
|
+
import { t as c } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
9
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as y, onMounted as ee, openBlock as b, ref as x, renderList as S, toDisplayString as C, unref as w, watch as te, withCtx as T, withDirectives as ne, withKeys as re } from "vue";
|
|
9
10
|
// src/composables/_colorUtils.ts
|
|
10
11
|
function E(e) {
|
|
11
12
|
let t = e.trim().replace(/^#/, "");
|
|
@@ -27,7 +28,7 @@ function O(e) {
|
|
|
27
28
|
let t = E(e);
|
|
28
29
|
return t ? D(t) : "";
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function ie({ r: e, g: t, b: n }) {
|
|
31
32
|
e /= 255, t /= 255, n /= 255;
|
|
32
33
|
let r = Math.max(e, t, n), i = r - Math.min(e, t, n), a = 0;
|
|
33
34
|
return i !== 0 && (a = r === e ? ((t - n) / i + 6) % 6 : r === t ? (n - e) / i + 2 : (e - t) / i + 4, a *= 60), {
|
|
@@ -49,7 +50,7 @@ function k({ h: e, s: t, v: n }, r = 1) {
|
|
|
49
50
|
a: r
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
function
|
|
53
|
+
function ae({ h: e, s: t, v: n }) {
|
|
53
54
|
t /= 100, n /= 100;
|
|
54
55
|
let r = n * (1 - t / 2);
|
|
55
56
|
return {
|
|
@@ -58,7 +59,7 @@ function re({ h: e, s: t, v: n }) {
|
|
|
58
59
|
l: r * 100
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
+
function oe({ h: e, s: t, l: n }) {
|
|
62
63
|
t /= 100, n /= 100;
|
|
63
64
|
let r = n + t * Math.min(n, 1 - n);
|
|
64
65
|
return {
|
|
@@ -76,14 +77,14 @@ function A(e) {
|
|
|
76
77
|
var j = "m3-color-recent";
|
|
77
78
|
function M() {
|
|
78
79
|
try {
|
|
79
|
-
let e = JSON.parse(localStorage.getItem(
|
|
80
|
+
let e = JSON.parse(localStorage.getItem(s(j)) ?? "[]");
|
|
80
81
|
return Array.isArray(e) ? e.filter((e) => typeof e == "string" && !!E(e)) : [];
|
|
81
82
|
} catch {
|
|
82
83
|
return [];
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
|
-
var N =
|
|
86
|
-
|
|
86
|
+
var N = x(M());
|
|
87
|
+
o(() => {
|
|
87
88
|
N.value = M();
|
|
88
89
|
});
|
|
89
90
|
function P(e, t) {
|
|
@@ -91,7 +92,7 @@ function P(e, t) {
|
|
|
91
92
|
if (n) {
|
|
92
93
|
N.value = [n, ...N.value.filter((e) => e !== n)].slice(0, Math.max(t, 0));
|
|
93
94
|
try {
|
|
94
|
-
localStorage.setItem(
|
|
95
|
+
localStorage.setItem(s(j), JSON.stringify(N.value));
|
|
95
96
|
} catch {}
|
|
96
97
|
}
|
|
97
98
|
}
|
|
@@ -117,27 +118,27 @@ var F = [
|
|
|
117
118
|
"#9e9e9e",
|
|
118
119
|
"#000000",
|
|
119
120
|
"#ffffff"
|
|
120
|
-
],
|
|
121
|
+
], se = { class: "flex flex-col gap-4" }, ce = [
|
|
121
122
|
"aria-label",
|
|
122
123
|
"aria-valuenow",
|
|
123
124
|
"aria-valuetext"
|
|
124
|
-
],
|
|
125
|
+
], le = { class: "flex flex-col gap-1" }, ue = ["aria-label", "aria-valuenow"], de = [
|
|
125
126
|
"aria-label",
|
|
126
127
|
"aria-valuenow",
|
|
127
128
|
"aria-valuetext"
|
|
128
|
-
],
|
|
129
|
+
], fe = { class: "flex items-center gap-2" }, pe = { class: "flex h-10 min-w-0 flex-1" }, me = ["aria-label"], he = { class: "flex items-start gap-2" }, ge = ["aria-label"], _e = ["maxlength", "value"], ve = [
|
|
129
130
|
"aria-label",
|
|
130
131
|
"value",
|
|
131
132
|
"onInput",
|
|
132
133
|
"onKeydown"
|
|
133
|
-
],
|
|
134
|
+
], ye = { class: "text-label-small text-on-surface-variant" }, be = ["aria-label"], xe = {
|
|
134
135
|
key: 0,
|
|
135
136
|
class: "text-label-medium text-on-surface-variant"
|
|
136
|
-
},
|
|
137
|
+
}, Se = { class: "grid grid-cols-7 gap-2" }, Ce = [
|
|
137
138
|
"aria-label",
|
|
138
139
|
"aria-pressed",
|
|
139
140
|
"onClick"
|
|
140
|
-
], I = 12,
|
|
141
|
+
], I = 12, we = "repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 8px 8px", L = /*#__PURE__*/ c(/* @__PURE__ */ _({
|
|
141
142
|
__name: "_MColorPanel",
|
|
142
143
|
props: {
|
|
143
144
|
modelValue: {},
|
|
@@ -148,82 +149,82 @@ var F = [
|
|
|
148
149
|
original: {}
|
|
149
150
|
},
|
|
150
151
|
emits: ["update:modelValue"],
|
|
151
|
-
setup(e, { expose: t, emit:
|
|
152
|
-
let
|
|
152
|
+
setup(e, { expose: t, emit: o }) {
|
|
153
|
+
let s = e, c = o, _ = a(), T = x(0), j = x(100), M = x(100), P = x(1), F = u(() => D(k({
|
|
153
154
|
h: T.value,
|
|
154
155
|
s: j.value,
|
|
155
156
|
v: M.value
|
|
156
|
-
},
|
|
157
|
+
}, s.alpha ? P.value : 1))), L = u(() => D(k({
|
|
157
158
|
h: T.value,
|
|
158
159
|
s: j.value,
|
|
159
160
|
v: M.value
|
|
160
|
-
}))),
|
|
161
|
-
function
|
|
162
|
-
let t =
|
|
163
|
-
t.v > 0 && t.s > 0 && (T.value = t.h), t.v > 0 && (j.value = t.s), M.value = t.v, P.value =
|
|
161
|
+
}))), Te = u(() => `hsl(${T.value}, 100%, 50%)`);
|
|
162
|
+
function R(e) {
|
|
163
|
+
let t = ie(e);
|
|
164
|
+
t.v > 0 && t.s > 0 && (T.value = t.h), t.v > 0 && (j.value = t.s), M.value = t.v, P.value = s.alpha ? e.a : 1;
|
|
164
165
|
}
|
|
165
|
-
let
|
|
166
|
-
function
|
|
167
|
-
|
|
166
|
+
let z = "";
|
|
167
|
+
function B() {
|
|
168
|
+
z = F.value, F.value !== O(s.modelValue) && c("update:modelValue", F.value);
|
|
168
169
|
}
|
|
169
|
-
|
|
170
|
+
te(() => s.modelValue, (e) => {
|
|
170
171
|
let t = O(e);
|
|
171
|
-
t && t !==
|
|
172
|
+
t && t !== z && (R(E(t)), z = t);
|
|
172
173
|
}, { immediate: !0 });
|
|
173
|
-
function
|
|
174
|
+
function Ee(e) {
|
|
174
175
|
let t = E(e);
|
|
175
|
-
t && (
|
|
176
|
+
t && (R(t), B());
|
|
176
177
|
}
|
|
177
|
-
let
|
|
178
|
-
function
|
|
179
|
-
let n = e === "area" ?
|
|
178
|
+
let V = x(), De = x(), Oe = x(), H = x(null), U = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
179
|
+
function ke(e, t) {
|
|
180
|
+
let n = e === "area" ? V.value : e === "hue" ? De.value : Oe.value;
|
|
180
181
|
if (!n) return;
|
|
181
182
|
let r = n.getBoundingClientRect();
|
|
182
|
-
if (e === "area") j.value =
|
|
183
|
+
if (e === "area") j.value = U((t.clientX - r.left) / r.width * 100, 0, 100), M.value = U((1 - (t.clientY - r.top) / r.height) * 100, 0, 100);
|
|
183
184
|
else {
|
|
184
|
-
let n =
|
|
185
|
+
let n = U((t.clientX - r.left - I) / (r.width - 24), 0, 1);
|
|
185
186
|
e === "hue" ? T.value = n * 360 : P.value = Math.round(n * 100) / 100;
|
|
186
187
|
}
|
|
187
|
-
|
|
188
|
+
B();
|
|
188
189
|
}
|
|
189
|
-
function
|
|
190
|
-
t.button === 0 && (t.preventDefault(), t.currentTarget.focus({ preventScroll: !0 }), t.currentTarget.setPointerCapture?.(t.pointerId),
|
|
190
|
+
function W(e, t) {
|
|
191
|
+
t.button === 0 && (t.preventDefault(), t.currentTarget.focus({ preventScroll: !0 }), t.currentTarget.setPointerCapture?.(t.pointerId), H.value = e, ke(e, t));
|
|
191
192
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
193
|
+
function G(e, t) {
|
|
194
|
+
H.value === e && ke(e, t);
|
|
194
195
|
}
|
|
195
|
-
function
|
|
196
|
-
|
|
196
|
+
function K() {
|
|
197
|
+
H.value = null;
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
+
function q(e, t) {
|
|
199
200
|
let n = t.shiftKey ? 10 : 1, r = t.key === "ArrowRight" ? n : t.key === "ArrowLeft" ? -n : 0, i = t.key === "ArrowUp" ? n : t.key === "ArrowDown" ? -n : 0;
|
|
200
201
|
if (e === "area") {
|
|
201
202
|
if (!r && !i) return;
|
|
202
|
-
j.value =
|
|
203
|
+
j.value = U(j.value + r, 0, 100), M.value = U(M.value + i, 0, 100);
|
|
203
204
|
} else {
|
|
204
205
|
let n = e === "hue" ? 360 : 100, a = e === "hue" ? T.value : P.value * 100, o;
|
|
205
206
|
if (t.key === "Home") o = 0;
|
|
206
207
|
else if (t.key === "End") o = n;
|
|
207
|
-
else if (r || i) o =
|
|
208
|
+
else if (r || i) o = U(a + (r || i), 0, n);
|
|
208
209
|
else return;
|
|
209
210
|
e === "hue" ? T.value = o : P.value = Math.round(o) / 100;
|
|
210
211
|
}
|
|
211
|
-
t.preventDefault(),
|
|
212
|
+
t.preventDefault(), B();
|
|
212
213
|
}
|
|
213
|
-
let
|
|
214
|
+
let Ae = x(!1);
|
|
214
215
|
ee(() => {
|
|
215
|
-
|
|
216
|
+
Ae.value = "EyeDropper" in window;
|
|
216
217
|
});
|
|
217
|
-
async function
|
|
218
|
+
async function je() {
|
|
218
219
|
try {
|
|
219
220
|
let e = window.EyeDropper, { sRGBHex: t } = await new e().open(), n = E(t);
|
|
220
|
-
n && (
|
|
221
|
+
n && (R({
|
|
221
222
|
...n,
|
|
222
223
|
a: P.value
|
|
223
|
-
}),
|
|
224
|
+
}), B());
|
|
224
225
|
} catch {}
|
|
225
226
|
}
|
|
226
|
-
let
|
|
227
|
+
let J = [
|
|
227
228
|
{
|
|
228
229
|
id: "hex",
|
|
229
230
|
label: "HEX"
|
|
@@ -236,14 +237,14 @@ var F = [
|
|
|
236
237
|
id: "hsl",
|
|
237
238
|
label: "HSL"
|
|
238
239
|
}
|
|
239
|
-
],
|
|
240
|
-
function
|
|
241
|
-
|
|
240
|
+
], Y = x("hex"), Me = u(() => J.find((e) => e.id === Y.value).label);
|
|
241
|
+
function Ne() {
|
|
242
|
+
Y.value = J[(J.findIndex((e) => e.id === Y.value) + 1) % J.length].id, X.value = null;
|
|
242
243
|
}
|
|
243
|
-
function
|
|
244
|
+
function Pe(e) {
|
|
244
245
|
T.value = e.h, j.value = e.s, M.value = e.v;
|
|
245
246
|
}
|
|
246
|
-
let
|
|
247
|
+
let Fe = u(() => ({
|
|
247
248
|
key: "a",
|
|
248
249
|
label: "A",
|
|
249
250
|
display: String(Math.round(P.value * 100)),
|
|
@@ -251,9 +252,9 @@ var F = [
|
|
|
251
252
|
apply: (e) => {
|
|
252
253
|
P.value = e / 100;
|
|
253
254
|
}
|
|
254
|
-
})),
|
|
255
|
+
})), Ie = u(() => {
|
|
255
256
|
let e = [];
|
|
256
|
-
if (
|
|
257
|
+
if (Y.value === "rgb") {
|
|
257
258
|
let t = k({
|
|
258
259
|
h: T.value,
|
|
259
260
|
s: j.value,
|
|
@@ -273,13 +274,13 @@ var F = [
|
|
|
273
274
|
label: t.toUpperCase(),
|
|
274
275
|
display: String(n[t]),
|
|
275
276
|
max: 255,
|
|
276
|
-
apply: (e) =>
|
|
277
|
+
apply: (e) => R({
|
|
277
278
|
...n,
|
|
278
279
|
[t]: e
|
|
279
280
|
})
|
|
280
281
|
});
|
|
281
|
-
} else if (
|
|
282
|
-
let t =
|
|
282
|
+
} else if (Y.value === "hsl") {
|
|
283
|
+
let t = ae({
|
|
283
284
|
h: T.value,
|
|
284
285
|
s: j.value,
|
|
285
286
|
v: M.value
|
|
@@ -297,205 +298,204 @@ var F = [
|
|
|
297
298
|
label: t.toUpperCase(),
|
|
298
299
|
display: String(n[t]),
|
|
299
300
|
max: t === "h" ? 360 : 100,
|
|
300
|
-
apply: (e) =>
|
|
301
|
+
apply: (e) => Pe(oe({
|
|
301
302
|
...n,
|
|
302
303
|
[t]: e
|
|
303
304
|
}))
|
|
304
305
|
});
|
|
305
306
|
}
|
|
306
|
-
return
|
|
307
|
-
}),
|
|
308
|
-
function
|
|
307
|
+
return s.alpha && Y.value !== "hex" && e.push(Fe.value), e;
|
|
308
|
+
}), X = x(null), Z = (e, t) => X.value?.key === e ? X.value.text : t;
|
|
309
|
+
function Le(e) {
|
|
309
310
|
let t = e.target.value;
|
|
310
|
-
|
|
311
|
+
X.value = {
|
|
311
312
|
key: "hex",
|
|
312
313
|
text: t
|
|
313
314
|
};
|
|
314
315
|
let n = E(t);
|
|
315
|
-
n && (
|
|
316
|
+
n && (R(n), B());
|
|
316
317
|
}
|
|
317
|
-
function
|
|
318
|
+
function Re(e, t) {
|
|
318
319
|
let n = t.target.value;
|
|
319
|
-
if (
|
|
320
|
+
if (X.value = {
|
|
320
321
|
key: e.key,
|
|
321
322
|
text: n
|
|
322
323
|
}, !/^\d+$/.test(n.trim())) return;
|
|
323
324
|
let r = Number(n);
|
|
324
|
-
r > e.max || (e.apply(r),
|
|
325
|
+
r > e.max || (e.apply(r), B());
|
|
325
326
|
}
|
|
326
|
-
function
|
|
327
|
+
function ze(e, t) {
|
|
327
328
|
if (t.key === "Enter") {
|
|
328
|
-
|
|
329
|
+
X.value = null;
|
|
329
330
|
return;
|
|
330
331
|
}
|
|
331
332
|
if (t.key !== "ArrowUp" && t.key !== "ArrowDown") return;
|
|
332
333
|
t.preventDefault();
|
|
333
334
|
let n = (t.shiftKey ? 10 : 1) * (t.key === "ArrowUp" ? 1 : -1);
|
|
334
|
-
e.apply(
|
|
335
|
+
e.apply(U(Number(e.display) + n, 0, e.max)), X.value = null, B();
|
|
335
336
|
}
|
|
336
|
-
let
|
|
337
|
-
return t({ focus: () =>
|
|
338
|
-
|
|
337
|
+
let Be = u(() => s.recent ? N.value : []), Q = (e) => O(e) === F.value, $ = (e) => `linear-gradient(${e}, ${e}), ${we}`, Ve = u(() => P.value < .5 ? "#000000" : A(L.value)), He = u(() => !!s.original && !!O(s.original) && O(s.original) !== F.value);
|
|
338
|
+
return t({ focus: () => V.value?.focus({ preventScroll: !0 }) }), (t, a) => (b(), p("div", se, [
|
|
339
|
+
m("div", {
|
|
339
340
|
ref_key: "areaEl",
|
|
340
|
-
ref:
|
|
341
|
+
ref: V,
|
|
341
342
|
role: "slider",
|
|
342
343
|
tabindex: "0",
|
|
343
|
-
"aria-label": `${
|
|
344
|
+
"aria-label": `${w(_).colorSaturation}, ${w(_).colorBrightness}`,
|
|
344
345
|
"aria-valuenow": Math.round(j.value),
|
|
345
346
|
"aria-valuemin": "0",
|
|
346
347
|
"aria-valuemax": "100",
|
|
347
|
-
"aria-valuetext": `${
|
|
348
|
+
"aria-valuetext": `${w(_).colorSaturation} ${Math.round(j.value)}%, ${w(_).colorBrightness} ${Math.round(M.value)}%`,
|
|
348
349
|
class: "relative h-40 w-full shrink-0 cursor-crosshair touch-none rounded-md outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
349
|
-
style:
|
|
350
|
-
onPointerdown:
|
|
351
|
-
onPointermove:
|
|
352
|
-
onPointerup:
|
|
353
|
-
onPointercancel:
|
|
354
|
-
onKeydown:
|
|
355
|
-
}, [
|
|
356
|
-
class:
|
|
357
|
-
style:
|
|
350
|
+
style: y({ background: `linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, ${Te.value})` }),
|
|
351
|
+
onPointerdown: a[0] ||= (e) => W("area", e),
|
|
352
|
+
onPointermove: a[1] ||= (e) => G("area", e),
|
|
353
|
+
onPointerup: K,
|
|
354
|
+
onPointercancel: K,
|
|
355
|
+
onKeydown: a[2] ||= (e) => q("area", e)
|
|
356
|
+
}, [m("span", {
|
|
357
|
+
class: v(["m3-cp-area-thumb pointer-events-none absolute size-5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white transition-[scale] duration-150", H.value === "area" ? "scale-125" : ""]),
|
|
358
|
+
style: y({
|
|
358
359
|
left: `${j.value}%`,
|
|
359
360
|
top: `${100 - M.value}%`,
|
|
360
|
-
backgroundColor:
|
|
361
|
+
backgroundColor: L.value
|
|
361
362
|
})
|
|
362
|
-
}, null, 6)], 44,
|
|
363
|
-
|
|
363
|
+
}, null, 6)], 44, ce),
|
|
364
|
+
m("div", le, [m("div", {
|
|
364
365
|
ref_key: "hueEl",
|
|
365
|
-
ref:
|
|
366
|
+
ref: De,
|
|
366
367
|
role: "slider",
|
|
367
368
|
tabindex: "0",
|
|
368
|
-
"aria-label":
|
|
369
|
+
"aria-label": w(_).colorHue,
|
|
369
370
|
"aria-valuenow": Math.round(T.value),
|
|
370
371
|
"aria-valuemin": "0",
|
|
371
372
|
"aria-valuemax": "360",
|
|
372
373
|
class: "m3-cp-slider group",
|
|
373
|
-
onPointerdown:
|
|
374
|
-
onPointermove:
|
|
375
|
-
onPointerup:
|
|
376
|
-
onPointercancel:
|
|
377
|
-
onKeydown:
|
|
378
|
-
}, [
|
|
379
|
-
class:
|
|
380
|
-
style:
|
|
381
|
-
}, null, 6)], 40,
|
|
374
|
+
onPointerdown: a[3] ||= (e) => W("hue", e),
|
|
375
|
+
onPointermove: a[4] ||= (e) => G("hue", e),
|
|
376
|
+
onPointerup: K,
|
|
377
|
+
onPointercancel: K,
|
|
378
|
+
onKeydown: a[5] ||= (e) => q("hue", e)
|
|
379
|
+
}, [a[13] ||= m("span", { class: "m3-cp-track m3-cp-hue" }, null, -1), m("span", {
|
|
380
|
+
class: v(["m3-cp-handle", { "m3-cp-handle-pressed": H.value === "hue" }]),
|
|
381
|
+
style: y({ left: `calc(${I}px + ${T.value / 360} * (100% - 24px))` })
|
|
382
|
+
}, null, 6)], 40, ue), e.alpha ? (b(), p("div", {
|
|
382
383
|
key: 0,
|
|
383
384
|
ref_key: "alphaEl",
|
|
384
|
-
ref:
|
|
385
|
+
ref: Oe,
|
|
385
386
|
role: "slider",
|
|
386
387
|
tabindex: "0",
|
|
387
|
-
"aria-label":
|
|
388
|
+
"aria-label": w(_).colorAlpha,
|
|
388
389
|
"aria-valuenow": Math.round(P.value * 100),
|
|
389
390
|
"aria-valuemin": "0",
|
|
390
391
|
"aria-valuemax": "100",
|
|
391
392
|
"aria-valuetext": `${Math.round(P.value * 100)}%`,
|
|
392
393
|
class: "m3-cp-slider group",
|
|
393
|
-
onPointerdown:
|
|
394
|
-
onPointermove:
|
|
395
|
-
onPointerup:
|
|
396
|
-
onPointercancel:
|
|
397
|
-
onKeydown:
|
|
398
|
-
}, [
|
|
394
|
+
onPointerdown: a[6] ||= (e) => W("alpha", e),
|
|
395
|
+
onPointermove: a[7] ||= (e) => G("alpha", e),
|
|
396
|
+
onPointerup: K,
|
|
397
|
+
onPointercancel: K,
|
|
398
|
+
onKeydown: a[8] ||= (e) => q("alpha", e)
|
|
399
|
+
}, [m("span", {
|
|
399
400
|
class: "m3-cp-track",
|
|
400
|
-
style:
|
|
401
|
-
}, null, 4),
|
|
402
|
-
class:
|
|
403
|
-
style:
|
|
404
|
-
}, null, 6)], 40,
|
|
405
|
-
|
|
401
|
+
style: y({ background: `linear-gradient(to right, transparent, ${L.value}), ${we}` })
|
|
402
|
+
}, null, 4), m("span", {
|
|
403
|
+
class: v(["m3-cp-handle", { "m3-cp-handle-pressed": H.value === "alpha" }]),
|
|
404
|
+
style: y({ left: `calc(${I}px + ${P.value} * (100% - 24px))` })
|
|
405
|
+
}, null, 6)], 40, de)) : f("", !0)]),
|
|
406
|
+
m("div", fe, [m("div", pe, [He.value ? ne((b(), p("button", {
|
|
406
407
|
key: 0,
|
|
407
408
|
type: "button",
|
|
408
|
-
class: "m3-cp-swatch flex w-12 shrink-0 cursor-pointer items-center justify-center rounded-
|
|
409
|
-
style:
|
|
410
|
-
"aria-label":
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}, [h(n, {
|
|
409
|
+
class: "m3-cp-swatch flex w-12 shrink-0 cursor-pointer items-center justify-center rounded-s-full outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
410
|
+
style: y({ background: $(e.original) }),
|
|
411
|
+
"aria-label": w(_).colorOriginal,
|
|
412
|
+
onClick: a[9] ||= (t) => Ee(e.original)
|
|
413
|
+
}, [g(n, {
|
|
414
414
|
name: "undo",
|
|
415
415
|
size: 18,
|
|
416
|
-
style:
|
|
417
|
-
}, null, 8, ["style"])], 12,
|
|
418
|
-
class:
|
|
419
|
-
style:
|
|
416
|
+
style: y({ color: w(A)(e.original) })
|
|
417
|
+
}, null, 8, ["style"])], 12, me)), [[w(r), w(_).colorOriginal]]) : f("", !0), m("span", {
|
|
418
|
+
class: v(["m3-cp-swatch flex min-w-0 flex-1 items-center px-4 font-mono text-label-large transition-[border-radius] duration-200", He.value ? "rounded-e-full" : "rounded-full"]),
|
|
419
|
+
style: y({
|
|
420
420
|
background: $(F.value),
|
|
421
|
-
color:
|
|
421
|
+
color: Ve.value
|
|
422
422
|
})
|
|
423
|
-
},
|
|
423
|
+
}, C(F.value), 7)]), e.eyedropper && Ae.value ? (b(), d(i, {
|
|
424
424
|
key: 0,
|
|
425
425
|
icon: "colorize",
|
|
426
426
|
variant: "tonal",
|
|
427
|
-
label:
|
|
428
|
-
onClick:
|
|
429
|
-
}, null, 8, ["label"])) :
|
|
430
|
-
|
|
431
|
-
|
|
427
|
+
label: w(_).colorEyedropper,
|
|
428
|
+
onClick: je
|
|
429
|
+
}, null, 8, ["label"])) : f("", !0)]),
|
|
430
|
+
m("div", he, [
|
|
431
|
+
m("button", {
|
|
432
432
|
type: "button",
|
|
433
|
-
class: "flex h-10 shrink-0 cursor-pointer items-center gap-0.5 rounded-full bg-secondary-container
|
|
434
|
-
"aria-label": `${
|
|
435
|
-
onClick:
|
|
436
|
-
}, [
|
|
433
|
+
class: "flex h-10 shrink-0 cursor-pointer items-center gap-0.5 rounded-full bg-secondary-container pe-2 ps-3 text-label-large text-on-secondary-container outline-none transition-[background-color] duration-150 hover:bg-[color-mix(in_srgb,var(--color-secondary-container),var(--color-on-secondary-container)_8%)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
434
|
+
"aria-label": `${w(_).colorFormat}: ${Me.value}`,
|
|
435
|
+
onClick: Ne
|
|
436
|
+
}, [h(C(Me.value) + " ", 1), g(n, {
|
|
437
437
|
name: "unfold_more",
|
|
438
438
|
size: 18
|
|
439
|
-
})], 8,
|
|
440
|
-
|
|
439
|
+
})], 8, ge),
|
|
440
|
+
Y.value === "hex" ? (b(), p("input", {
|
|
441
441
|
key: 0,
|
|
442
442
|
type: "text",
|
|
443
443
|
spellcheck: "false",
|
|
444
444
|
autocomplete: "off",
|
|
445
445
|
maxlength: e.alpha ? 9 : 7,
|
|
446
446
|
"aria-label": "HEX",
|
|
447
|
-
value:
|
|
447
|
+
value: Z("hex", F.value),
|
|
448
448
|
class: "m3-cp-field min-w-0 flex-1 font-mono text-body-medium",
|
|
449
|
-
onInput:
|
|
450
|
-
onBlur:
|
|
451
|
-
onKeydown:
|
|
452
|
-
}, null, 40,
|
|
453
|
-
(
|
|
449
|
+
onInput: Le,
|
|
450
|
+
onBlur: a[10] ||= (e) => X.value = null,
|
|
451
|
+
onKeydown: a[11] ||= re((e) => X.value = null, ["enter"])
|
|
452
|
+
}, null, 40, _e)) : f("", !0),
|
|
453
|
+
(b(!0), p(l, null, S(Ie.value, (e) => (b(), p("label", {
|
|
454
454
|
key: e.key,
|
|
455
455
|
class: "flex min-w-0 flex-1 flex-col items-center gap-1"
|
|
456
|
-
}, [
|
|
456
|
+
}, [m("input", {
|
|
457
457
|
type: "text",
|
|
458
458
|
inputmode: "numeric",
|
|
459
459
|
autocomplete: "off",
|
|
460
460
|
maxlength: 3,
|
|
461
461
|
"aria-label": e.label,
|
|
462
|
-
value:
|
|
462
|
+
value: Z(e.key, e.display),
|
|
463
463
|
class: "m3-cp-field w-full font-mono text-body-medium",
|
|
464
|
-
onInput: (t) =>
|
|
465
|
-
onKeydown: (t) =>
|
|
466
|
-
onBlur:
|
|
467
|
-
}, null, 40,
|
|
464
|
+
onInput: (t) => Re(e, t),
|
|
465
|
+
onKeydown: (t) => ze(e, t),
|
|
466
|
+
onBlur: a[12] ||= (e) => X.value = null
|
|
467
|
+
}, null, 40, ve), m("span", ye, C(e.label), 1)]))), 128))
|
|
468
468
|
]),
|
|
469
|
-
(
|
|
469
|
+
(b(!0), p(l, null, S([{
|
|
470
470
|
id: "recent",
|
|
471
|
-
label:
|
|
472
|
-
colors:
|
|
471
|
+
label: w(_).colorRecent,
|
|
472
|
+
colors: Be.value
|
|
473
473
|
}, {
|
|
474
474
|
id: "presets",
|
|
475
|
-
label:
|
|
475
|
+
label: w(_).colorPresets,
|
|
476
476
|
colors: e.presets
|
|
477
|
-
}], (e) => (
|
|
477
|
+
}], (e) => (b(), p(l, { key: e.id }, [e.colors.length ? (b(), p("div", {
|
|
478
478
|
key: 0,
|
|
479
479
|
role: "group",
|
|
480
480
|
"aria-label": e.label,
|
|
481
481
|
class: "flex flex-col gap-2"
|
|
482
|
-
}, [
|
|
482
|
+
}, [Be.value.length ? (b(), p("span", xe, C(e.label), 1)) : f("", !0), m("div", Se, [(b(!0), p(l, null, S(e.colors, (e) => (b(), p("button", {
|
|
483
483
|
key: e,
|
|
484
484
|
type: "button",
|
|
485
|
-
class:
|
|
486
|
-
style:
|
|
485
|
+
class: v(["m3-cp-swatch m3-cp-morph flex aspect-square cursor-pointer items-center justify-center outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary", { "m3-cp-morph-selected": Q(e) }]),
|
|
486
|
+
style: y({ background: $(e) }),
|
|
487
487
|
"aria-label": e,
|
|
488
488
|
"aria-pressed": Q(e),
|
|
489
|
-
onClick: (t) =>
|
|
490
|
-
}, [Q(e) ? (
|
|
489
|
+
onClick: (t) => Ee(e)
|
|
490
|
+
}, [Q(e) ? (b(), d(n, {
|
|
491
491
|
key: 0,
|
|
492
492
|
name: "check",
|
|
493
493
|
size: 18,
|
|
494
|
-
style:
|
|
495
|
-
}, null, 8, ["style"])) :
|
|
494
|
+
style: y({ color: w(A)(e) })
|
|
495
|
+
}, null, 8, ["style"])) : f("", !0)], 14, Ce))), 128))])], 8, be)) : f("", !0)], 64))), 128))
|
|
496
496
|
]));
|
|
497
497
|
}
|
|
498
|
-
}), [["__scopeId", "data-v-
|
|
498
|
+
}), [["__scopeId", "data-v-59fe716a"]]), Te = /* @__PURE__ */ _({
|
|
499
499
|
__name: "MColorPickerModal",
|
|
500
500
|
props: {
|
|
501
501
|
modelValue: {},
|
|
@@ -521,38 +521,38 @@ var F = [
|
|
|
521
521
|
},
|
|
522
522
|
emits: ["update:modelValue", "update:show"],
|
|
523
523
|
setup(n, { emit: r }) {
|
|
524
|
-
let
|
|
525
|
-
|
|
526
|
-
e && (c.value =
|
|
524
|
+
let i = n, o = a(), s = r, c = x(i.modelValue);
|
|
525
|
+
te(() => i.show, (e) => {
|
|
526
|
+
e && (c.value = i.modelValue);
|
|
527
527
|
}, { immediate: !0 });
|
|
528
528
|
function l() {
|
|
529
529
|
s("update:show", !1);
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function u() {
|
|
532
532
|
let e = O(c.value) || c.value;
|
|
533
|
-
|
|
533
|
+
i.recent && P(e, i.recentLimit), s("update:modelValue", e), s("update:show", !1);
|
|
534
534
|
}
|
|
535
|
-
return (r, i) => (
|
|
535
|
+
return (r, i) => (b(), d(t, {
|
|
536
536
|
"model-value": n.show,
|
|
537
|
-
title: n.title ||
|
|
537
|
+
title: n.title || w(o).selectColor,
|
|
538
538
|
"max-width": "328px",
|
|
539
539
|
closable: !1,
|
|
540
540
|
"onUpdate:modelValue": i[1] ||= (e) => !e && l()
|
|
541
541
|
}, {
|
|
542
|
-
actions: T(() => [
|
|
542
|
+
actions: T(() => [g(e, {
|
|
543
543
|
variant: "text",
|
|
544
544
|
onClick: l
|
|
545
545
|
}, {
|
|
546
|
-
default: T(() => [
|
|
546
|
+
default: T(() => [h(C(w(o).cancel), 1)]),
|
|
547
547
|
_: 1
|
|
548
|
-
}),
|
|
548
|
+
}), g(e, {
|
|
549
549
|
variant: "text",
|
|
550
|
-
onClick:
|
|
550
|
+
onClick: u
|
|
551
551
|
}, {
|
|
552
|
-
default: T(() => [
|
|
552
|
+
default: T(() => [h(C(w(o).confirm), 1)]),
|
|
553
553
|
_: 1
|
|
554
554
|
})]),
|
|
555
|
-
default: T(() => [
|
|
555
|
+
default: T(() => [g(L, {
|
|
556
556
|
modelValue: c.value,
|
|
557
557
|
"onUpdate:modelValue": i[0] ||= (e) => c.value = e,
|
|
558
558
|
presets: n.presets,
|
|
@@ -572,6 +572,6 @@ var F = [
|
|
|
572
572
|
}, 8, ["model-value", "title"]));
|
|
573
573
|
}
|
|
574
574
|
});
|
|
575
|
-
export { P as a, O as i,
|
|
575
|
+
export { P as a, O as i, L as n, F as r, Te as t };
|
|
576
576
|
|
|
577
|
-
//# sourceMappingURL=MColorPickerModal-
|
|
577
|
+
//# sourceMappingURL=MColorPickerModal-ChRtcZOo.js.map
|