@wssto2/vue-core 0.2.0 → 0.4.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 +36 -0
- package/dist/AccessGate.vue_vue_type_script_setup_true_lang-DcbZBINh.js +22 -0
- package/dist/AccountMenuItem.vue_vue_type_script_setup_true_lang-CPeNxh5K.js +76 -0
- package/dist/ActionRow.vue_vue_type_script_setup_true_lang-LlfIPWsJ.js +45 -0
- package/dist/Activity-2gGxQn7v.js +156 -0
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-CeKK8_g5.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-BoinCY93.js} +48 -47
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-e4hzkzg3.js → AlertDialog.vue_vue_type_script_setup_true_lang-whA4WLdl.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CWLB3xsR.js → AsyncSection.vue_vue_type_script_setup_true_lang-Blj6KgCr.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-n_wGPIIu.js → Banner.vue_vue_type_script_setup_true_lang-DSStj_5z.js} +1 -1
- package/dist/{BottomDock.vue_vue_type_script_setup_true_lang-DhlMnPC2.js → BottomDock.vue_vue_type_script_setup_true_lang-CjN7xYEr.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-B1eZgLae.js → Button.vue_vue_type_script_setup_true_lang-CL9Qh5yq.js} +1 -1
- package/dist/Changes-Bm8xvagD.js +129 -0
- package/dist/CollectionPage.vue_vue_type_script_setup_true_lang-DCBVw2Qd.js +1485 -0
- package/dist/DataTable.vue_vue_type_script_setup_true_lang-UH6f9puS.js +52 -0
- package/dist/DateField.vue_vue_type_script_setup_true_lang-GVasv8ao.js +255 -0
- package/dist/DeadLetters-CMRtXn_N.js +104 -0
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-DyhYHRyz.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-D1arePCZ.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-BeGpHMUP.js → EmptyState.vue_vue_type_script_setup_true_lang-50p-Mp8I.js} +1 -1
- package/dist/FormErrors.vue_vue_type_script_setup_true_lang-BQb7wLT0.js +276 -0
- package/dist/FormGroup.vue_vue_type_script_setup_true_lang-DG2zdG_a.js +136 -0
- package/dist/FormView.vue_vue_type_script_setup_true_lang-cr0xNDXP.js +38 -0
- package/dist/General-CTqd0SLK.js +145 -0
- package/dist/HeaderAction.vue_vue_type_script_setup_true_lang-Cgji-Jrr.js +45 -0
- package/dist/{Icon.vue_vue_type_script_lang-DtC4_mkz.js → Icon.vue_vue_type_script_lang-D7oC-d-S.js} +54 -37
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-Csfv6Sel.js → IconTile.vue_vue_type_script_setup_true_lang-BpIjgu5E.js} +1 -1
- package/dist/KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js +35 -0
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CvwoT1JF.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-Cv7KlA5y.js} +2 -2
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-CrMj6KPD.js → Menu.vue_vue_type_script_setup_true_lang-DTbAcDzL.js} +66 -58
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-BQZM49gC.js → Modal.vue_vue_type_script_setup_true_lang-DpBb8ans.js} +4 -4
- package/dist/NewRolePage-DTOWIxxC.js +42 -0
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-DWxq-MTM.js +31 -0
- package/dist/NumberField.vue_vue_type_script_setup_true_lang-C7N5nq0P.js +113 -0
- package/dist/OtpInput.vue_vue_type_script_setup_true_lang-gp4FfWAH.js +95 -0
- package/dist/PageBar.vue_vue_type_script_setup_true_lang-B7qdEeej.js +47 -0
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-BQmv3cLb.js → Panel.vue_vue_type_script_setup_true_lang-BA0u_DtS.js} +1 -1
- package/dist/PanelActions.vue_vue_type_script_setup_true_lang-E9VdIGkf.js +46 -0
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-ElDizaW2.js → PhotoViewer.vue_vue_type_script_setup_true_lang-QPCW3Xi6.js} +1 -1
- package/dist/Popover.vue_vue_type_script_setup_true_lang-Dx-tDhNE.js +125 -0
- package/dist/ProfilePage-BlpiWH_W.js +654 -0
- package/dist/{ProgressTrack.vue_vue_type_script_setup_true_lang-1DDaNs2W.js → ProgressTrack.vue_vue_type_script_setup_true_lang-B6Prw9hi.js} +2 -2
- package/dist/RecordHeader.vue_vue_type_script_setup_true_lang-C_ymvhHU.js +64 -0
- package/dist/ResourcePage.vue_vue_type_script_setup_true_lang-CwI_sROp.js +173 -0
- package/dist/RoleEditor.vue_vue_type_script_setup_true_lang-CmwvSytD.js +300 -0
- package/dist/RolePage-DZk7BZOc.js +315 -0
- package/dist/RolesPage-DzGGCMnm.js +115 -0
- package/dist/SectionIntro.vue_vue_type_script_setup_true_lang-CZtPrmXD.js +23 -0
- package/dist/SectionList.vue_vue_type_script_setup_true_lang-BFYls8fR.js +148 -0
- package/dist/SectionNavigator.vue_vue_type_script_setup_true_lang-DSMXEaCs.js +314 -0
- package/dist/SegmentedField.vue_vue_type_script_setup_true_lang-BMqWlpsL.js +58 -0
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-7O1BAx04.js +423 -0
- package/dist/SessionList.vue_vue_type_script_setup_true_lang-D5KRitar.js +111 -0
- package/dist/Sessions-CWqjjTr1.js +96 -0
- package/dist/SettingsPage-C4s0IdkW.js +255 -0
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js +145 -0
- package/dist/SignIn-zzKY__df.js +140 -0
- package/dist/SignInPage-Rqnus_s-.js +60 -0
- package/dist/SignInTable.vue_vue_type_script_setup_true_lang-CEbAvZ_C.js +79 -0
- package/dist/SignIns-Cnf9BVR0.js +66 -0
- package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-BJIA2JfI.js +93 -0
- package/dist/SwitchField.vue_vue_type_script_setup_true_lang-CM8yp9JQ.js +64 -0
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CcMcE38r.js +155 -0
- package/dist/TextField.vue_vue_type_script_setup_true_lang-B9dwVASU.js +269 -0
- package/dist/TextareaField.vue_vue_type_script_setup_true_lang-CqAWfABZ.js +68 -0
- package/dist/TimeField.vue_vue_type_script_setup_true_lang-DWfAUlnz.js +164 -0
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-CSY_mMm1.js → Timestamp.vue_vue_type_script_setup_true_lang-FVRUr-9y.js} +1 -1
- package/dist/UserRecord-DqigxVxH.js +267 -0
- package/dist/UsersList-DNlZsI9J.js +155 -0
- package/dist/ViewTabs.vue_vue_type_script_setup_true_lang-BJIoZAlH.js +28 -0
- package/dist/access/AddRoleDialog.vue.d.ts +19 -0
- package/dist/access/BindingRow.vue.d.ts +19 -0
- package/dist/access/EffectiveAccess.vue.d.ts +12 -0
- package/dist/access/NewRolePage.vue.d.ts +2 -0
- package/dist/access/PermissionTree.vue.d.ts +13 -0
- package/dist/access/PersonAccess.vue.d.ts +21 -0
- package/dist/access/ReplaceRoleDialog.vue.d.ts +17 -0
- package/dist/access/RoleCompareDialog.vue.d.ts +14 -0
- package/dist/access/RoleEditor.vue.d.ts +28 -0
- package/dist/access/RolePage.vue.d.ts +2 -0
- package/dist/access/RolesPage.vue.d.ts +2 -0
- package/dist/access/api.d.ts +26 -0
- package/dist/access/catalogue.d.ts +64 -0
- package/dist/access/context.d.ts +20 -0
- package/dist/access/effective.d.ts +42 -0
- package/dist/access/feature.d.ts +27 -0
- package/dist/access/index.d.ts +13 -0
- package/dist/access/index.js +15 -0
- package/dist/access/labels.d.ts +35 -0
- package/dist/access/refusals.d.ts +6 -0
- package/dist/access/routes.d.ts +45 -0
- package/dist/access/scopes.d.ts +20 -0
- package/dist/app/contributions.d.ts +1 -1
- package/dist/app/feature.d.ts +8 -0
- package/dist/app/index.js +259 -296
- package/dist/bottomDock-BZEiOPYZ.js +12 -0
- package/dist/button/Button.vue.d.ts +3 -3
- package/dist/button/index.js +1 -1
- package/dist/chrome-BS3xJcad.js +93 -0
- package/dist/client/client.d.ts +13 -0
- package/dist/client/index.d.ts +3 -1
- package/dist/client/index.js +11 -138
- package/dist/client/route.d.ts +59 -0
- package/dist/client-k9euDWF4.js +147 -0
- package/dist/closeOverlays-CjVsIrpL.js +8 -0
- package/dist/collection/definition.d.ts +3 -0
- package/dist/collection/http.d.ts +4 -2
- package/dist/collection/index.js +74 -2428
- package/dist/collection/useCollection.d.ts +2 -0
- package/dist/content/index.js +37 -66
- package/dist/contributions-DsfmDoRD.js +26 -0
- package/dist/control-7EP4tjYy.js +313 -0
- package/dist/controls/DateButton.vue.d.ts +1 -1
- package/dist/controls/PopupButton.vue.d.ts +1 -1
- package/dist/controls/index.js +11 -10
- package/dist/defineRoutes-BGAdiIrt.js +19 -0
- package/dist/{describeError-l5T9b8Uv.js → describeError-Ctga6GcS.js} +1 -1
- package/dist/environment-Dva-SG8D.js +6 -0
- package/dist/{error-Bb_dr_Ay.js → error-CD7x0Jrz.js} +2 -2
- package/dist/feature-DdUAfyi4.js +25 -0
- package/dist/fieldMessages-C3Rpbktw.js +25 -0
- package/dist/form/CheckboxField.vue.d.ts +1 -1
- package/dist/form/CommandDialog.vue.d.ts +1 -1
- package/dist/form/DateField.vue.d.ts +1 -1
- package/dist/form/DateTimeField.vue.d.ts +1 -1
- package/dist/form/EditorPage.vue.d.ts +1 -1
- package/dist/form/Field.vue.d.ts +1 -1
- package/dist/form/FileField.vue.d.ts +1 -1
- package/dist/form/FormGroup.vue.d.ts +1 -1
- package/dist/form/FormGroupButton.vue.d.ts +1 -1
- package/dist/form/FormRow.vue.d.ts +1 -1
- package/dist/form/I18nField.vue.d.ts +3 -3
- package/dist/form/MoneyField.vue.d.ts +1 -1
- package/dist/form/MonthYearField.vue.d.ts +1 -1
- package/dist/form/NumberCell.vue.d.ts +1 -1
- package/dist/form/NumberField.vue.d.ts +2 -2
- package/dist/form/OtpInput.vue.d.ts +2 -2
- package/dist/form/PhotoField.vue.d.ts +1 -1
- package/dist/form/SwitchField.vue.d.ts +1 -1
- package/dist/form/TextField.vue.d.ts +3 -3
- package/dist/form/TextareaField.vue.d.ts +3 -3
- package/dist/form/TimeField.vue.d.ts +1 -1
- package/dist/form/date/DatePickerSheet.vue.d.ts +1 -1
- package/dist/form/date/MonthYearPanel.vue.d.ts +1 -1
- package/dist/form/index.js +1159 -3474
- package/dist/guards-Dve61KjR.js +51 -0
- package/dist/http-CNcDHSOj.js +194 -0
- package/dist/i18n/index.d.ts +281 -0
- package/dist/i18n/index.js +52 -52
- package/dist/icon/core.d.ts +17 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/ImpersonationBanner.vue.d.ts +2 -0
- package/dist/identity/LocaleSync.vue.d.ts +2 -0
- package/dist/identity/SessionExpiry.vue.d.ts +2 -0
- package/dist/identity/SignInAsButton.vue.d.ts +15 -0
- package/dist/identity/SignInPage.vue.d.ts +2 -0
- package/dist/identity/context.d.ts +7 -0
- package/dist/identity/feature.d.ts +16 -0
- package/dist/identity/fieldMessages.d.ts +15 -0
- package/dist/identity/index.d.ts +16 -0
- package/dist/identity/index.js +18 -0
- package/dist/identity/profile/DetailsPanel.vue.d.ts +11 -0
- package/dist/identity/profile/EmailChangeDialog.vue.d.ts +14 -0
- package/dist/identity/profile/EmailPanel.vue.d.ts +11 -0
- package/dist/identity/profile/PanelActions.vue.d.ts +17 -0
- package/dist/identity/profile/PasswordPanel.vue.d.ts +2 -0
- package/dist/identity/profile/ProfileMenuItem.vue.d.ts +2 -0
- package/dist/identity/profile/ProfilePage.vue.d.ts +2 -0
- package/dist/identity/profile/SessionsPanel.vue.d.ts +2 -0
- package/dist/identity/profile/SignInsPanel.vue.d.ts +2 -0
- package/dist/identity/profile/VerifyCode.vue.d.ts +49 -0
- package/dist/identity/profile/routes.d.ts +13 -0
- package/dist/identity/session.d.ts +30 -0
- package/dist/identity/shared/ActionRow.vue.d.ts +20 -0
- package/dist/identity/shared/ChangeFeed.vue.d.ts +11 -0
- package/dist/identity/shared/PageBar.vue.d.ts +12 -0
- package/dist/identity/shared/SectionIntro.vue.d.ts +16 -0
- package/dist/identity/shared/SessionList.vue.d.ts +19 -0
- package/dist/identity/shared/SignInTable.vue.d.ts +11 -0
- package/dist/identity/shared/ViewTabs.vue.d.ts +23 -0
- package/dist/identity/shared/signInEvents.d.ts +9 -0
- package/dist/identity/signIn.d.ts +27 -0
- package/dist/identity/useSignInForm.d.ts +20 -0
- package/dist/identity/user.d.ts +6 -0
- package/dist/identity/users/DeactivateDialog.vue.d.ts +18 -0
- package/dist/identity/users/NewUserDialog.vue.d.ts +9 -0
- package/dist/identity/users/SetPasswordDialog.vue.d.ts +16 -0
- package/dist/identity/users/UserRecord.vue.d.ts +2 -0
- package/dist/identity/users/UsersList.vue.d.ts +2 -0
- package/dist/identity/users/access.d.ts +4 -0
- package/dist/identity/users/context.d.ts +9 -0
- package/dist/identity/users/feature.d.ts +34 -0
- package/dist/identity/users/languages.d.ts +4 -0
- package/dist/identity/users/list.d.ts +8 -0
- package/dist/identity/users/person.d.ts +26 -0
- package/dist/identity/users/personSections.d.ts +22 -0
- package/dist/identity/users/routes.d.ts +22 -0
- package/dist/identity/users/sections/Activity.vue.d.ts +2 -0
- package/dist/identity/users/sections/Changes.vue.d.ts +2 -0
- package/dist/identity/users/sections/General.vue.d.ts +2 -0
- package/dist/identity/users/sections/Sessions.vue.d.ts +2 -0
- package/dist/identity/users/sections/SignIn.vue.d.ts +2 -0
- package/dist/identity/users/sections/SignIns.vue.d.ts +2 -0
- package/dist/identity/users/status.d.ts +4 -0
- package/dist/index-BsJ92eub.js +504 -0
- package/dist/index-CGv-u1Ws.js +459 -0
- package/dist/index-GcLnFF-z.js +706 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/languageName.d.ts +2 -0
- package/dist/keepAlive-WYQGRhuz.js +48 -0
- package/dist/languageName-CItV_SOv.js +11 -0
- package/dist/languages-BShG9LpE.js +10 -0
- package/dist/leaveGuard-Cc8yeLxM.js +72 -0
- package/dist/modal/Modal.vue.d.ts +1 -1
- package/dist/modal/Sheet.vue.d.ts +2 -0
- package/dist/modal/index.js +5 -5
- package/dist/modules/access/entities.d.ts +112 -0
- package/dist/modules/access/routes.d.ts +67 -0
- package/dist/modules/access/schemas.d.ts +73 -0
- package/dist/modules/events/entities.d.ts +16 -0
- package/dist/modules/events/routes.d.ts +17 -0
- package/dist/modules/events/schemas.d.ts +16 -0
- package/dist/modules/identity/entities.d.ts +150 -0
- package/dist/modules/identity/routes.d.ts +118 -0
- package/dist/modules/identity/schemas.d.ts +145 -0
- package/dist/modules/notification/entities.d.ts +46 -0
- package/dist/modules/notification/routes.d.ts +26 -0
- package/dist/modules/notification/schemas.d.ts +25 -0
- package/dist/{navigation-B33ikiCS.js → navigation-Cm3iChlR.js} +21 -20
- package/dist/neighbors-DpaIMQAL.js +86 -0
- package/dist/notifications/InboxPanel.vue.d.ts +16 -0
- package/dist/notifications/MarkAllRead.vue.d.ts +7 -0
- package/dist/notifications/NotificationBell.vue.d.ts +2 -0
- package/dist/notifications/SettingsLink.vue.d.ts +6 -0
- package/dist/notifications/context.d.ts +20 -0
- package/dist/notifications/deadletters/DeadLetters.vue.d.ts +2 -0
- package/dist/notifications/deadletters/access.d.ts +3 -0
- package/dist/notifications/deadletters/list.d.ts +3 -0
- package/dist/notifications/deadletters/routes.d.ts +13 -0
- package/dist/notifications/feature.d.ts +31 -0
- package/dist/notifications/inbox.d.ts +62 -0
- package/dist/notifications/index.d.ts +13 -0
- package/dist/notifications/index.js +8 -0
- package/dist/notifications/settings/EmailPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/QuietHoursPanel.vue.d.ts +14 -0
- package/dist/notifications/settings/SettingsMenuItem.vue.d.ts +2 -0
- package/dist/notifications/settings/SettingsPage.vue.d.ts +2 -0
- package/dist/notifications/settings/categoryText.d.ts +9 -0
- package/dist/notifications/settings/routes.d.ts +13 -0
- package/dist/notifications/settings/settings.d.ts +18 -0
- package/dist/notifications/settings/state.d.ts +16 -0
- package/dist/notifications/state.d.ts +27 -0
- package/dist/notifications/stream.d.ts +21 -0
- package/dist/options-Ba_0uLWN.js +18 -0
- package/dist/overlay/AlertDialog.vue.d.ts +3 -3
- package/dist/overlay/Popover.vue.d.ts +1 -1
- package/dist/overlay/closeOverlays.d.ts +7 -0
- package/dist/overlay/index.js +21 -20
- package/dist/page/AdaptivePageShell.vue.d.ts +2 -2
- package/dist/page/ResourceHeader.vue.d.ts +2 -2
- package/dist/page/index.js +99 -457
- package/dist/phone/PhoneField.vue.d.ts +2 -2
- package/dist/phone/index.js +68 -67
- package/dist/platform/index.d.ts +2 -2
- package/dist/platform/index.js +73 -90
- package/dist/platform/platform.d.ts +2 -2
- package/dist/platform/session.d.ts +22 -1
- package/dist/platform-q3cjODLx.js +255 -0
- package/dist/resource/index.js +8 -248
- package/dist/route-goWMxDUN.js +13 -0
- package/dist/routeResource-DstM0hvf.js +82 -0
- package/dist/router/guards.d.ts +7 -1
- package/dist/router/index.js +23 -37
- package/dist/router/navigation.d.ts +1 -1
- package/dist/rowLayout-BqTEhEuy.js +603 -0
- package/dist/sectionIndex-BS0ic5W7.js +86 -0
- package/dist/{sections-LtxV5Mtk.js → sections-CntvUTxn.js} +1 -1
- package/dist/shell/AccountMenuItem.vue.d.ts +1 -1
- package/dist/shell/BackofficeShell.vue.d.ts +2 -2
- package/dist/shell/NavigationList.vue.d.ts +1 -1
- package/dist/shell/ShellBrand.vue.d.ts +1 -1
- package/dist/shell/backofficeShell.d.ts +1 -1
- package/dist/shell/identity.d.ts +1 -1
- package/dist/shell/index.js +491 -595
- package/dist/state/ProgressTrack.vue.d.ts +1 -1
- package/dist/state/index.js +59 -92
- package/dist/status-BuP3ULjH.js +33 -0
- package/dist/styles.css +1 -1
- package/dist/suggestions-BxMm6MQA.js +138 -0
- package/dist/testing/index.js +1 -1
- package/dist/toast-D9Z5To38.js +13 -0
- package/dist/transport-BnP7WC0Y.js +4 -0
- package/dist/useCommand-BkONMn3X.js +135 -0
- package/dist/useLoad-CYRVx6HW.js +39 -0
- package/dist/useResourceForm-D1hIpwW5.js +52 -0
- package/dist/useSaveChrome-chi6D3HY.js +25 -0
- package/dist/useSheetDrag-OsD6Eb6I.js +72 -0
- package/dist/useTypedEntry-aTfPBAhw.js +857 -0
- package/package.json +26 -5
- package/dist/NoAccess.vue_vue_type_script_setup_true_lang-OKW8pKYU.js +0 -78
- package/dist/SectionList.vue_vue_type_script_setup_true_lang-L9ita_Kx.js +0 -230
- package/dist/SelectField.vue_vue_type_script_setup_true_lang-DZTrU8NJ.js +0 -661
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-CtkJ-4e3.js +0 -210
- package/dist/SwipeActions.vue_vue_type_script_setup_true_lang-CGTuEnTv.js +0 -243
- package/dist/chrome-D9pwD6iS.js +0 -101
- package/dist/environment-D3nozt9a.js +0 -75
- package/dist/feature-DyDtyMLU.js +0 -47
- package/dist/options-DAkBtYkI.js +0 -330
- package/dist/platform-jqlKVJ2e.js +0 -244
- package/dist/toast-DvrHQ6Ag.js +0 -131
|
@@ -0,0 +1,857 @@
|
|
|
1
|
+
import { defineComponent as B, ref as L, watch as oe, computed as _, openBlock as f, createElementBlock as b, Fragment as I, createElementVNode as h, normalizeClass as $, unref as y, createVNode as N, createTextVNode as Pe, toDisplayString as M, renderList as j, useModel as de, useId as De, useTemplateRef as ce, createCommentVNode as G, createBlock as ie, mergeModels as me, nextTick as Te, onMounted as Ee, onBeforeUnmount as Fe, normalizeStyle as X, withCtx as he } from "vue";
|
|
2
|
+
import { useI18n as J } from "vue-i18n";
|
|
3
|
+
import { u as Ce } from "./format-B8mJm946.js";
|
|
4
|
+
import { _ as je } from "./Sheet.vue_vue_type_script_setup_true_lang-DgOFV4fa.js";
|
|
5
|
+
import { _ as F } from "./Icon.vue_vue_type_script_lang-D7oC-d-S.js";
|
|
6
|
+
import { a as Oe } from "./mediaQuery-CygcXmFW.js";
|
|
7
|
+
const We = /^(\d{4})-(\d{2})-(\d{2})$/, Me = 864e5, W = (e, t = 2) => String(e).padStart(t, "0"), Re = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], He = (e) => e % 4 === 0 && e % 100 !== 0 || e % 400 === 0, re = (e, t) => t === 2 && He(e) ? 29 : Re[t - 1] ?? 0;
|
|
8
|
+
function O(e, t, a) {
|
|
9
|
+
return !Number.isInteger(e) || !Number.isInteger(t) || !Number.isInteger(a) || e < 1 || e > 9999 || t < 1 || t > 12 || a < 1 || a > re(e, t) ? null : `${W(e, 4)}-${W(t)}-${W(a)}`;
|
|
10
|
+
}
|
|
11
|
+
function R(e) {
|
|
12
|
+
const t = e ? We.exec(e) : null;
|
|
13
|
+
if (!t) return null;
|
|
14
|
+
const a = { year: Number(t[1]), month: Number(t[2]), day: Number(t[3]) };
|
|
15
|
+
return O(a.year, a.month, a.day) ? a : null;
|
|
16
|
+
}
|
|
17
|
+
const ne = (e) => R(e) !== null, Ve = (e) => `${W(e.year, 4)}-${W(e.month)}-${W(e.day)}`;
|
|
18
|
+
function Ne(e) {
|
|
19
|
+
const t = /* @__PURE__ */ new Date(0);
|
|
20
|
+
return t.setUTCFullYear(e.year, e.month - 1, e.day), Math.round(t.getTime() / Me);
|
|
21
|
+
}
|
|
22
|
+
function Be(e) {
|
|
23
|
+
const t = new Date(e * Me);
|
|
24
|
+
return { year: t.getUTCFullYear(), month: t.getUTCMonth() + 1, day: t.getUTCDate() };
|
|
25
|
+
}
|
|
26
|
+
const se = (e) => R(e) ?? { year: 1970, month: 1, day: 1 };
|
|
27
|
+
function Y(e, t) {
|
|
28
|
+
return Ve(Be(Ne(se(e)) + t));
|
|
29
|
+
}
|
|
30
|
+
function H(e, t) {
|
|
31
|
+
const a = se(e), n = a.year * 12 + (a.month - 1) + t, u = Math.floor(n / 12), m = n % 12 + 1;
|
|
32
|
+
return O(u, m, Math.min(a.day, re(u, m))) ?? e;
|
|
33
|
+
}
|
|
34
|
+
const ye = (e, t) => H(e, t * 12);
|
|
35
|
+
function le(e) {
|
|
36
|
+
const t = se(e);
|
|
37
|
+
return Ve({ ...t, day: re(t.year, t.month) });
|
|
38
|
+
}
|
|
39
|
+
function fe(e) {
|
|
40
|
+
const t = (Ne(se(e)) + 3) % 7;
|
|
41
|
+
return (t < 0 ? t + 7 : t) + 1;
|
|
42
|
+
}
|
|
43
|
+
function ve(e, t) {
|
|
44
|
+
return Y(e, -((fe(e) - t + 7) % 7));
|
|
45
|
+
}
|
|
46
|
+
const Ke = (e, t) => Y(ve(e, t), 6);
|
|
47
|
+
function Qe(e) {
|
|
48
|
+
let t = Y(e, 1);
|
|
49
|
+
for (; fe(t) >= 6; ) t = Y(t, 1);
|
|
50
|
+
return t;
|
|
51
|
+
}
|
|
52
|
+
function ue(e = /* @__PURE__ */ new Date()) {
|
|
53
|
+
return O(e.getFullYear(), e.getMonth() + 1, e.getDate()) ?? "1970-01-01";
|
|
54
|
+
}
|
|
55
|
+
function qe(e, t) {
|
|
56
|
+
if (t.min && e < t.min || t.max && e > t.max) return !0;
|
|
57
|
+
const a = t.disabled;
|
|
58
|
+
return a ? typeof a == "function" ? a(e) : a.some((n) => typeof n == "string" ? n === e : e >= n.from && e <= n.to) : !1;
|
|
59
|
+
}
|
|
60
|
+
function ee(e, t) {
|
|
61
|
+
return t.min && e < t.min ? t.min : t.max && e > t.max ? t.max : e;
|
|
62
|
+
}
|
|
63
|
+
function Ge(e) {
|
|
64
|
+
return Se(e)?.firstDay ?? 1;
|
|
65
|
+
}
|
|
66
|
+
function Ze(e) {
|
|
67
|
+
return Se(e)?.weekend ?? [6, 7];
|
|
68
|
+
}
|
|
69
|
+
function Se(e) {
|
|
70
|
+
try {
|
|
71
|
+
const t = new Intl.Locale(e);
|
|
72
|
+
return t.getWeekInfo?.() ?? t.weekInfo ?? null;
|
|
73
|
+
} catch {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function Je(e, t, a) {
|
|
78
|
+
const n = O(e, t, 1) ?? "1970-01-01", u = le(n), m = [];
|
|
79
|
+
for (let r = ve(n, a.firstWeekday); r <= u; r = Y(r, 7))
|
|
80
|
+
m.push(
|
|
81
|
+
Array.from({ length: 7 }, (d, o) => {
|
|
82
|
+
const c = Y(r, o);
|
|
83
|
+
return {
|
|
84
|
+
day: c,
|
|
85
|
+
date: Number(c.slice(8)),
|
|
86
|
+
inMonth: c.startsWith(n.slice(0, 7)),
|
|
87
|
+
weekend: a.weekend.includes(fe(c)),
|
|
88
|
+
today: c === a.today,
|
|
89
|
+
selected: c === a.selected,
|
|
90
|
+
disabled: qe(c, a.rules)
|
|
91
|
+
};
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
return m;
|
|
95
|
+
}
|
|
96
|
+
function Xe(e, t, a, n) {
|
|
97
|
+
switch (t) {
|
|
98
|
+
case "ArrowLeft":
|
|
99
|
+
return Y(e, -1);
|
|
100
|
+
case "ArrowRight":
|
|
101
|
+
return Y(e, 1);
|
|
102
|
+
case "ArrowUp":
|
|
103
|
+
return Y(e, -7);
|
|
104
|
+
case "ArrowDown":
|
|
105
|
+
return Y(e, 7);
|
|
106
|
+
case "PageUp":
|
|
107
|
+
return a ? ye(e, -1) : H(e, -1);
|
|
108
|
+
case "PageDown":
|
|
109
|
+
return a ? ye(e, 1) : H(e, 1);
|
|
110
|
+
case "Home":
|
|
111
|
+
return ve(e, n);
|
|
112
|
+
case "End":
|
|
113
|
+
return Ke(e, n);
|
|
114
|
+
default:
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const et = {
|
|
119
|
+
class: "flex flex-col gap-2",
|
|
120
|
+
"data-test": "month-year-panel"
|
|
121
|
+
}, tt = { class: "flex items-center" }, at = ["disabled", "aria-label"], nt = ["aria-label"], lt = ["disabled", "aria-label"], ot = { class: "grid grid-cols-3 gap-1.5" }, rt = ["aria-pressed", "aria-label", "disabled", "onClick"], st = { class: "flex items-center" }, it = ["disabled", "aria-label"], ut = {
|
|
122
|
+
class: "grow text-center text-body font-semibold tabular-nums",
|
|
123
|
+
"aria-live": "polite"
|
|
124
|
+
}, dt = ["disabled", "aria-label"], ct = { class: "grid grid-cols-3 gap-1.5" }, mt = ["aria-pressed", "disabled", "onClick"], te = "flex size-8 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", xe = "min-h-9 cursor-pointer rounded-full px-1 text-subheadline focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-fill", ft = /* @__PURE__ */ B({
|
|
125
|
+
__name: "MonthYearPanel",
|
|
126
|
+
props: {
|
|
127
|
+
month: { default: null },
|
|
128
|
+
year: { default: null },
|
|
129
|
+
viewYear: { default: void 0 },
|
|
130
|
+
minYear: { default: 1 },
|
|
131
|
+
maxYear: { default: 9999 },
|
|
132
|
+
monthDisabled: { type: Function, default: void 0 }
|
|
133
|
+
},
|
|
134
|
+
emits: ["pick"],
|
|
135
|
+
setup(e, { emit: t }) {
|
|
136
|
+
const a = e, n = t, { t: u } = J(), m = (k) => Math.floor(k / 10) * 10, r = L(c(a.year ?? a.viewYear ?? (/* @__PURE__ */ new Date()).getFullYear())), d = L(!1), o = L(m(r.value));
|
|
137
|
+
oe(
|
|
138
|
+
() => a.year,
|
|
139
|
+
(k) => {
|
|
140
|
+
k !== null && (r.value = c(k));
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
function c(k) {
|
|
144
|
+
return Math.min(a.maxYear, Math.max(a.minYear, k));
|
|
145
|
+
}
|
|
146
|
+
const v = _(() => Array.from({ length: 12 }, (k, g) => o.value + g)), w = (k, g) => u(`core.form.months.${g}.${k}`), D = (k) => a.month === k && a.year === r.value;
|
|
147
|
+
function z() {
|
|
148
|
+
o.value = m(r.value), d.value = !0;
|
|
149
|
+
}
|
|
150
|
+
function S(k) {
|
|
151
|
+
r.value = k, d.value = !1;
|
|
152
|
+
}
|
|
153
|
+
const P = (k) => k ? "bg-tint font-semibold text-content-on-tint" : "bg-fill text-content-strong hover:bg-fill-strong";
|
|
154
|
+
return (k, g) => (f(), b("div", et, [
|
|
155
|
+
d.value ? (f(), b(I, { key: 1 }, [
|
|
156
|
+
h("div", st, [
|
|
157
|
+
h("button", {
|
|
158
|
+
type: "button",
|
|
159
|
+
disabled: o.value <= a.minYear,
|
|
160
|
+
"aria-label": y(u)("core.form.date.previous_years"),
|
|
161
|
+
class: $(te),
|
|
162
|
+
onClick: g[2] || (g[2] = (p) => o.value -= 12)
|
|
163
|
+
}, [
|
|
164
|
+
N(y(F), {
|
|
165
|
+
name: "arrowLeftSLine",
|
|
166
|
+
size: 18
|
|
167
|
+
})
|
|
168
|
+
], 8, it),
|
|
169
|
+
h("p", ut, M(v.value[0]) + " – " + M(v.value[11]), 1),
|
|
170
|
+
h("button", {
|
|
171
|
+
type: "button",
|
|
172
|
+
disabled: o.value + 11 >= a.maxYear,
|
|
173
|
+
"aria-label": y(u)("core.form.date.next_years"),
|
|
174
|
+
class: $(te),
|
|
175
|
+
onClick: g[3] || (g[3] = (p) => o.value += 12)
|
|
176
|
+
}, [
|
|
177
|
+
N(y(F), {
|
|
178
|
+
name: "arrowRightSLine",
|
|
179
|
+
size: 18
|
|
180
|
+
})
|
|
181
|
+
], 8, dt)
|
|
182
|
+
]),
|
|
183
|
+
h("div", ct, [
|
|
184
|
+
(f(!0), b(I, null, j(v.value, (p) => (f(), b("button", {
|
|
185
|
+
key: p,
|
|
186
|
+
type: "button",
|
|
187
|
+
"aria-pressed": a.year === p,
|
|
188
|
+
disabled: p < a.minYear || p > a.maxYear,
|
|
189
|
+
class: $([xe, "tabular-nums", P(a.year === p || a.year === null && r.value === p)]),
|
|
190
|
+
onClick: (l) => S(p)
|
|
191
|
+
}, M(p), 11, mt))), 128))
|
|
192
|
+
])
|
|
193
|
+
], 64)) : (f(), b(I, { key: 0 }, [
|
|
194
|
+
h("div", tt, [
|
|
195
|
+
h("button", {
|
|
196
|
+
type: "button",
|
|
197
|
+
disabled: r.value <= a.minYear,
|
|
198
|
+
"aria-label": y(u)("core.form.date.previous_year"),
|
|
199
|
+
class: $(te),
|
|
200
|
+
onClick: g[0] || (g[0] = (p) => r.value = c(r.value - 1))
|
|
201
|
+
}, [
|
|
202
|
+
N(y(F), {
|
|
203
|
+
name: "arrowLeftSLine",
|
|
204
|
+
size: 18
|
|
205
|
+
})
|
|
206
|
+
], 8, at),
|
|
207
|
+
h("button", {
|
|
208
|
+
type: "button",
|
|
209
|
+
"aria-label": y(u)("core.form.date.years"),
|
|
210
|
+
"aria-expanded": "false",
|
|
211
|
+
class: "flex min-h-8 grow cursor-pointer items-center justify-center gap-1 rounded-control text-lg font-semibold tabular-nums hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
212
|
+
onClick: z
|
|
213
|
+
}, [
|
|
214
|
+
Pe(M(r.value), 1),
|
|
215
|
+
N(y(F), {
|
|
216
|
+
name: "arrowDownSLine",
|
|
217
|
+
size: 14,
|
|
218
|
+
class: "text-content-link"
|
|
219
|
+
})
|
|
220
|
+
], 8, nt),
|
|
221
|
+
h("button", {
|
|
222
|
+
type: "button",
|
|
223
|
+
disabled: r.value >= a.maxYear,
|
|
224
|
+
"aria-label": y(u)("core.form.date.next_year"),
|
|
225
|
+
class: $(te),
|
|
226
|
+
onClick: g[1] || (g[1] = (p) => r.value = c(r.value + 1))
|
|
227
|
+
}, [
|
|
228
|
+
N(y(F), {
|
|
229
|
+
name: "arrowRightSLine",
|
|
230
|
+
size: 18
|
|
231
|
+
})
|
|
232
|
+
], 8, lt)
|
|
233
|
+
]),
|
|
234
|
+
h("div", ot, [
|
|
235
|
+
(f(), b(I, null, j(12, (p) => h("button", {
|
|
236
|
+
key: p,
|
|
237
|
+
type: "button",
|
|
238
|
+
"aria-pressed": D(p),
|
|
239
|
+
"aria-label": `${w(p, "long")} ${r.value}`,
|
|
240
|
+
disabled: a.monthDisabled?.(r.value, p),
|
|
241
|
+
class: $([xe, P(D(p))]),
|
|
242
|
+
onClick: (l) => n("pick", { month: p, year: r.value })
|
|
243
|
+
}, M(w(p, "short")), 11, rt)), 64))
|
|
244
|
+
])
|
|
245
|
+
], 64))
|
|
246
|
+
]));
|
|
247
|
+
}
|
|
248
|
+
}), vt = ["aria-expanded", "aria-label"], bt = ["id"], pt = ["id"], ht = ["disabled", "aria-label"], yt = ["disabled", "aria-label"], xt = ["aria-labelledby"], gt = ["aria-selected"], kt = ["data-day", "aria-label", "aria-current", "aria-disabled", "tabindex", "onClick"], ge = "flex shrink-0 cursor-pointer items-center justify-center rounded-control text-content-link hover:bg-fill disabled:cursor-default disabled:text-content-disabled disabled:hover:bg-transparent focus-visible:outline-2 focus-visible:outline-border-focus", _t = /* @__PURE__ */ B({
|
|
249
|
+
__name: "Calendar",
|
|
250
|
+
props: /* @__PURE__ */ me({
|
|
251
|
+
min: { default: null },
|
|
252
|
+
max: { default: null },
|
|
253
|
+
disabledDates: { type: [Array, Function], default: void 0 },
|
|
254
|
+
openOn: { default: null },
|
|
255
|
+
size: { default: "regular" },
|
|
256
|
+
monthPicker: { type: Boolean, default: !1 }
|
|
257
|
+
}, {
|
|
258
|
+
modelValue: { default: null },
|
|
259
|
+
modelModifiers: {}
|
|
260
|
+
}),
|
|
261
|
+
emits: ["update:modelValue"],
|
|
262
|
+
setup(e, { expose: t }) {
|
|
263
|
+
const a = e, n = de(e, "modelValue"), { t: u } = J(), m = Ce(), r = De(), d = ce("grid"), o = _(() => ({ min: a.min, max: a.max, disabled: a.disabledDates })), c = _(() => Ge(m.locale));
|
|
264
|
+
function v() {
|
|
265
|
+
return ne(n.value) ? n.value : ee(ne(a.openOn) ? a.openOn : ue(), o.value);
|
|
266
|
+
}
|
|
267
|
+
const w = R(v()), D = L({ year: w.year, month: w.month }), z = L(v()), S = L(!1);
|
|
268
|
+
oe(n, (i) => {
|
|
269
|
+
ne(i) && P(i);
|
|
270
|
+
});
|
|
271
|
+
function P(i) {
|
|
272
|
+
const x = R(i);
|
|
273
|
+
D.value = { year: x.year, month: x.month }, z.value = i;
|
|
274
|
+
}
|
|
275
|
+
const k = _(
|
|
276
|
+
() => Je(D.value.year, D.value.month, { firstWeekday: c.value, weekend: Ze(m.locale), today: ue(), selected: n.value, rules: o.value })
|
|
277
|
+
), g = _(() => O(D.value.year, D.value.month, 1) ?? "1970-01-01"), p = _(() => z.value.startsWith(g.value.slice(0, 7)) ? z.value : g.value), l = _(() => u("core.form.months.with_year", { month: u(`core.form.months.long.${D.value.month}`), year: D.value.year })), T = _(() => {
|
|
278
|
+
const i = new Intl.DateTimeFormat(m.locale, { weekday: "short", timeZone: "UTC" });
|
|
279
|
+
return Array.from({ length: 7 }, (x, C) => {
|
|
280
|
+
const Q = new Date(Date.UTC(2026, 8, 28 + (c.value - 1 + C) % 7)), V = i.format(Q).replace(/\.$/, "");
|
|
281
|
+
return V.charAt(0).toLocaleUpperCase(m.locale) + V.slice(1, 2);
|
|
282
|
+
});
|
|
283
|
+
}), s = _(() => {
|
|
284
|
+
const i = new Intl.DateTimeFormat(m.locale, { dateStyle: "full", timeZone: "UTC" });
|
|
285
|
+
return (x) => {
|
|
286
|
+
const C = R(x);
|
|
287
|
+
return i.format(new Date(Date.UTC(C.year, C.month - 1, C.day)));
|
|
288
|
+
};
|
|
289
|
+
}), A = _(() => !a.min || le(H(g.value, -1)) >= a.min), E = _(() => !a.max || H(g.value, 1) <= a.max);
|
|
290
|
+
async function K(i, x) {
|
|
291
|
+
P(i), x && (await Te(), be());
|
|
292
|
+
}
|
|
293
|
+
function be() {
|
|
294
|
+
d.value?.querySelector(`[data-day="${p.value}"]`)?.focus();
|
|
295
|
+
}
|
|
296
|
+
function Ye(i) {
|
|
297
|
+
if (i.altKey || i.ctrlKey || i.metaKey) return;
|
|
298
|
+
const x = Xe(p.value, i.key, i.shiftKey, c.value);
|
|
299
|
+
x && (i.preventDefault(), K(ee(x, o.value), !0));
|
|
300
|
+
}
|
|
301
|
+
const pe = (i) => K(ee(H(p.value, i), o.value), !1);
|
|
302
|
+
function ze(i, x) {
|
|
303
|
+
z.value = i, x || (n.value = i);
|
|
304
|
+
}
|
|
305
|
+
function Ae(i) {
|
|
306
|
+
const x = O(i.year, i.month, Math.min(Number(p.value.slice(8)), re(i.year, i.month)));
|
|
307
|
+
S.value = !1, K(ee(x ?? g.value, o.value), !0);
|
|
308
|
+
}
|
|
309
|
+
const Ie = (i, x) => {
|
|
310
|
+
const C = O(i, x, 1) ?? "";
|
|
311
|
+
return !!a.max && C > a.max || !!a.min && le(C) < a.min;
|
|
312
|
+
};
|
|
313
|
+
t({ focus: be });
|
|
314
|
+
const U = _(() => a.size === "touch");
|
|
315
|
+
function Le(i) {
|
|
316
|
+
if (i.selected) return "bg-tint font-semibold text-content-on-tint";
|
|
317
|
+
const x = i.disabled ? "cursor-default text-content-disabled line-through decoration-1" : i.inMonth ? i.weekend ? "text-content-muted" : "text-content-strong" : "text-content-disabled", C = i.today ? "font-bold text-content-link ring-[1.5px] ring-inset ring-tint" : "";
|
|
318
|
+
return [x, C, i.disabled ? "" : "hover:bg-fill"].join(" ");
|
|
319
|
+
}
|
|
320
|
+
return (i, x) => (f(), b("div", {
|
|
321
|
+
class: $(["flex flex-col", U.value ? "gap-1" : "gap-2"]),
|
|
322
|
+
"data-test": "calendar"
|
|
323
|
+
}, [
|
|
324
|
+
h("div", {
|
|
325
|
+
class: $(["flex items-center gap-1", U.value ? "px-1" : ""])
|
|
326
|
+
}, [
|
|
327
|
+
a.monthPicker ? (f(), b("button", {
|
|
328
|
+
key: 0,
|
|
329
|
+
type: "button",
|
|
330
|
+
"aria-expanded": S.value,
|
|
331
|
+
"aria-label": y(u)("core.form.date.choose_month"),
|
|
332
|
+
class: "flex min-h-8 cursor-pointer items-center gap-1 rounded-control px-1.5 py-1 text-lg font-semibold hover:bg-fill focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
333
|
+
onClick: x[0] || (x[0] = (C) => S.value = !S.value)
|
|
334
|
+
}, [
|
|
335
|
+
h("span", {
|
|
336
|
+
id: y(r),
|
|
337
|
+
"aria-live": "polite"
|
|
338
|
+
}, M(l.value), 9, bt),
|
|
339
|
+
N(y(F), {
|
|
340
|
+
name: "arrowDownSLine",
|
|
341
|
+
size: 14,
|
|
342
|
+
class: "text-content-link"
|
|
343
|
+
})
|
|
344
|
+
], 8, vt)) : (f(), b("p", {
|
|
345
|
+
key: 1,
|
|
346
|
+
id: y(r),
|
|
347
|
+
"aria-live": "polite",
|
|
348
|
+
class: $(["ml-1.5 font-semibold", U.value ? "text-headline" : "text-lg"])
|
|
349
|
+
}, M(l.value), 11, pt)),
|
|
350
|
+
x[3] || (x[3] = h("span", { class: "grow" }, null, -1)),
|
|
351
|
+
S.value ? G("", !0) : (f(), b(I, { key: 2 }, [
|
|
352
|
+
h("button", {
|
|
353
|
+
type: "button",
|
|
354
|
+
disabled: !A.value,
|
|
355
|
+
"aria-label": y(u)("core.form.date.previous_month"),
|
|
356
|
+
class: $([ge, U.value ? "size-11" : "size-8"]),
|
|
357
|
+
onClick: x[1] || (x[1] = (C) => pe(-1))
|
|
358
|
+
}, [
|
|
359
|
+
N(y(F), {
|
|
360
|
+
name: "arrowLeftSLine",
|
|
361
|
+
size: U.value ? 22 : 18
|
|
362
|
+
}, null, 8, ["size"])
|
|
363
|
+
], 10, ht),
|
|
364
|
+
h("button", {
|
|
365
|
+
type: "button",
|
|
366
|
+
disabled: !E.value,
|
|
367
|
+
"aria-label": y(u)("core.form.date.next_month"),
|
|
368
|
+
class: $([ge, U.value ? "size-11" : "size-8"]),
|
|
369
|
+
onClick: x[2] || (x[2] = (C) => pe(1))
|
|
370
|
+
}, [
|
|
371
|
+
N(y(F), {
|
|
372
|
+
name: "arrowRightSLine",
|
|
373
|
+
size: U.value ? 22 : 18
|
|
374
|
+
}, null, 8, ["size"])
|
|
375
|
+
], 10, yt)
|
|
376
|
+
], 64))
|
|
377
|
+
], 2),
|
|
378
|
+
S.value ? (f(), ie(ft, {
|
|
379
|
+
key: 0,
|
|
380
|
+
month: D.value.month,
|
|
381
|
+
year: D.value.year,
|
|
382
|
+
"min-year": a.min ? Number(a.min.slice(0, 4)) : 1,
|
|
383
|
+
"max-year": a.max ? Number(a.max.slice(0, 4)) : 9999,
|
|
384
|
+
"month-disabled": Ie,
|
|
385
|
+
onPick: Ae
|
|
386
|
+
}, null, 8, ["month", "year", "min-year", "max-year"])) : (f(), b("div", {
|
|
387
|
+
key: 1,
|
|
388
|
+
ref_key: "grid",
|
|
389
|
+
ref: d,
|
|
390
|
+
role: "grid",
|
|
391
|
+
"aria-labelledby": y(r),
|
|
392
|
+
class: $(["flex flex-col", U.value ? "gap-y-1" : "gap-0.5"]),
|
|
393
|
+
onKeydown: Ye
|
|
394
|
+
}, [
|
|
395
|
+
h("div", {
|
|
396
|
+
role: "row",
|
|
397
|
+
class: $(["grid grid-cols-7 text-center", U.value ? "" : "gap-0.5"])
|
|
398
|
+
}, [
|
|
399
|
+
(f(!0), b(I, null, j(T.value, (C, Q) => (f(), b("div", {
|
|
400
|
+
key: Q,
|
|
401
|
+
role: "columnheader",
|
|
402
|
+
class: $(["py-1 font-semibold text-content-disabled", U.value ? "text-footnote" : "text-caption"])
|
|
403
|
+
}, M(C), 3))), 128))
|
|
404
|
+
], 2),
|
|
405
|
+
(f(!0), b(I, null, j(k.value, (C, Q) => (f(), b("div", {
|
|
406
|
+
key: Q,
|
|
407
|
+
role: "row",
|
|
408
|
+
class: $(["grid grid-cols-7", U.value ? "" : "gap-0.5"])
|
|
409
|
+
}, [
|
|
410
|
+
(f(!0), b(I, null, j(C, (V) => (f(), b("div", {
|
|
411
|
+
key: V.day,
|
|
412
|
+
role: "gridcell",
|
|
413
|
+
"aria-selected": V.selected
|
|
414
|
+
}, [
|
|
415
|
+
h("button", {
|
|
416
|
+
type: "button",
|
|
417
|
+
"data-day": V.day,
|
|
418
|
+
"aria-label": s.value(V.day),
|
|
419
|
+
"aria-current": V.today ? "date" : void 0,
|
|
420
|
+
"aria-disabled": V.disabled || void 0,
|
|
421
|
+
tabindex: V.day === p.value ? 0 : -1,
|
|
422
|
+
class: $(["w-full cursor-pointer rounded-full tabular-nums transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-border-focus", [U.value ? "h-11 text-body" : "h-9 text-body", Le(V)]]),
|
|
423
|
+
onClick: (Kt) => ze(V.day, V.disabled)
|
|
424
|
+
}, M(V.date), 11, kt)
|
|
425
|
+
], 8, gt))), 128))
|
|
426
|
+
], 2))), 128))
|
|
427
|
+
], 42, xt))
|
|
428
|
+
], 2));
|
|
429
|
+
}
|
|
430
|
+
}), wt = ["aria-label"], $t = ["disabled", "aria-pressed", "onClick"], Dt = /* @__PURE__ */ B({
|
|
431
|
+
__name: "QuickChips",
|
|
432
|
+
props: {
|
|
433
|
+
items: {},
|
|
434
|
+
selected: { default: null },
|
|
435
|
+
variant: { default: "popover" }
|
|
436
|
+
},
|
|
437
|
+
emits: ["pick"],
|
|
438
|
+
setup(e, { emit: t }) {
|
|
439
|
+
const a = e, n = t, { t: u } = J();
|
|
440
|
+
return (m, r) => (f(), b("div", {
|
|
441
|
+
role: "group",
|
|
442
|
+
"aria-label": y(u)("core.form.date.quick"),
|
|
443
|
+
class: "flex flex-wrap gap-1.5",
|
|
444
|
+
"data-test": "quick-picks"
|
|
445
|
+
}, [
|
|
446
|
+
(f(!0), b(I, null, j(a.items, (d) => (f(), b("button", {
|
|
447
|
+
key: d.key,
|
|
448
|
+
type: "button",
|
|
449
|
+
disabled: d.disabled,
|
|
450
|
+
"aria-pressed": d.value === a.selected,
|
|
451
|
+
class: $(["cursor-pointer whitespace-nowrap rounded-full font-medium transition-colors duration-motion-fast focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:opacity-45", [
|
|
452
|
+
a.variant === "sheet" ? "px-3 py-2 text-subheadline" : "px-2.5 py-1.5 text-footnote",
|
|
453
|
+
d.value === a.selected ? a.variant === "sheet" ? "bg-tint text-content-on-tint" : "bg-tint-soft text-content-link" : a.variant === "sheet" ? "bg-surface-cell text-content-strong shadow-group" : "bg-fill text-content-strong hover:bg-fill-strong"
|
|
454
|
+
]]),
|
|
455
|
+
onClick: (o) => n("pick", d.value)
|
|
456
|
+
}, M(d.label), 11, $t))), 128))
|
|
457
|
+
], 8, wt));
|
|
458
|
+
}
|
|
459
|
+
}), Tt = /^(\d{2}):(\d{2})$/, ke = (e) => String(e).padStart(2, "0");
|
|
460
|
+
function Z(e, t) {
|
|
461
|
+
return !Number.isInteger(e) || !Number.isInteger(t) || e < 0 || e > 23 || t < 0 || t > 59 ? null : `${ke(e)}:${ke(t)}`;
|
|
462
|
+
}
|
|
463
|
+
function Ue(e) {
|
|
464
|
+
const t = e ? Tt.exec(e) : null;
|
|
465
|
+
return t && Z(Number(t[1]), Number(t[2])) ? { hour: Number(t[1]), minute: Number(t[2]) } : null;
|
|
466
|
+
}
|
|
467
|
+
const ea = (e) => Ue(e) !== null;
|
|
468
|
+
function Ct(e) {
|
|
469
|
+
const t = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
|
|
470
|
+
return Array.from({ length: Math.ceil(60 / t) }, (a, n) => n * t);
|
|
471
|
+
}
|
|
472
|
+
const _e = Array.from({ length: 24 }, (e, t) => t);
|
|
473
|
+
function we(e = 1, t = /* @__PURE__ */ new Date()) {
|
|
474
|
+
const a = Number.isInteger(e) && e >= 1 && e <= 30 ? e : 1;
|
|
475
|
+
return Z(t.getHours(), t.getMinutes() - t.getMinutes() % a) ?? "00:00";
|
|
476
|
+
}
|
|
477
|
+
function ta(e, t = 1) {
|
|
478
|
+
const a = e.trim().toLowerCase();
|
|
479
|
+
let n, u;
|
|
480
|
+
const m = /^(\d{1,2})\s*[:.,h]\s*(\d{1,2})?$/.exec(a);
|
|
481
|
+
if (m)
|
|
482
|
+
n = Number(m[1]), u = m[2] === void 0 ? 0 : Number(m[2]);
|
|
483
|
+
else if (/^\d{1,2}$/.test(a))
|
|
484
|
+
n = Number(a), u = 0;
|
|
485
|
+
else if (/^\d{3,4}$/.test(a))
|
|
486
|
+
n = Number(a.slice(0, -2)), u = Number(a.slice(-2));
|
|
487
|
+
else return { error: "invalid" };
|
|
488
|
+
const r = Z(n, u);
|
|
489
|
+
return r ? t > 1 && u % t !== 0 ? { error: "step" } : { time: r } : { error: "invalid" };
|
|
490
|
+
}
|
|
491
|
+
const Mt = (e, t) => `${e}T${t}`;
|
|
492
|
+
function Vt(e) {
|
|
493
|
+
const t = e ? /^(\d{4}-\d{2}-\d{2})(?:[T ](\d{2}:\d{2}))?/.exec(e) : null;
|
|
494
|
+
return { day: t?.[1] ?? null, time: t?.[2] ?? null };
|
|
495
|
+
}
|
|
496
|
+
const Nt = ["aria-label", "aria-activedescendant"], St = ["id", "aria-selected", "data-value", "onClick"], Ut = ["aria-label", "aria-activedescendant"], Yt = ["id", "aria-selected", "data-value", "onClick"], q = 30, $e = 150, ae = /* @__PURE__ */ B({
|
|
497
|
+
__name: "ValueColumn",
|
|
498
|
+
props: /* @__PURE__ */ me({
|
|
499
|
+
values: {},
|
|
500
|
+
label: {},
|
|
501
|
+
variant: { default: "list" }
|
|
502
|
+
}, {
|
|
503
|
+
modelValue: { default: null },
|
|
504
|
+
modelModifiers: {}
|
|
505
|
+
}),
|
|
506
|
+
emits: ["update:modelValue"],
|
|
507
|
+
setup(e) {
|
|
508
|
+
const t = e, a = de(e, "modelValue"), n = ($e - q) / 2, u = De(), m = ce("scroller"), r = Oe("(prefers-reduced-motion: reduce)"), d = _(() => a.value === null ? -1 : t.values.indexOf(a.value)), o = L(Math.max(0, d.value));
|
|
509
|
+
let c;
|
|
510
|
+
const v = (l) => String(l).padStart(2, "0"), w = (l) => `${u}-${l}`;
|
|
511
|
+
function D(l) {
|
|
512
|
+
l !== void 0 && (a.value = l);
|
|
513
|
+
}
|
|
514
|
+
function z(l) {
|
|
515
|
+
const T = t.values.length - 1, s = d.value, E = {
|
|
516
|
+
ArrowDown: s < 0 ? 0 : Math.min(T, s + 1),
|
|
517
|
+
ArrowUp: s < 0 ? 0 : Math.max(0, s - 1),
|
|
518
|
+
PageDown: s < 0 ? 0 : Math.min(T, s + 5),
|
|
519
|
+
PageUp: s < 0 ? 0 : Math.max(0, s - 5),
|
|
520
|
+
Home: 0,
|
|
521
|
+
End: T
|
|
522
|
+
}[l.key];
|
|
523
|
+
E !== void 0 && (l.preventDefault(), D(t.values[E]));
|
|
524
|
+
}
|
|
525
|
+
function S(l) {
|
|
526
|
+
D(l);
|
|
527
|
+
}
|
|
528
|
+
function P(l, T) {
|
|
529
|
+
const s = m.value;
|
|
530
|
+
if (!s || l < 0 || typeof s.scrollTo != "function") return;
|
|
531
|
+
const A = T || r.value ? "instant" : "smooth";
|
|
532
|
+
if (t.variant === "wheel") {
|
|
533
|
+
Math.abs(s.scrollTop - l * q) > 1 && s.scrollTo({ top: l * q, behavior: A });
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
const E = s.querySelector(`[data-value="${t.values[l]}"]`);
|
|
537
|
+
if (!E) return;
|
|
538
|
+
const K = E.offsetTop - (s.clientHeight - E.offsetHeight) / 2;
|
|
539
|
+
s.scrollTo({ top: Math.max(0, K), behavior: A });
|
|
540
|
+
}
|
|
541
|
+
function k() {
|
|
542
|
+
const l = m.value;
|
|
543
|
+
t.variant !== "wheel" || !l || (o.value = Math.min(t.values.length - 1, Math.max(0, Math.round(l.scrollTop / q))), clearTimeout(c), c = setTimeout(() => {
|
|
544
|
+
const T = t.values[o.value];
|
|
545
|
+
T !== void 0 && T !== a.value && (a.value = T);
|
|
546
|
+
}, 90));
|
|
547
|
+
}
|
|
548
|
+
Ee(() => void Te(() => P(d.value, !0))), Fe(() => clearTimeout(c)), oe(d, (l) => {
|
|
549
|
+
o.value = Math.max(0, l), P(l, !1);
|
|
550
|
+
});
|
|
551
|
+
const g = (l) => Math.abs(l - o.value), p = (l) => g(l) === 0 ? "text-[22px] font-semibold text-content-strong" : g(l) === 1 ? "text-[19px] text-content-muted" : "text-base text-content-disabled";
|
|
552
|
+
return (l, T) => t.variant === "list" ? (f(), b("div", {
|
|
553
|
+
key: 0,
|
|
554
|
+
ref_key: "scroller",
|
|
555
|
+
ref: m,
|
|
556
|
+
role: "listbox",
|
|
557
|
+
tabindex: "0",
|
|
558
|
+
"aria-label": t.label,
|
|
559
|
+
"aria-activedescendant": d.value >= 0 ? w(t.values[d.value]) : void 0,
|
|
560
|
+
class: "relative flex min-w-0 grow flex-col gap-0.5 overflow-y-auto rounded-control [scrollbar-width:none] focus-visible:outline-2 focus-visible:outline-border-focus [&::-webkit-scrollbar]:hidden",
|
|
561
|
+
onKeydown: z
|
|
562
|
+
}, [
|
|
563
|
+
(f(!0), b(I, null, j(t.values, (s) => (f(), b("div", {
|
|
564
|
+
id: w(s),
|
|
565
|
+
key: s,
|
|
566
|
+
role: "option",
|
|
567
|
+
"aria-selected": s === a.value,
|
|
568
|
+
"data-value": s,
|
|
569
|
+
class: $(["flex min-h-6.5 shrink-0 cursor-pointer items-center justify-center rounded-md text-body tabular-nums transition-colors duration-motion-fast", s === a.value ? "bg-tint font-semibold text-content-on-tint" : "text-content-strong hover:bg-fill"]),
|
|
570
|
+
onClick: (A) => S(s)
|
|
571
|
+
}, M(v(s)), 11, St))), 128))
|
|
572
|
+
], 40, Nt)) : (f(), b("div", {
|
|
573
|
+
key: 1,
|
|
574
|
+
ref_key: "scroller",
|
|
575
|
+
ref: m,
|
|
576
|
+
role: "listbox",
|
|
577
|
+
tabindex: "0",
|
|
578
|
+
"aria-label": t.label,
|
|
579
|
+
"aria-activedescendant": d.value >= 0 ? w(t.values[d.value]) : void 0,
|
|
580
|
+
class: "relative w-16 snap-y snap-mandatory overflow-y-auto overscroll-contain rounded-control [scrollbar-width:none] focus-visible:outline-2 focus-visible:outline-border-focus [&::-webkit-scrollbar]:hidden",
|
|
581
|
+
style: X({ height: `${$e}px` }),
|
|
582
|
+
onScrollPassive: k,
|
|
583
|
+
onKeydown: z
|
|
584
|
+
}, [
|
|
585
|
+
h("div", {
|
|
586
|
+
style: X({ height: `${n}px` }),
|
|
587
|
+
"aria-hidden": "true"
|
|
588
|
+
}, null, 4),
|
|
589
|
+
(f(!0), b(I, null, j(t.values, (s, A) => (f(), b("div", {
|
|
590
|
+
id: w(s),
|
|
591
|
+
key: s,
|
|
592
|
+
role: "option",
|
|
593
|
+
"aria-selected": s === a.value,
|
|
594
|
+
"data-value": s,
|
|
595
|
+
class: $(["flex cursor-pointer snap-center items-center justify-center tabular-nums", p(A)]),
|
|
596
|
+
style: X({ height: `${q}px` }),
|
|
597
|
+
onClick: (E) => S(s)
|
|
598
|
+
}, M(v(s)), 15, Yt))), 128)),
|
|
599
|
+
h("div", {
|
|
600
|
+
style: X({ height: `${n}px` }),
|
|
601
|
+
"aria-hidden": "true"
|
|
602
|
+
}, null, 4)
|
|
603
|
+
], 44, Ut));
|
|
604
|
+
}
|
|
605
|
+
}), zt = {
|
|
606
|
+
key: 0,
|
|
607
|
+
class: "flex h-49 gap-1.5",
|
|
608
|
+
"data-test": "time-columns"
|
|
609
|
+
}, At = {
|
|
610
|
+
key: 1,
|
|
611
|
+
class: "relative flex items-center justify-center gap-1",
|
|
612
|
+
"data-test": "time-columns"
|
|
613
|
+
}, It = /* @__PURE__ */ B({
|
|
614
|
+
__name: "TimeColumns",
|
|
615
|
+
props: /* @__PURE__ */ me({
|
|
616
|
+
step: { default: 1 },
|
|
617
|
+
variant: { default: "list" }
|
|
618
|
+
}, {
|
|
619
|
+
modelValue: { default: null },
|
|
620
|
+
modelModifiers: {}
|
|
621
|
+
}),
|
|
622
|
+
emits: ["update:modelValue"],
|
|
623
|
+
setup(e) {
|
|
624
|
+
const t = e, a = de(e, "modelValue"), { t: n } = J(), u = _(() => Ue(a.value)), m = _(() => Ct(t.step)), r = _({
|
|
625
|
+
get: () => u.value?.hour ?? null,
|
|
626
|
+
set: (o) => {
|
|
627
|
+
o !== null && (a.value = Z(o, u.value?.minute ?? 0));
|
|
628
|
+
}
|
|
629
|
+
}), d = _({
|
|
630
|
+
get: () => u.value?.minute ?? null,
|
|
631
|
+
set: (o) => {
|
|
632
|
+
o !== null && (a.value = Z(u.value?.hour ?? 0, o));
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
return (o, c) => t.variant === "list" ? (f(), b("div", zt, [
|
|
636
|
+
N(ae, {
|
|
637
|
+
modelValue: r.value,
|
|
638
|
+
"onUpdate:modelValue": c[0] || (c[0] = (v) => r.value = v),
|
|
639
|
+
values: y(_e),
|
|
640
|
+
label: y(n)("core.form.time.hour")
|
|
641
|
+
}, null, 8, ["modelValue", "values", "label"]),
|
|
642
|
+
N(ae, {
|
|
643
|
+
modelValue: d.value,
|
|
644
|
+
"onUpdate:modelValue": c[1] || (c[1] = (v) => d.value = v),
|
|
645
|
+
values: m.value,
|
|
646
|
+
label: y(n)("core.form.time.minute")
|
|
647
|
+
}, null, 8, ["modelValue", "values", "label"])
|
|
648
|
+
])) : (f(), b("div", At, [
|
|
649
|
+
c[4] || (c[4] = h("div", {
|
|
650
|
+
class: "pointer-events-none absolute inset-x-0 h-9 rounded-lg bg-fill",
|
|
651
|
+
"aria-hidden": "true"
|
|
652
|
+
}, null, -1)),
|
|
653
|
+
N(ae, {
|
|
654
|
+
modelValue: r.value,
|
|
655
|
+
"onUpdate:modelValue": c[2] || (c[2] = (v) => r.value = v),
|
|
656
|
+
values: y(_e),
|
|
657
|
+
label: y(n)("core.form.time.hour"),
|
|
658
|
+
variant: "wheel",
|
|
659
|
+
class: "relative"
|
|
660
|
+
}, null, 8, ["modelValue", "values", "label"]),
|
|
661
|
+
c[5] || (c[5] = h("span", {
|
|
662
|
+
class: "relative text-[22px] font-semibold",
|
|
663
|
+
"aria-hidden": "true"
|
|
664
|
+
}, ":", -1)),
|
|
665
|
+
N(ae, {
|
|
666
|
+
modelValue: d.value,
|
|
667
|
+
"onUpdate:modelValue": c[3] || (c[3] = (v) => d.value = v),
|
|
668
|
+
values: m.value,
|
|
669
|
+
label: y(n)("core.form.time.minute"),
|
|
670
|
+
variant: "wheel",
|
|
671
|
+
class: "relative"
|
|
672
|
+
}, null, 8, ["modelValue", "values", "label"])
|
|
673
|
+
]));
|
|
674
|
+
}
|
|
675
|
+
}), Lt = { class: "flex min-h-bar-height items-center gap-2 px-4 pb-1" }, Pt = ["disabled"], Et = ["id"], Ft = {
|
|
676
|
+
class: "flex flex-col gap-3.5",
|
|
677
|
+
"data-test": "date-picker-sheet"
|
|
678
|
+
}, jt = {
|
|
679
|
+
key: 1,
|
|
680
|
+
class: "rounded-group bg-surface-cell p-2.5 shadow-group"
|
|
681
|
+
}, Ot = {
|
|
682
|
+
key: 2,
|
|
683
|
+
class: "flex items-center gap-2 rounded-group bg-surface-cell px-4 py-2 shadow-group"
|
|
684
|
+
}, Wt = {
|
|
685
|
+
key: 0,
|
|
686
|
+
class: "w-22 shrink-0 text-body"
|
|
687
|
+
}, Rt = { class: "flex grow justify-center" }, Ht = {
|
|
688
|
+
class: "min-h-5 text-center text-subheadline text-content-muted",
|
|
689
|
+
"aria-live": "polite"
|
|
690
|
+
}, aa = /* @__PURE__ */ B({
|
|
691
|
+
__name: "DatePickerSheet",
|
|
692
|
+
props: {
|
|
693
|
+
title: {},
|
|
694
|
+
mode: {},
|
|
695
|
+
modelValue: { default: null },
|
|
696
|
+
min: { default: null },
|
|
697
|
+
max: { default: null },
|
|
698
|
+
disabledDates: { type: [Array, Function], default: void 0 },
|
|
699
|
+
openOn: { default: null },
|
|
700
|
+
shortcuts: { default: () => [] },
|
|
701
|
+
step: { default: 1 },
|
|
702
|
+
clearable: { type: Boolean, default: !0 }
|
|
703
|
+
},
|
|
704
|
+
emits: ["update:modelValue"],
|
|
705
|
+
setup(e, { expose: t, emit: a }) {
|
|
706
|
+
const n = e, u = a, { t: m } = J(), r = Ce(), d = ce("sheet"), o = _(() => n.mode !== "time"), c = _(() => n.mode !== "date"), v = L(null), w = L(null);
|
|
707
|
+
function D() {
|
|
708
|
+
const l = n.mode === "time" ? { day: null, time: n.modelValue } : n.mode === "date" ? { day: n.modelValue, time: null } : Vt(n.modelValue);
|
|
709
|
+
v.value = ne(l.day) ? l.day : null, w.value = c.value ? l.time ?? we(n.step) : null, d.value?.present();
|
|
710
|
+
}
|
|
711
|
+
function z() {
|
|
712
|
+
return n.mode === "time" ? w.value : v.value ? n.mode === "date" ? v.value : Mt(v.value, w.value ?? we(n.step)) : null;
|
|
713
|
+
}
|
|
714
|
+
function S() {
|
|
715
|
+
u("update:modelValue", z()), d.value?.dismiss();
|
|
716
|
+
}
|
|
717
|
+
function P() {
|
|
718
|
+
u("update:modelValue", null), d.value?.dismiss();
|
|
719
|
+
}
|
|
720
|
+
function k(l) {
|
|
721
|
+
n.mode === "time" ? w.value = l : v.value = l;
|
|
722
|
+
}
|
|
723
|
+
function g(l) {
|
|
724
|
+
w.value = l, o.value && !v.value && (v.value = ue());
|
|
725
|
+
}
|
|
726
|
+
const p = _(() => {
|
|
727
|
+
const l = (T) => {
|
|
728
|
+
const s = R(T), A = new Intl.DateTimeFormat(r.locale, { dateStyle: "full", timeZone: "UTC" }).format(new Date(Date.UTC(s.year, s.month - 1, s.day)));
|
|
729
|
+
return A.charAt(0).toLocaleUpperCase(r.locale) + A.slice(1);
|
|
730
|
+
};
|
|
731
|
+
return n.mode === "time" ? w.value ?? "" : v.value ? n.mode === "date" || !w.value ? l(v.value) : m("core.form.time.at", { date: l(v.value), time: w.value }) : "";
|
|
732
|
+
});
|
|
733
|
+
return t({ present: D, dismiss: () => d.value?.dismiss() }), (l, T) => (f(), ie(je, {
|
|
734
|
+
ref_key: "sheet",
|
|
735
|
+
ref: d,
|
|
736
|
+
title: n.title,
|
|
737
|
+
grouped: ""
|
|
738
|
+
}, {
|
|
739
|
+
header: he(({ titleId: s }) => [
|
|
740
|
+
h("div", Lt, [
|
|
741
|
+
h("button", {
|
|
742
|
+
type: "button",
|
|
743
|
+
disabled: !n.clearable,
|
|
744
|
+
class: "min-w-16 cursor-pointer py-1.5 text-start text-headline text-content-link focus-visible:outline-2 focus-visible:outline-border-focus disabled:cursor-default disabled:text-content-disabled",
|
|
745
|
+
onClick: P
|
|
746
|
+
}, M(y(m)("core.form.select.clear")), 9, Pt),
|
|
747
|
+
h("h3", {
|
|
748
|
+
id: s,
|
|
749
|
+
class: "min-w-0 grow truncate text-center text-headline font-semibold"
|
|
750
|
+
}, M(n.title), 9, Et),
|
|
751
|
+
h("button", {
|
|
752
|
+
type: "button",
|
|
753
|
+
class: "min-w-16 cursor-pointer py-1.5 text-end text-headline font-semibold text-content-link focus-visible:outline-2 focus-visible:outline-border-focus",
|
|
754
|
+
onClick: S
|
|
755
|
+
}, M(y(m)("core.form.select.done")), 1)
|
|
756
|
+
])
|
|
757
|
+
]),
|
|
758
|
+
default: he(() => [
|
|
759
|
+
h("div", Ft, [
|
|
760
|
+
n.shortcuts.length > 0 ? (f(), ie(Dt, {
|
|
761
|
+
key: 0,
|
|
762
|
+
variant: "sheet",
|
|
763
|
+
items: n.shortcuts,
|
|
764
|
+
selected: n.mode === "time" ? w.value : v.value,
|
|
765
|
+
onPick: k
|
|
766
|
+
}, null, 8, ["items", "selected"])) : G("", !0),
|
|
767
|
+
o.value ? (f(), b("div", jt, [
|
|
768
|
+
N(_t, {
|
|
769
|
+
modelValue: v.value,
|
|
770
|
+
"onUpdate:modelValue": T[0] || (T[0] = (s) => v.value = s),
|
|
771
|
+
size: "touch",
|
|
772
|
+
min: n.min,
|
|
773
|
+
max: n.max,
|
|
774
|
+
"disabled-dates": n.disabledDates,
|
|
775
|
+
"open-on": n.openOn
|
|
776
|
+
}, null, 8, ["modelValue", "min", "max", "disabled-dates", "open-on"])
|
|
777
|
+
])) : G("", !0),
|
|
778
|
+
c.value ? (f(), b("div", Ot, [
|
|
779
|
+
o.value ? (f(), b("p", Wt, M(y(m)("core.form.time.label")), 1)) : G("", !0),
|
|
780
|
+
h("div", Rt, [
|
|
781
|
+
N(It, {
|
|
782
|
+
"model-value": w.value,
|
|
783
|
+
variant: "wheel",
|
|
784
|
+
step: n.step,
|
|
785
|
+
"onUpdate:modelValue": g
|
|
786
|
+
}, null, 8, ["model-value", "step"])
|
|
787
|
+
])
|
|
788
|
+
])) : G("", !0),
|
|
789
|
+
h("p", Ht, M(p.value), 1)
|
|
790
|
+
])
|
|
791
|
+
]),
|
|
792
|
+
_: 1
|
|
793
|
+
}, 8, ["title"]));
|
|
794
|
+
}
|
|
795
|
+
}), na = (e) => e ? ["today", "tomorrow", "next-working-day"] : ["today", "tomorrow", "week", "month-end"], la = ["now", "08:00", "12:00"], Bt = {
|
|
796
|
+
today: (e) => e,
|
|
797
|
+
tomorrow: (e) => Y(e, 1),
|
|
798
|
+
week: (e) => Y(e, 7),
|
|
799
|
+
"month-end": (e) => le(e),
|
|
800
|
+
"next-working-day": (e) => Qe(e)
|
|
801
|
+
};
|
|
802
|
+
function oa(e, t, a) {
|
|
803
|
+
return typeof e == "string" ? { key: e, label: t(e), value: Bt[e](a) } : { key: e.label, label: e.label, value: e.day(a) };
|
|
804
|
+
}
|
|
805
|
+
function ra(e, t, a) {
|
|
806
|
+
return e === "now" ? { key: "now", label: t, value: a } : typeof e == "string" ? { key: e, label: `${Number(e.slice(0, 2))}${e.slice(2)}`, value: e } : { key: e.label, label: e.label, value: e.time() };
|
|
807
|
+
}
|
|
808
|
+
function sa(e) {
|
|
809
|
+
const t = L(null), a = L(), n = _(() => t.value ?? (e.model.value ? e.display(e.model.value) : "")), u = _(() => {
|
|
810
|
+
if (t.value === null || t.value.trim() === "") return null;
|
|
811
|
+
const o = e.parse(t.value);
|
|
812
|
+
return "value" in o ? o.value : null;
|
|
813
|
+
});
|
|
814
|
+
function m(o) {
|
|
815
|
+
t.value = o, a.value = void 0;
|
|
816
|
+
}
|
|
817
|
+
function r(o) {
|
|
818
|
+
t.value = null, a.value = void 0, e.model.value = o;
|
|
819
|
+
}
|
|
820
|
+
function d() {
|
|
821
|
+
if (t.value === null) return;
|
|
822
|
+
if (t.value.trim() === "") return r(null);
|
|
823
|
+
const o = e.parse(t.value);
|
|
824
|
+
if ("error" in o) {
|
|
825
|
+
a.value = o.error, e.model.value !== null && (e.model.value = null);
|
|
826
|
+
return;
|
|
827
|
+
}
|
|
828
|
+
r(o.value);
|
|
829
|
+
}
|
|
830
|
+
return oe(e.model, (o) => {
|
|
831
|
+
o === null && a.value || (t.value = null, a.value = void 0);
|
|
832
|
+
}), { text: n, typed: u, message: a, input: m, commit: d, set: r };
|
|
833
|
+
}
|
|
834
|
+
export {
|
|
835
|
+
aa as _,
|
|
836
|
+
Ue as a,
|
|
837
|
+
It as b,
|
|
838
|
+
Dt as c,
|
|
839
|
+
la as d,
|
|
840
|
+
ue as e,
|
|
841
|
+
Y as f,
|
|
842
|
+
qe as g,
|
|
843
|
+
na as h,
|
|
844
|
+
ea as i,
|
|
845
|
+
oa as j,
|
|
846
|
+
ne as k,
|
|
847
|
+
_t as l,
|
|
848
|
+
O as m,
|
|
849
|
+
Z as n,
|
|
850
|
+
Mt as o,
|
|
851
|
+
ta as p,
|
|
852
|
+
ft as q,
|
|
853
|
+
ra as r,
|
|
854
|
+
Vt as s,
|
|
855
|
+
we as t,
|
|
856
|
+
sa as u
|
|
857
|
+
};
|