@leavepulse/ui 0.44.0 → 0.45.1
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 +49 -3
- package/dist/assets/{LpCommandPalette-DCP5g2ik.css → LpCommandPalette-HzAA4gri.css} +21 -21
- package/dist/assets/{LpRollingText-CR1mb0Vt.css → LpRollingText-BGnE6q9j.css} +3 -0
- package/dist/assets/{LpShortcutsDialog-ChUyU7oV.css → LpShortcutsDialog-CqYX3yy6.css} +28 -7
- package/dist/assets/{LpTable-DDQNdf86.css → LpTable-CPwWxTJS.css} +49 -9
- package/dist/chunks/{ContextMenuItems-CrfeNPWT.js → ContextMenuItems-BtKU7074.js} +2 -1
- package/dist/chunks/{LayoutCanvas-D-jPOAvg.js → LayoutCanvas-BkaGXTjx.js} +1 -1
- package/dist/chunks/{LayoutNode-D8Xy9N-o.js → LayoutNode-B3_9E1Xa.js} +9 -5
- package/dist/chunks/{LpActionBar-BbwCF6l5.js → LpActionBar-CnfFVIwC.js} +3 -3
- package/dist/chunks/{LpAddressInput-BrOqkZqg.js → LpAddressInput-CJOYGZlI.js} +7 -7
- package/dist/chunks/{LpAlert-DkOIjsbq.js → LpAlert-B6ilrM7T.js} +1 -1
- package/dist/chunks/{LpAppShell-BUKPcHco.js → LpAppShell-B07Lf48e.js} +4 -4
- package/dist/chunks/{LpAutocomplete-DxV3Y9h4.js → LpAutocomplete-C8IgSMsi.js} +2 -1
- package/dist/chunks/{LpAvatar-ClBbEYZN.js → LpAvatar-C1XStdOo.js} +3 -3
- package/dist/chunks/{LpBreadcrumbs-B8IJgFIc.js → LpBreadcrumbs-CQJd73Gm.js} +1 -1
- package/dist/chunks/{LpButton-kqJBHIIb.js → LpButton-CKSwC6Mu.js} +1 -1
- package/dist/chunks/{LpCalendar-B7Ko5RdR.js → LpCalendar-DrA2McTU.js} +1 -1
- package/dist/chunks/{LpCard-CpRByR0q.js → LpCard-C2IvucmX.js} +1 -1
- package/dist/chunks/{LpCheckbox-DpqchzH4.js → LpCheckbox-Bkj13CbW.js} +1 -1
- package/dist/chunks/{LpCodeBlock-DeHJPq7p.js → LpCodeBlock-ca7ANFyW.js} +1 -1
- package/dist/chunks/{LpColorPicker-Bhf1qxhB.js → LpColorPicker-zz4VGkG4.js} +46 -20
- package/dist/chunks/{LpConfirmDialog-CIUOSnWo.js → LpConfirmDialog-BTVAR4tF.js} +3 -3
- package/dist/chunks/{LpConfirmHost-CDm0Wtpv.js → LpConfirmHost-Ci_uCHgQ.js} +1 -1
- package/dist/chunks/{LpContextMenu-DQw5dGfG.js → LpContextMenu-BqkAYa9X.js} +2 -1
- package/dist/chunks/{LpDatePicker-Drirx1AK.js → LpDatePicker-BrdFtSTy.js} +16 -10
- package/dist/chunks/LpDateRangePicker-Drd7EbIz.js +210 -0
- package/dist/chunks/{LpDisclosure-ChQYmjlR.js → LpDisclosure-Cc23-JOT.js} +1 -1
- package/dist/chunks/{LpDrawer-bScx-KMO.js → LpDrawer-CfRhHwmE.js} +3 -3
- package/dist/chunks/{LpDropdownMenu-DJpoqRCb.js → LpDropdownMenu-DdJGQzPn.js} +2 -1
- package/dist/chunks/{LpEmptyState-Dsdqz1Wj.js → LpEmptyState-BJbZXC8D.js} +1 -1
- package/dist/chunks/LpFieldNotice-wtieLUTj.js +64 -0
- package/dist/chunks/{LpFileTree-CSI_5SK2.js → LpFileTree-CNurOvkV.js} +3 -3
- package/dist/chunks/{LpFileTreeNode-B4MiSQX2.js → LpFileTreeNode-D_qRRdsH.js} +3 -3
- package/dist/chunks/{LpFormField-CIk5qosh.js → LpFormField-CtVYj6tO.js} +29 -15
- package/dist/chunks/{LpIcon-CCnX5_2j.js → LpIcon-DYtaid0K.js} +20 -6
- package/dist/chunks/{LpInput-C0e8y8_d.js → LpInput-D-YGQbEv.js} +39 -16
- package/dist/chunks/{LpLightbox-Mr0W_6HK.js → LpLightbox-DSDahF23.js} +1 -1
- package/dist/chunks/{LpLogViewer-YBOaFnc_.js → LpLogViewer-KypbgOyo.js} +252 -58
- package/dist/chunks/{LpMapPicker-NUzS9e37.js → LpMapPicker-Cc84LaM3.js} +1 -1
- package/dist/chunks/{LpMediaGallery-DfJmMW0I.js → LpMediaGallery-YKr-cQPN.js} +2 -2
- package/dist/chunks/{LpModal-DPwGKBPv.js → LpModal-BzTVeNqe.js} +3 -3
- package/dist/chunks/{LpModalNav-DPg5H9f3.js → LpModalNav-CjABSGCu.js} +14 -8
- package/dist/chunks/{LpNotificationBell-t5yn-siX.js → LpNotificationBell-CCwyJP5C.js} +26 -14
- package/dist/chunks/{LpNumberField-DWnQKktS.js → LpNumberField-B77O-z28.js} +1 -1
- package/dist/chunks/{LpPagination-DFngX7Xo.js → LpPagination-BcDlo3r_.js} +1 -1
- package/dist/chunks/{LpPasswordInput-CWVDuBJ5.js → LpPasswordInput-eKzQhbQP.js} +2 -2
- package/dist/chunks/{LpPhoneInput-CD-ZTeSd.js → LpPhoneInput-BCbrrhgE.js} +126 -23
- package/dist/chunks/{LpPie-BLco31Nx.js → LpPie-BEJ2SfI6.js} +9 -10
- package/dist/chunks/{LpPopover-p_e_shN3.js → LpPopover-DCKeqiVn.js} +1 -0
- package/dist/chunks/LpRangeCalendar-DZuaRV0W.js +331 -0
- package/dist/chunks/{LpRollingText-CM5gkSeF.js → LpRollingText-DB7upf-5.js} +1 -1
- package/dist/chunks/{LpScrollArea-D8xyKXcF.js → LpScrollArea-Bry1fdOM.js} +14 -2
- package/dist/chunks/{LpSection-aM6J_u51.js → LpSection-tKEH0jYf.js} +1 -1
- package/dist/chunks/{LpSegmented-Dejd7cIx.js → LpSegmented-C09EEam2.js} +1 -1
- package/dist/chunks/{LpSelect-DrRD9I7L.js → LpSelect-DNIL6MB9.js} +20 -23
- package/dist/chunks/{LpSidebar-BgwUNWpJ.js → LpSidebar-Bwws_X29.js} +3 -3
- package/dist/chunks/{LpSidebarNav-Bqxz8aWT.js → LpSidebarNav-kx-LdqNU.js} +3 -3
- package/dist/chunks/{LpStat-dXtyrdX9.js → LpStat-B-7udBRP.js} +1 -1
- package/dist/chunks/{LpStepper-Bk-XaQYU.js → LpStepper-C7XiVKZj.js} +34 -19
- package/dist/chunks/{LpSwitch-B1aLKulj.js → LpSwitch-OrcOJX9m.js} +1 -1
- package/dist/chunks/LpTableFilter-BV8PpLM9.js +158 -0
- package/dist/chunks/{LpTabs-_qMVaZJ6.js → LpTabs-29iW1XOx.js} +1 -1
- package/dist/chunks/LpTagsInput-D1SuqbhB.js +300 -0
- package/dist/chunks/{LpTextarea-yP8hGedR.js → LpTextarea-uuScWo6-.js} +1 -1
- package/dist/chunks/{LpThemeProvider-Wjm7Tuit.js → LpThemeProvider-Be4r2TQX.js} +1 -1
- package/dist/chunks/{LpThemeSwitcher-CKLc10KZ.js → LpThemeSwitcher-B4aVPbNC.js} +19 -22
- package/dist/chunks/{LpTimeField-C5HRgS5H.js → LpTimeField-Cqe7fXnh.js} +1 -1
- package/dist/chunks/{LpToaster--oT6lfhL.js → LpToaster-DTtWuKvq.js} +76 -9
- package/dist/chunks/{LpTooltip-CBdzeKNf.js → LpTooltip-CXVKcOXT.js} +3 -2
- package/dist/chunks/{LpTopologyCanvas-DocsLal3.js → LpTopologyCanvas-6ozNrQKh.js} +2 -1
- package/dist/chunks/{LpUptimeBar-DLtxOMRy.js → LpUptimeBar-ugcv25xj.js} +2 -2
- package/dist/chunks/icons-CkA0njzm.js +43 -0
- package/dist/chunks/{useTheme-C8JHUlPM.js → useTheme-DJm1JSsY.js} +47 -50
- package/dist/component-names.d.ts +1 -1
- package/dist/components/ContextMenuItems.vue.js +1 -1
- package/dist/components/LayoutCanvas.vue.js +1 -1
- package/dist/components/LayoutNode.vue.js +1 -1
- package/dist/components/LpActionBar.vue.js +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.js +1 -1
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpBreadcrumbs.vue.js +1 -1
- package/dist/components/LpButton.vue.d.ts +2 -2
- package/dist/components/LpButton.vue.js +1 -1
- package/dist/components/LpCalendar.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.d.ts +16 -1
- package/dist/components/LpChart.vue.js +63 -5
- package/dist/components/LpCheckbox.vue.js +1 -1
- package/dist/components/LpCodeBlock.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.d.ts +2 -2
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +6 -0
- package/dist/components/LpCommandPalette.vue.js +62 -11
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpDatePicker.vue.js +1 -1
- package/dist/components/LpDateRangePicker.vue.d.ts +60 -0
- package/dist/components/LpDateRangePicker.vue.js +4 -0
- package/dist/components/LpDisclosure.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.js +1 -1
- package/dist/components/LpEmptyState.vue.js +1 -1
- package/dist/components/LpFieldNotice.vue.d.ts +8 -0
- package/dist/components/LpFieldNotice.vue.js +4 -0
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpFormField.vue.d.ts +4 -1
- package/dist/components/LpFormField.vue.js +1 -1
- package/dist/components/LpIcon.vue.d.ts +0 -1
- package/dist/components/LpIcon.vue.js +1 -1
- package/dist/components/LpImageEditor.vue.js +2 -2
- package/dist/components/LpInput.vue.d.ts +19 -0
- package/dist/components/LpInput.vue.js +1 -1
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.d.ts +52 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMapPicker.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpNumberField.vue.js +1 -1
- package/dist/components/LpPagination.vue.js +1 -1
- package/dist/components/LpPasswordInput.vue.js +1 -1
- package/dist/components/LpPhoneInput.vue.d.ts +13 -0
- package/dist/components/LpPhoneInput.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpPopover.vue.js +1 -1
- package/dist/components/LpProgress.vue.d.ts +1 -1
- package/dist/components/LpRangeCalendar.vue.d.ts +51 -0
- package/dist/components/LpRangeCalendar.vue.js +4 -0
- package/dist/components/LpRollingText.vue.d.ts +1 -1
- package/dist/components/LpRollingText.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.d.ts +2 -2
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpSection.vue.js +1 -1
- package/dist/components/LpSegmented.vue.js +1 -1
- package/dist/components/LpSelect.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.d.ts +6 -0
- package/dist/components/LpShortcutsDialog.vue.js +56 -14
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpStat.vue.js +1 -1
- package/dist/components/LpStepper.vue.js +1 -1
- package/dist/components/LpSwitch.vue.js +1 -1
- package/dist/components/LpTable.vue.d.ts +84 -2
- package/dist/components/LpTable.vue.js +481 -107
- package/dist/components/LpTableFilter.vue.d.ts +31 -0
- package/dist/components/LpTableFilter.vue.js +4 -0
- package/dist/components/LpTabs.vue.js +1 -1
- package/dist/components/LpTagsInput.vue.d.ts +77 -0
- package/dist/components/LpTagsInput.vue.js +4 -0
- package/dist/components/LpTextarea.vue.js +1 -1
- package/dist/components/LpThemeProvider.vue.js +1 -1
- package/dist/components/LpThemeSwitcher.vue.d.ts +2 -2
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpTimeField.vue.js +1 -1
- package/dist/components/LpToaster.vue.d.ts +2 -0
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTooltip.vue.js +1 -1
- package/dist/components/LpTopologyCanvas.vue.js +1 -1
- package/dist/components/LpUptimeBar.vue.js +1 -1
- package/dist/components/chart.js +3 -2
- package/dist/components/commandSearch.js +3 -0
- package/dist/components/dateRange.d.ts +43 -0
- package/dist/components/dateRange.js +76 -0
- package/dist/components/exportData.d.ts +58 -0
- package/dist/components/exportData.js +165 -0
- package/dist/components/logSearch.d.ts +18 -0
- package/dist/components/logSearch.js +36 -0
- package/dist/components/phone.d.ts +41 -0
- package/dist/components/phone.js +80 -0
- package/dist/components/tableFilter.d.ts +36 -0
- package/dist/components/tableFilter.js +84 -0
- package/dist/components/tags.d.ts +20 -0
- package/dist/components/tags.js +37 -0
- package/dist/composables/useField.d.ts +4 -0
- package/dist/composables/useFieldNotice.d.ts +17 -0
- package/dist/composables/useFieldNotice.js +28 -0
- package/dist/composables/useForm.d.ts +53 -0
- package/dist/composables/useForm.js +207 -0
- package/dist/composables/useHotkeys.d.ts +65 -5
- package/dist/composables/useHotkeys.js +170 -9
- package/dist/composables/useInputMask.d.ts +59 -0
- package/dist/composables/useInputMask.js +170 -0
- package/dist/composables/useLocale.d.ts +2 -0
- package/dist/composables/useLocale.js +9 -0
- package/dist/composables/usePaintSelect.d.ts +22 -0
- package/dist/composables/usePaintSelect.js +169 -0
- package/dist/composables/useShift.js +7 -2
- package/dist/icons-all.d.ts +1 -0
- package/dist/icons-all.js +3 -0
- package/dist/icons.d.ts +14 -1
- package/dist/index.d.ts +29 -3
- package/dist/index.js +195 -138
- package/dist/kit-icons.d.ts +2 -0
- package/dist/theme/backdrop.d.ts +12 -0
- package/dist/theme/presets.d.ts +0 -2
- package/package.json +13 -4
- package/src/component-names.ts +4 -0
- package/src/components/ContextMenuItems.vue +1 -1
- package/src/components/LayoutNode.vue +11 -2
- package/src/components/LpActionBar.vue +1 -1
- package/src/components/LpAutocomplete.vue +1 -0
- package/src/components/LpAvatar.vue +2 -2
- package/src/components/LpButton.vue +1 -1
- package/src/components/LpChart.vue +80 -1
- package/src/components/LpColorPicker.vue +34 -1
- package/src/components/LpCommandPalette.vue +82 -8
- package/src/components/LpContextMenu.vue +1 -1
- package/src/components/LpDatePicker.vue +11 -4
- package/src/components/LpDateRangePicker.vue +226 -0
- package/src/components/LpDrawer.vue +1 -1
- package/src/components/LpDropdownMenu.vue +1 -0
- package/src/components/LpFieldNotice.vue +65 -0
- package/src/components/LpFormField.vue +33 -4
- package/src/components/LpIcon.vue +22 -4
- package/src/components/LpInput.vue +46 -6
- package/src/components/LpLogViewer.vue +225 -22
- package/src/components/LpModal.vue +2 -2
- package/src/components/LpModalNav.vue +13 -2
- package/src/components/LpNotificationBell.vue +15 -7
- package/src/components/LpPhoneInput.vue +179 -20
- package/src/components/LpPie.vue +8 -5
- package/src/components/LpPopover.vue +1 -0
- package/src/components/LpRangeCalendar.vue +365 -0
- package/src/components/LpRollingText.vue +3 -0
- package/src/components/LpScrollArea.vue +22 -2
- package/src/components/LpSelect.vue +0 -0
- package/src/components/LpShortcutsDialog.vue +77 -8
- package/src/components/LpStepper.vue +23 -10
- package/src/components/LpSwitch.vue +1 -1
- package/src/components/LpTable.vue +584 -65
- package/src/components/LpTableFilter.vue +175 -0
- package/src/components/LpTagsInput.vue +364 -0
- package/src/components/LpThemeSwitcher.vue +19 -23
- package/src/components/LpToaster.vue +91 -5
- package/src/components/LpTooltip.vue +9 -2
- package/src/components/LpTopologyCanvas.vue +7 -1
- package/src/components/chart.ts +5 -3
- package/src/components/commandSearch.ts +6 -0
- package/src/components/dateRange.ts +134 -0
- package/src/components/exportData.ts +228 -0
- package/src/components/logSearch.ts +46 -0
- package/src/components/phone.ts +140 -0
- package/src/components/tableFilter.ts +122 -0
- package/src/components/tags.ts +62 -0
- package/src/composables/useField.ts +4 -0
- package/src/composables/useFieldNotice.ts +59 -0
- package/src/composables/useForm.ts +314 -0
- package/src/composables/useHotkeys.ts +269 -13
- package/src/composables/useInputMask.ts +254 -0
- package/src/composables/useLocale.ts +14 -0
- package/src/composables/usePaintSelect.ts +243 -0
- package/src/composables/useShift.ts +13 -2
- package/src/iconSubset.d.mts +10 -0
- package/src/iconSubset.mjs +51 -0
- package/src/icons-all.ts +10 -0
- package/src/icons.ts +59 -8
- package/src/index.ts +37 -3
- package/src/kit-icons.ts +5 -0
- package/src/nuxt.ts +30 -2
- package/src/runtime/theme.plugin.ts +2 -2
- package/src/theme/backdrop.ts +69 -0
- package/src/theme/presets.ts +6 -64
- package/src/tokens/tokens.css +53 -4
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { defineComponent, useId, computed, useSlots, openBlock, createElementBlock, mergeProps, unref, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, renderSlot, createVNode } from "vue";
|
|
1
|
+
import { defineComponent, useId, computed, useSlots, openBlock, createElementBlock, mergeProps, unref, createBlock, withCtx, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, renderSlot, createVNode, normalizeClass } from "vue";
|
|
2
2
|
import { Label } from "reka-ui";
|
|
3
|
-
import { _ as _sfc_main$1 } from "./
|
|
3
|
+
import { _ as _sfc_main$1 } from "./LpFieldNotice-wtieLUTj.js";
|
|
4
|
+
import { _ as _sfc_main$2 } from "./LpShift-DXNsauQZ.js";
|
|
4
5
|
import { fieldMessageId, provideField } from "../composables/useField.js";
|
|
6
|
+
import { useFieldNotice } from "../composables/useFieldNotice.js";
|
|
5
7
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
6
8
|
const _hoisted_1 = {
|
|
7
9
|
key: 0,
|
|
8
10
|
class: "text-danger"
|
|
9
11
|
};
|
|
10
|
-
const _hoisted_2 =
|
|
12
|
+
const _hoisted_2 = { class: "relative" };
|
|
11
13
|
const _hoisted_3 = ["id"];
|
|
14
|
+
const _hoisted_4 = ["id"];
|
|
12
15
|
const __default__ = { inheritAttrs: false };
|
|
13
16
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
17
|
...__default__,
|
|
@@ -22,23 +25,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
25
|
invalid: { type: Boolean },
|
|
23
26
|
disabled: { type: Boolean }
|
|
24
27
|
},
|
|
25
|
-
setup(__props) {
|
|
28
|
+
setup(__props, { expose: __expose }) {
|
|
26
29
|
const props = __props;
|
|
27
30
|
const generated = useId();
|
|
28
31
|
const id = computed(() => props.id ?? generated);
|
|
29
32
|
const messageId = computed(() => fieldMessageId(id.value));
|
|
30
33
|
const slots = useSlots();
|
|
31
34
|
const hasMessage = computed(() => !!props.error || !!props.hint || !!slots.hint);
|
|
35
|
+
const notice = useFieldNotice();
|
|
36
|
+
const noticeId = computed(() => `${id.value}-notice`);
|
|
32
37
|
provideField(
|
|
33
38
|
computed(() => ({
|
|
34
39
|
id: id.value,
|
|
35
40
|
labelId: props.label ? `${id.value}-label` : void 0,
|
|
36
|
-
describedBy: hasMessage.value ? messageId.value : void 0,
|
|
41
|
+
describedBy: [hasMessage.value ? messageId.value : "", notice.message.value ? noticeId.value : ""].filter(Boolean).join(" ") || void 0,
|
|
37
42
|
invalid: !!props.invalid || !!props.error,
|
|
38
43
|
required: !!props.required,
|
|
39
|
-
disabled: !!props.disabled
|
|
44
|
+
disabled: !!props.disabled,
|
|
45
|
+
notify: notice.show,
|
|
46
|
+
clearNotice: notice.clear
|
|
40
47
|
}))
|
|
41
48
|
);
|
|
49
|
+
__expose({ notify: notice.show, clearNotice: notice.clear });
|
|
42
50
|
const { class: rootClass, attrs: rest } = useMergedAttrs(
|
|
43
51
|
"flex min-w-0 flex-col gap-1.5"
|
|
44
52
|
);
|
|
@@ -56,25 +64,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
56
64
|
]),
|
|
57
65
|
_: 1
|
|
58
66
|
}, 8, ["id", "for"])) : createCommentVNode("", true),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
createElementVNode("div", _hoisted_2, [
|
|
68
|
+
renderSlot(_ctx.$slots, "default", {
|
|
69
|
+
id: id.value,
|
|
70
|
+
describedBy: hasMessage.value ? messageId.value : void 0
|
|
71
|
+
}),
|
|
72
|
+
createVNode(_sfc_main$1, {
|
|
73
|
+
notice: unref(notice),
|
|
74
|
+
id: noticeId.value
|
|
75
|
+
}, null, 8, ["notice", "id"])
|
|
76
|
+
]),
|
|
77
|
+
createVNode(_sfc_main$2, { axis: "height" }, {
|
|
64
78
|
default: withCtx(() => [
|
|
65
79
|
__props.error ? (openBlock(), createElementBlock("p", {
|
|
66
80
|
key: 0,
|
|
67
81
|
id: messageId.value,
|
|
68
|
-
class: "pt-1.5 text-xs text-danger"
|
|
69
|
-
}, toDisplayString(__props.error),
|
|
82
|
+
class: normalizeClass(["pt-1.5 text-xs text-danger transition-opacity duration-fast", unref(notice).message.value ? "opacity-0" : ""])
|
|
83
|
+
}, toDisplayString(__props.error), 11, _hoisted_3)) : __props.hint || _ctx.$slots.hint ? (openBlock(), createElementBlock("p", {
|
|
70
84
|
key: 1,
|
|
71
85
|
id: messageId.value,
|
|
72
|
-
class: "pt-1.5 text-xs text-muted"
|
|
86
|
+
class: normalizeClass(["pt-1.5 text-xs text-muted transition-opacity duration-fast", unref(notice).message.value ? "opacity-0" : ""])
|
|
73
87
|
}, [
|
|
74
88
|
renderSlot(_ctx.$slots, "hint", {}, () => [
|
|
75
89
|
createTextVNode(toDisplayString(__props.hint), 1)
|
|
76
90
|
])
|
|
77
|
-
],
|
|
91
|
+
], 10, _hoisted_4)) : createCommentVNode("", true)
|
|
78
92
|
]),
|
|
79
93
|
_: 3
|
|
80
94
|
})
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createElementBlock, createBlock, unref } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
addCollection(lucide);
|
|
1
|
+
import { defineComponent, computed, watchEffect, openBlock, createElementBlock, createBlock, unref } from "vue";
|
|
2
|
+
import { getIcon, Icon } from "@iconify/vue";
|
|
3
|
+
import { i as iconsVersion, r as requestIcon } from "./icons-CkA0njzm.js";
|
|
5
4
|
const _hoisted_1 = ["width", "height", "viewBox", "innerHTML"];
|
|
5
|
+
const _hoisted_2 = ["width", "height"];
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
__name: "LpIcon",
|
|
8
8
|
props: {
|
|
@@ -15,7 +15,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
return name.includes(":") ? name : `lucide:${name}`;
|
|
16
16
|
}
|
|
17
17
|
const fullName = computed(() => resolve(props.name));
|
|
18
|
-
const data = computed(() =>
|
|
18
|
+
const data = computed(() => {
|
|
19
|
+
void iconsVersion.value;
|
|
20
|
+
return getIcon(fullName.value);
|
|
21
|
+
});
|
|
22
|
+
const lucide = computed(() => fullName.value.startsWith("lucide:"));
|
|
23
|
+
watchEffect(() => {
|
|
24
|
+
if (!data.value && lucide.value) requestIcon(fullName.value);
|
|
25
|
+
});
|
|
19
26
|
const dim = computed(() => props.size ?? "1em");
|
|
20
27
|
return (_ctx, _cache) => {
|
|
21
28
|
return data.value ? (openBlock(), createElementBlock("svg", {
|
|
@@ -26,8 +33,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
26
33
|
viewBox: `0 0 ${data.value.width} ${data.value.height}`,
|
|
27
34
|
"aria-hidden": "true",
|
|
28
35
|
innerHTML: data.value.body
|
|
29
|
-
}, null, 8, _hoisted_1)) : (openBlock(),
|
|
36
|
+
}, null, 8, _hoisted_1)) : lucide.value ? (openBlock(), createElementBlock("svg", {
|
|
30
37
|
key: 1,
|
|
38
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
+
width: dim.value,
|
|
40
|
+
height: dim.value,
|
|
41
|
+
viewBox: "0 0 24 24",
|
|
42
|
+
"aria-hidden": "true"
|
|
43
|
+
}, null, 8, _hoisted_2)) : (openBlock(), createBlock(unref(Icon), {
|
|
44
|
+
key: 2,
|
|
31
45
|
icon: fullName.value,
|
|
32
46
|
width: dim.value,
|
|
33
47
|
height: dim.value,
|
|
@@ -2,9 +2,10 @@ import { defineComponent, computed, useSlots, useAttrs, ref, openBlock, createBl
|
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
3
|
import { useFieldControl } from "../composables/useField.js";
|
|
4
4
|
import { useInputFilter } from "../composables/useInputFilter.js";
|
|
5
|
+
import { useInputMask, DEFAULT_MASK_TOKENS } from "../composables/useInputMask.js";
|
|
5
6
|
import { mergeClass } from "../composables/useMergedClass.js";
|
|
6
|
-
import { _ as _sfc_main$1 } from "./LpFormField-
|
|
7
|
-
import { _ as _sfc_main$2 } from "./LpIcon-
|
|
7
|
+
import { _ as _sfc_main$1 } from "./LpFormField-CtVYj6tO.js";
|
|
8
|
+
import { _ as _sfc_main$2 } from "./LpIcon-DYtaid0K.js";
|
|
8
9
|
const _hoisted_1 = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "flex shrink-0 items-center text-muted"
|
|
@@ -27,10 +28,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
28
|
icon: {},
|
|
28
29
|
required: { type: Boolean },
|
|
29
30
|
pattern: {},
|
|
30
|
-
restrict: {}
|
|
31
|
+
restrict: {},
|
|
32
|
+
mask: {},
|
|
33
|
+
maskTokens: {}
|
|
31
34
|
},
|
|
32
|
-
emits: ["update:modelValue"],
|
|
33
|
-
setup(__props, { expose: __expose }) {
|
|
35
|
+
emits: ["update:modelValue", "update:raw"],
|
|
36
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
34
37
|
const shell = tv({
|
|
35
38
|
base: [
|
|
36
39
|
"flex w-full items-center bg-surface-soft text-ink",
|
|
@@ -57,10 +60,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
60
|
});
|
|
58
61
|
const padX = { sm: "px-2.5", md: "px-3", lg: "px-3.5" };
|
|
59
62
|
const props = __props;
|
|
63
|
+
const emit = __emit;
|
|
60
64
|
const { isInvalid, onBeforeInput, onInput: filterInput, onCompositionEnd, onPaste } = useInputFilter({
|
|
61
65
|
pattern: () => props.pattern,
|
|
62
66
|
restrict: () => props.restrict
|
|
63
67
|
});
|
|
68
|
+
const masking = useInputMask({
|
|
69
|
+
mask: () => props.mask,
|
|
70
|
+
tokens: () => props.maskTokens ? { ...DEFAULT_MASK_TOKENS, ...props.maskTokens } : void 0,
|
|
71
|
+
onChange: (_masked, raw) => emit("update:raw", raw)
|
|
72
|
+
});
|
|
73
|
+
const shown = computed(() => masking.active.value ? masking.format(props.modelValue).masked : props.modelValue);
|
|
74
|
+
function onBefore(event) {
|
|
75
|
+
onBeforeInput(event);
|
|
76
|
+
if (!event.defaultPrevented) masking.onBeforeInput(event);
|
|
77
|
+
if (event.defaultPrevented && masking.active.value && event.target instanceof HTMLInputElement) {
|
|
78
|
+
emit("update:modelValue", event.target.value);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function onInputEvent(event) {
|
|
82
|
+
if (masking.active.value) masking.onInput(event);
|
|
83
|
+
else filterInput(event);
|
|
84
|
+
emit("update:modelValue", event.target.value);
|
|
85
|
+
}
|
|
86
|
+
function onComposed(event) {
|
|
87
|
+
if (masking.active.value) {
|
|
88
|
+
masking.onCompositionEnd(event);
|
|
89
|
+
emit("update:modelValue", event.target.value);
|
|
90
|
+
} else onCompositionEnd(event);
|
|
91
|
+
}
|
|
64
92
|
const patternInvalid = computed(() => isInvalid(props.modelValue));
|
|
65
93
|
const slots = useSlots();
|
|
66
94
|
const attrs = useAttrs();
|
|
@@ -101,7 +129,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
129
|
error: hasField.value ? __props.error : void 0,
|
|
102
130
|
required: hasField.value ? __props.required : void 0,
|
|
103
131
|
id: hasField.value ? unref(field).id : void 0,
|
|
104
|
-
class: normalizeClass(hasField.value ? rootClass.value :
|
|
132
|
+
class: normalizeClass(hasField.value ? rootClass.value : "contents"),
|
|
105
133
|
style: normalizeStyle(hasField.value ? rootStyle.value : void 0)
|
|
106
134
|
}, {
|
|
107
135
|
default: withCtx(() => [
|
|
@@ -125,7 +153,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
125
153
|
}, inputAttrs.value, {
|
|
126
154
|
id: unref(field).id,
|
|
127
155
|
type: __props.type,
|
|
128
|
-
value:
|
|
156
|
+
value: shown.value,
|
|
129
157
|
placeholder: __props.placeholder,
|
|
130
158
|
disabled: unref(field).disabled,
|
|
131
159
|
required: unref(field).required || void 0,
|
|
@@ -136,16 +164,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
136
164
|
hasLeading.value ? "pl-2" : padX[__props.size ?? "md"],
|
|
137
165
|
hasTrailing.value ? "" : padX[__props.size ?? "md"]
|
|
138
166
|
],
|
|
139
|
-
onBeforeinput:
|
|
140
|
-
|
|
141
|
-
onPaste: _cache[1] || (_cache[1] = //@ts-ignore
|
|
167
|
+
onBeforeinput: onBefore,
|
|
168
|
+
onPaste: _cache[0] || (_cache[0] = //@ts-ignore
|
|
142
169
|
(...args) => unref(onPaste) && unref(onPaste)(...args)),
|
|
143
|
-
onCompositionend:
|
|
144
|
-
|
|
145
|
-
onInput: _cache[3] || (_cache[3] = ($event) => {
|
|
146
|
-
unref(filterInput)($event);
|
|
147
|
-
_ctx.$emit("update:modelValue", $event.target.value);
|
|
148
|
-
})
|
|
170
|
+
onCompositionend: onComposed,
|
|
171
|
+
onInput: onInputEvent
|
|
149
172
|
}), null, 16, _hoisted_2),
|
|
150
173
|
renderSlot(_ctx.$slots, "trailing")
|
|
151
174
|
], 6)
|
|
@@ -3,7 +3,7 @@ import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, Di
|
|
|
3
3
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
4
4
|
import { useZoomPan } from "../composables/useZoomPan.js";
|
|
5
5
|
import { fileNameOf } from "../components/lightbox.js";
|
|
6
|
-
import { _ as _sfc_main$1 } from "./LpIcon-
|
|
6
|
+
import { _ as _sfc_main$1 } from "./LpIcon-DYtaid0K.js";
|
|
7
7
|
import { useModalLayer } from "../components/modalDepth.js";
|
|
8
8
|
const _hoisted_1 = { class: "flex shrink-0 items-center gap-1 p-3 text-sm text-white/70 [--chrome-from:-8px] animate-[lightbox-chrome-in_var(--duration-medium)_var(--ease-emphasized)_60ms_both] motion-reduce:animate-none" };
|
|
9
9
|
const _hoisted_2 = {
|