@astryx-vue/core 0.13.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-CsdgJDLK.js → AlertDialog-BH74lTP9.js} +4 -4
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-CE5Up5SI.js → AppShell-CBhuHXh4.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-D5CFSkAG.js → Avatar-B-dg3imS.js} +1 -1
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Banner/index.js +1 -1
- package/dist/{Banner-B4IEG4Fx.js → Banner-qEMqg2D8.js} +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.js +2 -2
- package/dist/{BottomSheet-D67lQ3Lo.js → BottomSheet-BTf3rz65.js} +3 -3
- package/dist/{BottomSheet-UctSPL-g.js → BottomSheet-BvdEUioy.js} +3 -3
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-By21sIml.js → Breadcrumbs-BAyIQaP-.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/{Button-CfbR2oPc.js → Button-47s3ZBYa.js} +2 -2
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-DwFAzDky.js → Calendar-D029GXOJ.js} +1 -1
- package/dist/Carousel/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-mL_KdBMw.js → Carousel-CYjVpChx.js} +1 -1
- package/dist/Center/index.d.ts +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-C10BQlIl.js → Chat-BfekV9OQ.js} +5 -5
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-BGqRMoEA.js → CheckboxInput-Cr0qhZpZ.js} +2 -2
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-DbMhC06M.js → CheckboxList-DOAdqkXD.js} +4 -4
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-DAlWY51H.js → CodeBlock-CuNiGAhQ.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-DYk_FyFB.js → CommandPalette-ChtGNWy3.js} +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-NDpRucQB.js → ComplexSelector-TPRMIDgt.js} +3 -3
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-JDU4HDKm.js → ContextMenu-DYKU1mJT.js} +5 -5
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-DVEb1-fM.js → DateInput-iQQLaYlp.js} +562 -123
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-OuAz80nR.js → DateRangeInput-BTYlRhmn.js} +14 -11
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-J5CFTSSa.js → DateTimeInput-CiUKgoVy.js} +19 -11
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Dialog/index.js +3 -3
- package/dist/{Dialog-C0WuGDqP.js → Dialog-D54oHAxr.js} +3 -3
- package/dist/{Dialog-Cm8CXGpI.js → Dialog-DeHVvhL3.js} +1 -1
- package/dist/{DialogHeader-BD2Ezw4F.js → DialogHeader-B6ZIBIC4.js} +2 -2
- package/dist/Drawer/index.d.ts +1 -1
- package/dist/Drawer/index.js +1 -1
- package/dist/{Drawer-CFpcRHt7.js → Drawer-fB3IoD5P.js} +2 -2
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/{DropdownMenu-2QRvY0aP.js → DropdownMenu-ClBIeBwM.js} +6 -6
- package/dist/{DropdownMenu-5Mn01A-5.js → DropdownMenu-D5fBg5Cc.js} +3 -3
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-CqUTEnGg.js → EmptyState-BS8ESteS.js} +2 -2
- package/dist/Field/index.js +3 -3
- package/dist/{Field-Cw8J8ld7.js → Field-Dxacpe9d.js} +2 -2
- package/dist/{FieldInfoTip-D7UNDNje.js → FieldInfoTip-DS4OAl2Q.js} +1 -1
- package/dist/{FieldLabel-CJbiefUx.js → FieldLabel-DjzTYhCM.js} +2 -2
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-CgfiwVfs.js → FileInput-Dak2gIXU.js} +3 -3
- package/dist/FormLayout/index.d.ts +2 -2
- package/dist/FormLayout/index.js +1 -1
- package/dist/{FormLayout-B9dUB6Ps.js → FormLayout-CGJVeNsL.js} +5 -3
- package/dist/Heading/index.js +1 -1
- package/dist/{Heading-BO9n2vLl.js → Heading-BYB7QXkT.js} +1 -1
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/HoverCard/index.js +1 -1
- package/dist/{HoverCard-47J_i9AH.js → HoverCard-CtDr234t.js} +4 -4
- package/dist/IconButton/index.js +1 -1
- package/dist/{IconButton-DiDHiGbo.js → IconButton-DvgueAEp.js} +1 -1
- package/dist/InfoTip/index.d.ts +1 -1
- package/dist/InfoTip/index.js +1 -1
- package/dist/{InfoTip-ClRC1Hh9.js → InfoTip-DshbO5eW.js} +1 -1
- package/dist/{InputClearButton-DL4RM5z1.js → InputClearButton-DEb-bGsY.js} +1 -1
- package/dist/InputGroup/index.js +1 -1
- package/dist/{InputGroup-JMOrdsmu.js → InputGroup-DLu11Lsd.js} +1 -1
- package/dist/InternationalizationProvider/index.d.ts +1 -1
- package/dist/InternationalizationProvider/index.js +1 -1
- package/dist/{InternationalizationProvider-BYU2MRtX.js → InternationalizationProvider-CqCxB9ku.js} +1 -1
- package/dist/{LayerContentBoundary-CeebKoPB.js → LayerContentBoundary-Cx5xXZzg.js} +1 -1
- package/dist/Layout/index.d.ts +1 -1
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-kKjxYZ05.js → Lightbox-BbeuDbgd.js} +3 -3
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/{Link-CkbAlJ3-.js → Link-CFxZ9W2X.js} +1 -1
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-DXRFVNJd.js → Markdown-DTqTIKbq.js} +3 -3
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DUtvvHc7.js → MobileNavToggle-pwkvRFW-.js} +3 -3
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-CEJ9E2eD.js → MoreMenu-BY1t1_QA.js} +4 -4
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-DgWCWpnM.js → MultiSelector-BgGEzXiX.js} +8 -7
- package/dist/{NavDisclosure-Bf5OFtwv.js → NavDisclosure-mXBWmRDC.js} +1 -1
- package/dist/{NavHeadingSurface-D5MpO-gO.js → NavHeadingSurface-foJo5bLT.js} +1 -1
- package/dist/NavMenu/index.js +3 -3
- package/dist/{NavMenu-BcmUfk7z.js → NavMenu-CG9Bthba.js} +2 -2
- package/dist/{NavMenuItem-C9xk9KZk.js → NavMenuItem-BiFZUPxC.js} +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DNcE_HLD.js → NumberInput-BDNiEgzf.js} +5 -5
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-CeQT7MBd.js → OverflowList-CR96Nr5t.js} +2 -2
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DJGQe6wH.js → Pagination-40BEwZOo.js} +1 -1
- package/dist/{PickerWheel-CSwUYfes.js → PickerWheel-DNX3yrUd.js} +21 -8
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-C68nCirC.js → Popover-BUiTyOcY.js} +6 -6
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-C6lkutch.js → PowerSearch-BLJd0NKp.js} +18 -18
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-MaDhabCm.js → ProgressBar-sGSCEtHC.js} +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-CLQLK_V7.js → RadioGroup-D58Fy-bM.js} +3 -3
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-DfHTyqIQ.js → RadioList-u9PoRBXY.js} +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-CPCoJ7Sb.js → Selector-QHLh7g_K.js} +7 -6
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-CV8MKVL-.js → SideNav-BgmpUELq.js} +5 -5
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-CHJ1CESd.js → Slider-Depy9L-Y.js} +2 -2
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-CGaRrl39.js → StatusDot-D0Wy2ggp.js} +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-Bx9ezhrN.js → Switch-dD4OQLkI.js} +2 -2
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-o4t9vWvl.js → TabList-CoiyQidC.js} +1 -1
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +2 -2
- package/dist/{Table-CO2cYE8r.js → Table-CIMUux6b.js} +1335 -219
- package/dist/Text/index.js +1 -1
- package/dist/{Text-C6SB2hHJ.js → Text-BWSmB93V.js} +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-DVaDS_1K.js → TextArea-CbY2w_ic.js} +6 -6
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-Dylfzj33.js → TextInput-C8f89GV8.js} +6 -6
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-BTQAYnWi.js → Thumbnail-DENhXd9-.js} +2 -2
- package/dist/{TimeField-B3JGgLuf.js → TimeField-Bzq72Me_.js} +8 -8
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-Dmy6PxaD.js → TimeInput-D-bRCUzU.js} +3 -3
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-CN5BmaFS.js → Timer-CgBSMr9E.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-B7UcCEo2.js → Timestamp-B-VgG6l8.js} +3 -3
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-DCipbbCW.js → Toast-CRSZV9K-.js} +1 -1
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/ToggleButton/index.js +1 -1
- package/dist/{ToggleButton-C78lrcdr.js → ToggleButton-Bm5IQUy5.js} +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-D7B1ff3O.js → Tokenizer-DmjNQLDl.js} +6 -6
- package/dist/Toolbar/index.d.ts +2 -2
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +2 -2
- package/dist/{Tooltip-kQPfj3SE.js → Tooltip-BwrJVZ8X.js} +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-AGY785QI.js → TopNav-FiszUHkM.js} +4 -4
- package/dist/Typeahead/index.js +2 -2
- package/dist/{Typeahead-QWYeVsel.js → Typeahead-LdmEDCOU.js} +6 -6
- package/dist/busyAnnouncement-D3eGqdsf.js +88 -0
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +11 -11
- package/dist/{composables-CyKB3F8u.js → composables-Bi0Rt0Uj.js} +2 -2
- package/dist/{context-Cfml4jaK.js → context-DsNhYm5O.js} +6 -1
- package/dist/{date-input-CiEBtStM.js → date-input-rUD8YAow.js} +4 -0
- package/dist/{utils-BOmFijPc.js → dateParser-DS_a8Ej8.js} +1 -329
- package/dist/{fieldParts-CDOlBdy6.js → fieldParts-CbWvZLhH.js} +1 -1
- package/dist/{format-CiN0Dt_H.js → format-CMHyAMn3.js} +28 -1
- package/dist/{index-Cun6cXGP.d.ts → index--tm6L1ot.d.ts} +1 -1
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-D7YRtteD.d.ts → index-BHYhTZzp.d.ts} +1 -1
- package/dist/{index-ZbNwGVkS.d.ts → index-BKnyTWPM.d.ts} +1 -1
- package/dist/{index-Bl_K_cRv.d.ts → index-BL4mH8aK.d.ts} +2 -2
- package/dist/{index-9YGUb_Ht.d.ts → index-BlGEkjh5.d.ts} +3 -3
- package/dist/{index-Dlq0cFK-.d.ts → index-C5e2rZML.d.ts} +1 -1
- package/dist/{index-BOCb89V9.d.ts → index-CP-fJFcJ.d.ts} +3 -3
- package/dist/{index-CVs4A2QU.d.ts → index-Cf5j7Cjl.d.ts} +2 -1
- package/dist/{index-BWaO4-T-.d.ts → index-D-eT_nvf.d.ts} +125 -32
- package/dist/{index-FeZXsFO-.d.ts → index-DDrL_-hJ.d.ts} +1 -1
- package/dist/{index-s0Ezq3U-.d.ts → index-DPH5yoAr.d.ts} +2 -2
- package/dist/{index-DPhQZXYw.d.ts → index-DYabo8TI.d.ts} +1 -1
- package/dist/{index-C90l2rH1.d.ts → index-DcisK4t8.d.ts} +11 -1
- package/dist/{index-BpprL2SN.d.ts → index-DfdtDWSP.d.ts} +5 -1
- package/dist/{index-B-3EGjfQ.d.ts → index-Q1oG9yIT.d.ts} +2 -2
- package/dist/{index-CREW8ZiL.d.ts → index-bwNMoZo_.d.ts} +3 -3
- package/dist/{index-CcYSAva-.d.ts → index-fd--aE4B.d.ts} +1 -1
- package/dist/{index-Dep8pgnU.d.ts → index-qbj0Lj9a.d.ts} +4 -4
- package/dist/{index-bgjrSSaT.d.ts → index-rnFsCdJ7.d.ts} +2 -2
- package/dist/{index-CfoExOY_.d.ts → index-rzkX36wM.d.ts} +1 -1
- package/dist/index.d.ts +26 -26
- package/dist/index.js +95 -93
- package/dist/{layerDepth-BU_55vPr.js → layerDepth-I6d28O4d.js} +5 -2
- package/dist/{layerFocusReturn-DWGkSHXj.js → layerFocusReturn-_pBrNAPE.js} +1 -1
- package/dist/{loadCatalog-Kp7aQZpL.d.ts → loadCatalog-Cvf-xgDD.d.ts} +34 -27
- package/dist/{loadCatalog-BtQRPyzj.js → loadCatalog-DYuZZRtf.js} +1 -1
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +4 -4
- package/dist/{locale-DET_YkFW.js → locale-B-DrJCMs.js} +1 -1
- package/dist/{selectorEscape-LkWoVYQN.js → selectorEscape-FjiU_5WC.js} +3 -16
- package/dist/{stillPointerGate-BZ7KMJOB.js → stillPointerGate-DlAU_J_M.js} +1 -1
- package/dist/timeParser-D9tCF_b3.js +203 -0
- package/dist/{useDismiss-74dLMi5S.js → useDismiss-21Gk7uWk.js} +1 -1
- package/dist/{useFocusTrap-CyooA0OC.js → useFocusTrap-CnKnSN99.js} +16 -2
- package/dist/{useHoverLayerDismiss-B1W5qIBx.js → useHoverLayerDismiss-Chfty2wT.js} +1 -1
- package/dist/{useInputStatusIcon-ZqCxDNTj.js → useInputStatusIcon-Yd0hvw5K.js} +1 -1
- package/dist/{useLayer-BnjrJ85F.js → useLayer-vK4-yRk_.js} +1 -1
- package/dist/{useMenuPress-BWq7kwWm.js → useMenuPress-9vsHzbRX.js} +1 -1
- package/dist/{useResizable-DziUYD5W.d.ts → useResizable-CJd4JkbJ.d.ts} +30 -1
- package/dist/{useResizable-De4Xp3TD.js → useResizable-DYlc06-H.js} +1 -1
- package/dist/{useRestoreFocus-CSrI8x7v.js → useRestoreFocus-Do8y6Yy4.js} +1 -1
- package/dist/useTimeValue-_XW9g2V1.js +52 -0
- package/dist/{useTooltip-uc-VLZ8I.js → useTooltip-DIg3ZE9P.js} +4 -4
- package/dist/{useTouchTriggerInternal-b-txblws.js → useTouchTriggerInternal-CrLW-7kT.js} +1 -1
- package/dist/{useTruncationTooltip-BVMCoNno.js → useTruncationTooltip-D9_lzxpF.js} +2 -2
- package/dist/{useTypeahead-BWj3xhbR.js → useTypeahead-CiLt-yEg.js} +1 -1
- package/dist/{useTypeaheadAnnouncement-DVkdWTWy.js → useTypeaheadAnnouncement-C59m2nSx.js} +1 -1
- package/dist/utils/index.js +3 -1
- package/dist/utils-BW62BpDR.js +135 -0
- package/package.json +1 -1
- package/styles/card.css +3 -0
- package/styles/date-input.css +45 -3
- package/styles/date-range-input.css +7 -0
- package/styles/table.css +44 -1
- package/styles/time-input.css +7 -0
- package/dist/useTimeValue-BJd0xBhG.js +0 -95
- package/dist/{index-J6YRJ7Ul.d.ts → index-BqhgeAT4.d.ts} +1 -1
|
@@ -16,6 +16,11 @@ function ariaRequired(isRequired, isOptional, optionality) {
|
|
|
16
16
|
if (optionality == null) return isRequired ? true : void 0;
|
|
17
17
|
if (optionality === "required" || isRequired) return true;
|
|
18
18
|
}
|
|
19
|
+
/** 字段自己的设置优先,其次最近的 FormLayout 默认值,都没有时是 `complete`。 */
|
|
20
|
+
function useEntryErrorBehavior(own) {
|
|
21
|
+
const layout = useFormLayout();
|
|
22
|
+
return computed(() => own() ?? layout.value?.defaultEntryErrorBehavior ?? "complete");
|
|
23
|
+
}
|
|
19
24
|
function useAriaRequired(props) {
|
|
20
25
|
const layout = useFormLayout();
|
|
21
26
|
return computed(() => ariaRequired(props.isRequired, props.isOptional, layout.value?.defaultOptionality));
|
|
@@ -28,4 +33,4 @@ function showsRequiredIndicator(isRequired, isOptional, optionality) {
|
|
|
28
33
|
return Boolean(isRequired) && optionality !== "required";
|
|
29
34
|
}
|
|
30
35
|
//#endregion
|
|
31
|
-
export {
|
|
36
|
+
export { useEntryErrorBehavior as a, useAriaRequired as i, showsOptionalIndicator as n, useFormLayout as o, showsRequiredIndicator as r, formLayoutKey as t };
|
|
@@ -9,6 +9,8 @@ const dateInputMessages = {
|
|
|
9
9
|
toggleCalendarClose: "Close calendar",
|
|
10
10
|
clear: (label) => clearLabel(label, "Clear", "Clear "),
|
|
11
11
|
invalidDate: "Invalid date",
|
|
12
|
+
nonexistentDate: "Enter a real date",
|
|
13
|
+
outOfRangeDate: (bounds, min, max) => bounds === "both" ? `Enter a date from ${min} to ${max}` : bounds === "min" ? `Enter a date on or after ${min}` : bounds === "max" ? `Enter a date on or before ${max}` : "Enter an available date",
|
|
12
14
|
loading: "Loading",
|
|
13
15
|
resetPicking: "Reset",
|
|
14
16
|
savePicking: "Save",
|
|
@@ -25,6 +27,8 @@ const dateInputMessages = {
|
|
|
25
27
|
toggleCalendarClose: "收起日历",
|
|
26
28
|
clear: (label) => clearLabel(label, "清除", "清除"),
|
|
27
29
|
invalidDate: "日期无效",
|
|
30
|
+
nonexistentDate: "请输入一个真实存在的日期",
|
|
31
|
+
outOfRangeDate: (bounds, min, max) => bounds === "both" ? `请输入 ${min} 到 ${max} 之间的日期` : bounds === "min" ? `请输入 ${min} 当天或之后的日期` : bounds === "max" ? `请输入 ${max} 当天或之前的日期` : "请输入一个可选的日期",
|
|
28
32
|
loading: "正在加载",
|
|
29
33
|
resetPicking: "重置",
|
|
30
34
|
savePicking: "保存",
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
//#region src/utils/chainEventHandlers.ts
|
|
2
|
-
/**
|
|
3
|
-
* 把多个事件处理函数串成一个。每个函数都会按参数顺序执行。
|
|
4
|
-
*
|
|
5
|
-
* 和「前一个调用了 preventDefault 就跳过后面」不同:组件自己的处理函数
|
|
6
|
-
* 不能把事件藏起来,调用方也不能用 preventDefault 取消组件的行为。
|
|
7
|
-
*/
|
|
8
|
-
function chainEventHandlers(...handlers) {
|
|
9
|
-
return (event) => {
|
|
10
|
-
for (const handler of handlers) handler?.(event);
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
1
|
//#region src/utils/plainDate.ts
|
|
15
2
|
function plainDateCreate(year, month, day) {
|
|
16
3
|
if (!Number.isInteger(year) || year < 1) throw new RangeError(`year must be a positive integer, got ${year}`);
|
|
@@ -411,319 +398,4 @@ function tryCreatePlainDate(year, month, day) {
|
|
|
411
398
|
}
|
|
412
399
|
}
|
|
413
400
|
//#endregion
|
|
414
|
-
|
|
415
|
-
/** Weekday names indexed by {@link DayOfWeek} (0 = Sunday). */
|
|
416
|
-
const WEEKDAY_NAMES = [
|
|
417
|
-
"sun",
|
|
418
|
-
"mon",
|
|
419
|
-
"tue",
|
|
420
|
-
"wed",
|
|
421
|
-
"thu",
|
|
422
|
-
"fri",
|
|
423
|
-
"sat"
|
|
424
|
-
];
|
|
425
|
-
/**
|
|
426
|
-
* Normalize a weekday to its numeric {@link DayOfWeek}. Accepts either a
|
|
427
|
-
* number (0–6) or a three-letter day name ('sun'–'sat', case-insensitive),
|
|
428
|
-
* so APIs like `weekStartsOn` can take whichever is more readable at the
|
|
429
|
-
* call site. Unrecognized values fall back to 0 (Sunday).
|
|
430
|
-
*/
|
|
431
|
-
function normalizeDayOfWeek(value) {
|
|
432
|
-
if (typeof value === "number") return value;
|
|
433
|
-
const index = WEEKDAY_NAMES.indexOf(value.toLowerCase());
|
|
434
|
-
return index === -1 ? 0 : index;
|
|
435
|
-
}
|
|
436
|
-
//#endregion
|
|
437
|
-
//#region src/utils/groupItems.ts
|
|
438
|
-
/** 读出条目上的组名。不是字符串就不算分组。空字符串仍算一个组名。 */
|
|
439
|
-
function getItemGroup(item) {
|
|
440
|
-
const aux = item.auxiliaryData;
|
|
441
|
-
if (aux == null || typeof aux !== "object") return void 0;
|
|
442
|
-
const group = aux.group;
|
|
443
|
-
return typeof group === "string" ? group : void 0;
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* 按 `auxiliaryData.group` 分组,组的先后跟它们第一次出现的顺序。
|
|
447
|
-
* 没有任何组名时,返回一组 `heading: null`。
|
|
448
|
-
*/
|
|
449
|
-
function groupItems(items, { ungroupedFirst = false } = {}) {
|
|
450
|
-
if (!items.some((item) => getItemGroup(item) != null)) return [{
|
|
451
|
-
heading: null,
|
|
452
|
-
items: [...items]
|
|
453
|
-
}];
|
|
454
|
-
const groupOrder = [];
|
|
455
|
-
const groups = /* @__PURE__ */ new Map();
|
|
456
|
-
const ungrouped = [];
|
|
457
|
-
for (const item of items) {
|
|
458
|
-
const group = getItemGroup(item);
|
|
459
|
-
if (group != null) {
|
|
460
|
-
const list = groups.get(group);
|
|
461
|
-
if (list) list.push(item);
|
|
462
|
-
else {
|
|
463
|
-
groupOrder.push(group);
|
|
464
|
-
groups.set(group, [item]);
|
|
465
|
-
}
|
|
466
|
-
} else ungrouped.push(item);
|
|
467
|
-
}
|
|
468
|
-
const namedGroups = groupOrder.map((heading) => ({
|
|
469
|
-
heading,
|
|
470
|
-
items: groups.get(heading) ?? []
|
|
471
|
-
}));
|
|
472
|
-
const ungroupedGroup = ungrouped.length > 0 ? [{
|
|
473
|
-
heading: null,
|
|
474
|
-
items: ungrouped
|
|
475
|
-
}] : [];
|
|
476
|
-
return ungroupedFirst ? [...ungroupedGroup, ...namedGroups] : [...namedGroups, ...ungroupedGroup];
|
|
477
|
-
}
|
|
478
|
-
//#endregion
|
|
479
|
-
//#region src/utils/inputAria.ts
|
|
480
|
-
function joinAriaIDs(...values) {
|
|
481
|
-
const ids = values.flatMap((value) => typeof value === "string" ? value.trim().split(/\s+/) : []).filter(Boolean);
|
|
482
|
-
if (ids.length === 0) return;
|
|
483
|
-
return Array.from(new Set(ids)).join(" ");
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* Builds ARIA label/description wiring for an input.
|
|
487
|
-
*
|
|
488
|
-
* Standalone inputs keep their normal native label association. Grouped inputs
|
|
489
|
-
* are named by the visible InputGroup label plus their own input label, and
|
|
490
|
-
* inherit group description/status text in addition to input-local text.
|
|
491
|
-
*/
|
|
492
|
-
function getInputARIA(labelID, describedByIDs = [], inputGroup) {
|
|
493
|
-
return {
|
|
494
|
-
ariaLabelledBy: inputGroup ? joinAriaIDs(inputGroup.labelID, labelID) : void 0,
|
|
495
|
-
ariaDescribedBy: joinAriaIDs(inputGroup?.describedByIDs, ...describedByIDs)
|
|
496
|
-
};
|
|
497
|
-
}
|
|
498
|
-
//#endregion
|
|
499
|
-
//#region src/utils/parseStyleKey.ts
|
|
500
|
-
/** 把驼峰属性名变成主题用的 data 属性名,例如 listStyle → data-list-style。 */
|
|
501
|
-
function themeDataAttributeName(prop) {
|
|
502
|
-
return `data-${prop.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase()}`;
|
|
503
|
-
}
|
|
504
|
-
/** 双引号 CSS 属性选择器里的值转义。 */
|
|
505
|
-
function escapeAttributeValue(value) {
|
|
506
|
-
let escaped = "";
|
|
507
|
-
for (const char of value) {
|
|
508
|
-
const codePoint = char.codePointAt(0) ?? 0;
|
|
509
|
-
if (char === "\"" || char === "\\" || codePoint < 32 || codePoint === 127) escaped += `\\${(codePoint === 0 ? 65533 : codePoint).toString(16)} `;
|
|
510
|
-
else escaped += char;
|
|
511
|
-
}
|
|
512
|
-
return escaped;
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* 把组件样式键编成 data 属性选择器后缀。
|
|
516
|
-
*
|
|
517
|
-
* `prop:value` 选择 `[data-prop="value"]`。裸状态选择 `[data-state="state"]`。
|
|
518
|
-
* `+` 把多个条件接在同一个组件目标上。轴名留在选择器里,避免不同属性的相同值撞在一起。
|
|
519
|
-
*
|
|
520
|
-
* @example
|
|
521
|
-
* parseStyleKey('base') // ''
|
|
522
|
-
* parseStyleKey('variant:secondary') // '[data-variant="secondary"]'
|
|
523
|
-
* parseStyleKey('checked+disabled') // '[data-checked="checked"][data-disabled="disabled"]'
|
|
524
|
-
*/
|
|
525
|
-
function parseStyleKey(key) {
|
|
526
|
-
if (key === "base") return "";
|
|
527
|
-
return key.split("+").map((part) => {
|
|
528
|
-
const separator = part.indexOf(":");
|
|
529
|
-
const prop = separator === -1 ? part : part.slice(0, separator);
|
|
530
|
-
const value = separator === -1 ? part : part.slice(separator + 1);
|
|
531
|
-
return `[${themeDataAttributeName(prop)}="${escapeAttributeValue(value)}"]`;
|
|
532
|
-
}).join("");
|
|
533
|
-
}
|
|
534
|
-
//#endregion
|
|
535
|
-
//#region src/utils/timeParser.ts
|
|
536
|
-
/**
|
|
537
|
-
* Validates and creates an ISOTimeString from a string.
|
|
538
|
-
* Returns null if the string is not a valid time format.
|
|
539
|
-
*/
|
|
540
|
-
function createISOTimeString(value) {
|
|
541
|
-
const parsed = parseISOTime(value);
|
|
542
|
-
if (!parsed) return null;
|
|
543
|
-
return formatISOTime(parsed, value.split(":").length === 3);
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Parses an ISO time string into a ParsedTime object.
|
|
547
|
-
* Accepts HH:MM or HH:MM:SS format.
|
|
548
|
-
*/
|
|
549
|
-
function parseISOTime(time) {
|
|
550
|
-
if (!time) return null;
|
|
551
|
-
const parts = time.split(":");
|
|
552
|
-
if (parts.length < 2 || parts.length > 3) return null;
|
|
553
|
-
const hour = parseInt(parts[0], 10);
|
|
554
|
-
const minute = parseInt(parts[1], 10);
|
|
555
|
-
const second = parts.length === 3 ? parseInt(parts[2], 10) : 0;
|
|
556
|
-
if (Number.isNaN(hour) || Number.isNaN(minute) || Number.isNaN(second) || hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) return null;
|
|
557
|
-
return {
|
|
558
|
-
hour,
|
|
559
|
-
minute,
|
|
560
|
-
second
|
|
561
|
-
};
|
|
562
|
-
}
|
|
563
|
-
/**
|
|
564
|
-
* Formats a ParsedTime object into an ISOTimeString.
|
|
565
|
-
*/
|
|
566
|
-
function formatISOTime(time, includeSeconds = false) {
|
|
567
|
-
const hh = time.hour.toString().padStart(2, "0");
|
|
568
|
-
const mm = time.minute.toString().padStart(2, "0");
|
|
569
|
-
if (includeSeconds) return `${hh}:${mm}:${time.second.toString().padStart(2, "0")}`;
|
|
570
|
-
return `${hh}:${mm}`;
|
|
571
|
-
}
|
|
572
|
-
/**
|
|
573
|
-
* Formats a time for display in 12-hour format.
|
|
574
|
-
* Example: "14:30" -> "2:30 PM"
|
|
575
|
-
*/
|
|
576
|
-
function formatDisplayTime12h(time, includeSeconds = false) {
|
|
577
|
-
if (!time) return "";
|
|
578
|
-
const parsed = parseISOTime(time);
|
|
579
|
-
if (!parsed) return "";
|
|
580
|
-
const hour12 = parsed.hour === 0 ? 12 : parsed.hour > 12 ? parsed.hour - 12 : parsed.hour;
|
|
581
|
-
const meridiem = parsed.hour < 12 ? "AM" : "PM";
|
|
582
|
-
const mm = parsed.minute.toString().padStart(2, "0");
|
|
583
|
-
if (includeSeconds) return `${hour12}:${mm}:${parsed.second.toString().padStart(2, "0")} ${meridiem}`;
|
|
584
|
-
return `${hour12}:${mm} ${meridiem}`;
|
|
585
|
-
}
|
|
586
|
-
/**
|
|
587
|
-
* Formats a time for display in 24-hour format.
|
|
588
|
-
* Example: "14:30" -> "14:30"
|
|
589
|
-
*/
|
|
590
|
-
function formatDisplayTime24h(time, includeSeconds = false) {
|
|
591
|
-
if (!time) return "";
|
|
592
|
-
const parsed = parseISOTime(time);
|
|
593
|
-
if (!parsed) return "";
|
|
594
|
-
const hh = parsed.hour.toString().padStart(2, "0");
|
|
595
|
-
const mm = parsed.minute.toString().padStart(2, "0");
|
|
596
|
-
if (includeSeconds) return `${hh}:${mm}:${parsed.second.toString().padStart(2, "0")}`;
|
|
597
|
-
return `${hh}:${mm}`;
|
|
598
|
-
}
|
|
599
|
-
/**
|
|
600
|
-
* Parses user input into an ISOTimeString.
|
|
601
|
-
* Accepts various formats:
|
|
602
|
-
* - "2:30 PM", "2:30pm", "2:30 pm"
|
|
603
|
-
* - "14:30", "1430"
|
|
604
|
-
* - "2pm", "2 PM"
|
|
605
|
-
*/
|
|
606
|
-
function parseTimeInput(input, includeSeconds = false) {
|
|
607
|
-
if (!input) return null;
|
|
608
|
-
const trimmed = input.trim().toLowerCase();
|
|
609
|
-
const isPM = /p\.?m?\.?\s*$/i.test(trimmed);
|
|
610
|
-
const isAM = /a\.?m?\.?\s*$/i.test(trimmed);
|
|
611
|
-
const hasMeridiem = isPM || isAM;
|
|
612
|
-
const timeStr = trimmed.replace(/\s*[ap]\.?m?\.?\s*$/i, "").trim();
|
|
613
|
-
const convertHourTo24Hour = (hour) => {
|
|
614
|
-
if (!hasMeridiem) return hour;
|
|
615
|
-
if (hour < 1 || hour > 12) return null;
|
|
616
|
-
if (isPM && hour !== 12) return hour + 12;
|
|
617
|
-
if (isAM && hour === 12) return 0;
|
|
618
|
-
return hour;
|
|
619
|
-
};
|
|
620
|
-
if (/^\d{1,2}$/.test(timeStr)) {
|
|
621
|
-
const hour = parseInt(timeStr, 10);
|
|
622
|
-
if (hasMeridiem) {
|
|
623
|
-
const hour24 = convertHourTo24Hour(hour);
|
|
624
|
-
if (hour24 === null) return null;
|
|
625
|
-
return formatISOTime({
|
|
626
|
-
hour: hour24,
|
|
627
|
-
minute: 0,
|
|
628
|
-
second: 0
|
|
629
|
-
}, includeSeconds);
|
|
630
|
-
}
|
|
631
|
-
if (hour >= 0 && hour <= 23 && !hasMeridiem) return formatISOTime({
|
|
632
|
-
hour,
|
|
633
|
-
minute: 0,
|
|
634
|
-
second: 0
|
|
635
|
-
}, includeSeconds);
|
|
636
|
-
return null;
|
|
637
|
-
}
|
|
638
|
-
if (/^\d{4}$/.test(timeStr)) {
|
|
639
|
-
const hour = parseInt(timeStr.slice(0, 2), 10);
|
|
640
|
-
const minute = parseInt(timeStr.slice(2, 4), 10);
|
|
641
|
-
const hour24 = convertHourTo24Hour(hour);
|
|
642
|
-
if (hour24 !== null && hour24 >= 0 && hour24 <= 23 && minute >= 0 && minute <= 59) return formatISOTime({
|
|
643
|
-
hour: hour24,
|
|
644
|
-
minute,
|
|
645
|
-
second: 0
|
|
646
|
-
}, includeSeconds);
|
|
647
|
-
return null;
|
|
648
|
-
}
|
|
649
|
-
if (/^\d{6}$/.test(timeStr)) {
|
|
650
|
-
const hour = parseInt(timeStr.slice(0, 2), 10);
|
|
651
|
-
const minute = parseInt(timeStr.slice(2, 4), 10);
|
|
652
|
-
const second = parseInt(timeStr.slice(4, 6), 10);
|
|
653
|
-
const hour24 = convertHourTo24Hour(hour);
|
|
654
|
-
if (hour24 !== null && hour24 >= 0 && hour24 <= 23 && minute >= 0 && minute <= 59 && second >= 0 && second <= 59) return formatISOTime({
|
|
655
|
-
hour: hour24,
|
|
656
|
-
minute,
|
|
657
|
-
second
|
|
658
|
-
}, includeSeconds);
|
|
659
|
-
return null;
|
|
660
|
-
}
|
|
661
|
-
const colonParts = timeStr.split(":");
|
|
662
|
-
if (colonParts.length >= 2 && colonParts.length <= 3) {
|
|
663
|
-
let hour = parseInt(colonParts[0], 10);
|
|
664
|
-
const minute = parseInt(colonParts[1], 10);
|
|
665
|
-
const second = colonParts.length === 3 ? parseInt(colonParts[2], 10) : 0;
|
|
666
|
-
if (Number.isNaN(hour) || Number.isNaN(minute) || Number.isNaN(second)) return null;
|
|
667
|
-
if (minute < 0 || minute > 59 || second < 0 || second > 59) return null;
|
|
668
|
-
if (hasMeridiem) {
|
|
669
|
-
if (hour < 1 || hour > 12) return null;
|
|
670
|
-
if (isPM && hour !== 12) hour += 12;
|
|
671
|
-
if (isAM && hour === 12) hour = 0;
|
|
672
|
-
} else if (hour < 0 || hour > 23) return null;
|
|
673
|
-
return formatISOTime({
|
|
674
|
-
hour,
|
|
675
|
-
minute,
|
|
676
|
-
second
|
|
677
|
-
}, includeSeconds);
|
|
678
|
-
}
|
|
679
|
-
return null;
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* Compares two times. Returns:
|
|
683
|
-
* - negative if a < b
|
|
684
|
-
* - 0 if a === b
|
|
685
|
-
* - positive if a > b
|
|
686
|
-
*/
|
|
687
|
-
function compareTime(a, b) {
|
|
688
|
-
if (!a && !b) return 0;
|
|
689
|
-
if (!a) return -1;
|
|
690
|
-
if (!b) return 1;
|
|
691
|
-
const parsedA = parseISOTime(a);
|
|
692
|
-
const parsedB = parseISOTime(b);
|
|
693
|
-
if (!parsedA && !parsedB) return 0;
|
|
694
|
-
if (!parsedA) return -1;
|
|
695
|
-
if (!parsedB) return 1;
|
|
696
|
-
return parsedA.hour * 3600 + parsedA.minute * 60 + parsedA.second - (parsedB.hour * 3600 + parsedB.minute * 60 + parsedB.second);
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* Clamps a time to a min/max range.
|
|
700
|
-
*/
|
|
701
|
-
function clampTime(time, min, max, includeSeconds = false) {
|
|
702
|
-
if (!parseISOTime(time)) return time;
|
|
703
|
-
if (min && compareTime(time, min) < 0) {
|
|
704
|
-
const parsedMin = parseISOTime(min);
|
|
705
|
-
if (parsedMin) return formatISOTime(parsedMin, includeSeconds);
|
|
706
|
-
}
|
|
707
|
-
if (max && compareTime(time, max) > 0) {
|
|
708
|
-
const parsedMax = parseISOTime(max);
|
|
709
|
-
if (parsedMax) return formatISOTime(parsedMax, includeSeconds);
|
|
710
|
-
}
|
|
711
|
-
return time;
|
|
712
|
-
}
|
|
713
|
-
/**
|
|
714
|
-
* Adjusts a time by adding/subtracting minutes.
|
|
715
|
-
*/
|
|
716
|
-
function adjustTime(time, deltaMinutes, includeSeconds = false) {
|
|
717
|
-
const parsed = parseISOTime(time);
|
|
718
|
-
if (!parsed) return time;
|
|
719
|
-
if (!Number.isInteger(deltaMinutes)) return time;
|
|
720
|
-
let totalMinutes = parsed.hour * 60 + parsed.minute + deltaMinutes;
|
|
721
|
-
totalMinutes = (totalMinutes % 1440 + 1440) % 1440;
|
|
722
|
-
return formatISOTime({
|
|
723
|
-
hour: Math.floor(totalMinutes / 60),
|
|
724
|
-
minute: totalMinutes % 60,
|
|
725
|
-
second: parsed.second
|
|
726
|
-
}, includeSeconds);
|
|
727
|
-
}
|
|
728
|
-
//#endregion
|
|
729
|
-
export { plainDateCreate as A, plainDateIsEqual as B, DATE_FORMAT_WITH_WEEKDAY as C, getTimeZoneParts as D, getDaysInMonth as E, plainDateFromISO as F, plainDateSetFirstOfMonth as G, plainDateMax as H, plainDateFromInstant as I, plainDateToISO as J, plainDateSetStartOfWeek as K, plainDateGetWeekNumber as L, plainDateDiffDays as M, plainDateFormat as N, plainDateAddDays as O, plainDateFromDate as P, chainEventHandlers as Q, plainDateIsAfter as R, DATE_FORMAT_WEEKDAY_ONLY as S, formatSharedDate as T, plainDateMin as U, plainDateIsInRange as V, plainDateSetEndOfWeekExclusive as W, plainDateToday as X, plainDateToInstant as Y, plainDateWeekFieldName as Z, DATE_FORMAT_MONTH_ONLY as _, formatDisplayTime12h as a, DATE_FORMAT_SHORT_WITH_WEEKDAY as b, parseStyleKey as c, getItemGroup as d, groupItems as f, DATE_FORMAT_LONG as g, parseDateInput as h, createISOTimeString as i, plainDateDayOfWeek as j, plainDateAddMonths as k, getInputARIA as l, isLocaleDayFirst as m, clampTime as n, formatDisplayTime24h as o, normalizeDayOfWeek as p, plainDateToDate as q, compareTime as r, parseTimeInput as s, adjustTime as t, joinAriaIDs as u, DATE_FORMAT_MONTH_YEAR as v, SHARED_DATE_FORMAT_OPTIONS as w, DATE_FORMAT_SHORT_WITH_YEAR as x, DATE_FORMAT_SHORT as y, plainDateIsBefore as z };
|
|
401
|
+
export { plainDateMin as A, plainDateFromInstant as C, plainDateIsEqual as D, plainDateIsBefore as E, plainDateToISO as F, plainDateToInstant as I, plainDateToday as L, plainDateSetFirstOfMonth as M, plainDateSetStartOfWeek as N, plainDateIsInRange as O, plainDateToDate as P, plainDateWeekFieldName as R, plainDateFromISO as S, plainDateIsAfter as T, plainDateCreate as _, DATE_FORMAT_MONTH_YEAR as a, plainDateFormat as b, DATE_FORMAT_SHORT_WITH_YEAR as c, SHARED_DATE_FORMAT_OPTIONS as d, formatSharedDate as f, plainDateAddMonths as g, plainDateAddDays as h, DATE_FORMAT_MONTH_ONLY as i, plainDateSetEndOfWeekExclusive as j, plainDateMax as k, DATE_FORMAT_WEEKDAY_ONLY as l, getTimeZoneParts as m, parseDateInput as n, DATE_FORMAT_SHORT as o, getDaysInMonth as p, DATE_FORMAT_LONG as r, DATE_FORMAT_SHORT_WITH_WEEKDAY as s, isLocaleDayFirst as t, DATE_FORMAT_WITH_WEEKDAY as u, plainDateDayOfWeek as v, plainDateGetWeekNumber as w, plainDateFromDate as x, plainDateDiffDays as y };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as useInputGroupContext } from "./context-Bg7eSJ47.js";
|
|
2
2
|
import { n as useDevWarning } from "./useDevWarning-B2fsk2B-.js";
|
|
3
|
-
import {
|
|
3
|
+
import { o as useFormLayout } from "./context-DsNhYm5O.js";
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
//#region src/Field/fieldParts.ts
|
|
6
6
|
const CONTAINER_WITHOUT_FIELD_MESSAGE = "`containerClass`/`containerStyle` have no effect here because no Field box renders (inside InputGroup or a `horizontal-labels` FormLayout). Inside InputGroup, style the InputGroup.";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as firstCharacter } from "./characters-wTnzjkkR.js";
|
|
1
2
|
//#region src/locale/weekdays.ts
|
|
2
3
|
const standaloneShortWeekdayNamesByLocale = {
|
|
3
4
|
"af": [
|
|
@@ -296,11 +297,37 @@ function standaloneShortWeekdayNames(locale) {
|
|
|
296
297
|
return englishWeekdays;
|
|
297
298
|
}
|
|
298
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* 内置语言里,CLDR(contextTransforms)把单独出现的月份名首字母大写的那些。
|
|
302
|
+
* `Intl` 按句中写法格式化月份,这些语言的日历标题会以小写开头("octubre de 2026")。
|
|
303
|
+
*/
|
|
304
|
+
const STANDALONE_MONTH_CAPITAL_LANGUAGES = /* @__PURE__ */ new Set([
|
|
305
|
+
"es",
|
|
306
|
+
"fr",
|
|
307
|
+
"it",
|
|
308
|
+
"nl",
|
|
309
|
+
"pl",
|
|
310
|
+
"ru",
|
|
311
|
+
"uk"
|
|
312
|
+
]);
|
|
313
|
+
/**
|
|
314
|
+
* 月份加年份,用在单独成行的地方:日历标题、月份网格的名字。
|
|
315
|
+
* 和日历表头的星期名一样用单独出现的写法,CLDR 要求大写的语言首字母大写。
|
|
316
|
+
*/
|
|
299
317
|
function formatCalendarMonth(year, month, locale) {
|
|
300
|
-
|
|
318
|
+
const label = new Intl.DateTimeFormat(locale, {
|
|
301
319
|
month: "long",
|
|
302
320
|
year: "numeric"
|
|
303
321
|
}).format(new Date(year, month - 1, 1));
|
|
322
|
+
let language;
|
|
323
|
+
try {
|
|
324
|
+
language = new Intl.Locale(locale).language;
|
|
325
|
+
} catch {
|
|
326
|
+
return label;
|
|
327
|
+
}
|
|
328
|
+
if (!STANDALONE_MONTH_CAPITAL_LANGUAGES.has(language)) return label;
|
|
329
|
+
const first = firstCharacter(label);
|
|
330
|
+
return first.toLocaleUpperCase(locale) + label.slice(first.length);
|
|
304
331
|
}
|
|
305
332
|
function weekdayNames(locale, style) {
|
|
306
333
|
const formatter = new Intl.DateTimeFormat(locale, { weekday: style });
|
|
@@ -89,11 +89,11 @@ declare const __VLS_base: import("vue").DefineComponent<HoverCardProps, {
|
|
|
89
89
|
placement: HoverCardPlacement;
|
|
90
90
|
alignment: HoverCardAlignment;
|
|
91
91
|
isDefaultOpen: boolean;
|
|
92
|
-
isEnabled: boolean;
|
|
93
92
|
delay: number;
|
|
94
93
|
hideDelay: number;
|
|
95
94
|
focusTrigger: HoverCardFocusTrigger;
|
|
96
95
|
touchTrigger: HoverCardTouchTrigger;
|
|
96
|
+
isEnabled: boolean;
|
|
97
97
|
hasHoverIndication: HoverCardHoverIndication;
|
|
98
98
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
99
99
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -175,8 +175,8 @@ declare const __VLS_base$1: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
|
175
175
|
}>, {
|
|
176
176
|
position: OverlayPosition;
|
|
177
177
|
align: OverlayAlign;
|
|
178
|
-
scrim: OverlayScrimMode;
|
|
179
178
|
showOn: OverlayShowOn;
|
|
179
|
+
scrim: OverlayScrimMode;
|
|
180
180
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
181
181
|
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
182
182
|
declare const _default$1: typeof __VLS_export$1;
|
|
@@ -192,8 +192,8 @@ declare const __VLS_base: import("vue").DefineComponent<OverlayScrimProps, {}, {
|
|
|
192
192
|
isOpen: boolean;
|
|
193
193
|
position: OverlayPosition;
|
|
194
194
|
align: OverlayAlign;
|
|
195
|
-
scrim: OverlayScrimMode;
|
|
196
195
|
showOn: OverlayShowOn;
|
|
196
|
+
scrim: OverlayScrimMode;
|
|
197
197
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
198
198
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
199
199
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as AstryxMessages, t as AstryxUpstreamCatalog } from "./loadCatalog-
|
|
1
|
+
import { s as AstryxMessages, t as AstryxUpstreamCatalog } from "./loadCatalog-Cvf-xgDD.js";
|
|
2
2
|
import { ComputedRef, InjectionKey } from "vue";
|
|
3
3
|
//#region src/InternationalizationProvider/catalog.d.ts
|
|
4
4
|
/**
|
|
@@ -101,8 +101,8 @@ type __VLS_Slots = {
|
|
|
101
101
|
declare const __VLS_base: import("vue").DefineComponent<CenterProps, {
|
|
102
102
|
element: Readonly<import("vue").ShallowRef<HTMLDivElement | null>>;
|
|
103
103
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CenterProps> & Readonly<{}>, {
|
|
104
|
-
isInline: boolean;
|
|
105
104
|
axis: CenterAxis;
|
|
105
|
+
isInline: boolean;
|
|
106
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
107
107
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
108
108
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ResizableProps } from "./useResizable-
|
|
1
|
+
import { r as ResizableProps } from "./useResizable-CJd4JkbJ.js";
|
|
2
2
|
import { VNodeChild } from "vue";
|
|
3
3
|
//#region src/Resizable/types.d.ts
|
|
4
4
|
type ResizeDirection = 'horizontal' | 'vertical';
|
|
@@ -36,8 +36,8 @@ declare const __VLS_base: import("vue").DefineComponent<ResizeHandleProps, {
|
|
|
36
36
|
element: Readonly<import("vue").ShallowRef<HTMLDivElement | null>>;
|
|
37
37
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ResizeHandleProps> & Readonly<{}>, {
|
|
38
38
|
isDisabled: boolean;
|
|
39
|
-
direction: ResizeDirection;
|
|
40
39
|
position: ResizePosition;
|
|
40
|
+
direction: ResizeDirection;
|
|
41
41
|
isReversed: boolean;
|
|
42
42
|
hasDivider: boolean;
|
|
43
43
|
isAlwaysVisible: boolean;
|
|
@@ -595,8 +595,8 @@ declare const __VLS_export$15: import("vue").DefineComponent<ChatComposerInputPr
|
|
|
595
595
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
596
596
|
onFiles?: ((files: File[]) => any) | undefined;
|
|
597
597
|
}>, {
|
|
598
|
-
maxRows: number;
|
|
599
598
|
debounceMs: number;
|
|
599
|
+
maxRows: number;
|
|
600
600
|
hasHistory: boolean;
|
|
601
601
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
602
602
|
declare const _default$15: typeof __VLS_export$15;
|
|
@@ -607,7 +607,7 @@ declare const _default$14: typeof __VLS_export$14;
|
|
|
607
607
|
//#endregion
|
|
608
608
|
//#region src/Chat/ChatDictationButton.vue.d.ts
|
|
609
609
|
declare const __VLS_export$13: import("vue").DefineComponent<ChatDictationButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChatDictationButtonProps> & Readonly<{}>, {
|
|
610
|
-
size: "
|
|
610
|
+
size: "md" | "sm";
|
|
611
611
|
isHiddenWhenUnsupported: boolean;
|
|
612
612
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
613
613
|
declare const _default$13: typeof __VLS_export$13;
|
|
@@ -730,7 +730,7 @@ declare const __VLS_base$3: import("vue").DefineComponent<ChatSendButtonProps, {
|
|
|
730
730
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
731
731
|
onSend?: (() => any) | undefined;
|
|
732
732
|
}>, {
|
|
733
|
-
size: "
|
|
733
|
+
size: "md" | "sm";
|
|
734
734
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
735
735
|
declare const __VLS_export$5: __VLS_WithSlots$3<typeof __VLS_base$3, __VLS_Slots$3>;
|
|
736
736
|
declare const _default$5: typeof __VLS_export$5;
|
|
@@ -162,8 +162,8 @@ declare const __VLS_base: import("vue").DefineComponent<TabListProps, {}, {}, {}
|
|
|
162
162
|
}>, {
|
|
163
163
|
layout: TabListLayout;
|
|
164
164
|
isFullBleed: boolean;
|
|
165
|
-
hasDivider: boolean;
|
|
166
165
|
overflow: TabListOverflow;
|
|
166
|
+
hasDivider: boolean;
|
|
167
167
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
168
168
|
declare const __VLS_export$1: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
169
169
|
declare const _default$1: typeof __VLS_export$1;
|
|
@@ -140,8 +140,8 @@ declare const __VLS_base$1: import("vue").DefineComponent<__VLS_PublicProps$1, {
|
|
|
140
140
|
height: string | number;
|
|
141
141
|
isInline: boolean;
|
|
142
142
|
purpose: BottomSheetPurpose;
|
|
143
|
-
hasScrim: boolean;
|
|
144
143
|
snapPoints: readonly BottomSheetSnapPoint[];
|
|
144
|
+
hasScrim: boolean;
|
|
145
145
|
finalFocusRef: import("vue").MaybeRef<HTMLElement | null>;
|
|
146
146
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
147
147
|
declare const __VLS_export$1: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
@@ -175,11 +175,11 @@ type __VLS_Slots = {} & {
|
|
|
175
175
|
default?: (props: typeof __VLS_1) => any;
|
|
176
176
|
};
|
|
177
177
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
178
|
-
cancel: (event: Event) => any;
|
|
179
178
|
"update:activeSheet": (value: string | null) => any;
|
|
179
|
+
cancel: (event: Event) => any;
|
|
180
180
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
181
|
-
onCancel?: ((event: Event) => any) | undefined;
|
|
182
181
|
"onUpdate:activeSheet"?: ((value: string | null) => any) | undefined;
|
|
182
|
+
onCancel?: ((event: Event) => any) | undefined;
|
|
183
183
|
}>, {
|
|
184
184
|
hasScrim: boolean;
|
|
185
185
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,7 +2,7 @@ import { n as LayerPlacement, t as LayerAlignment } from "./position-DFW5ymAF.js
|
|
|
2
2
|
import "./useAsyncSource-aGzrvRkI.js";
|
|
3
3
|
import "./useClipboard-ZdT7wKBL.js";
|
|
4
4
|
import "./useInputStatusIcon-B6m_t8cK.js";
|
|
5
|
-
import "./useResizable-
|
|
5
|
+
import "./useResizable-CJd4JkbJ.js";
|
|
6
6
|
import { CSSProperties, Component, ComponentPublicInstance, ComputedRef, InjectionKey, MaybeRefOrGetter, Ref, ShallowRef } from "vue";
|
|
7
7
|
import { CalendarDate } from "@internationalized/date";
|
|
8
8
|
//#region src/composables/useDateRange.d.ts
|
|
@@ -348,6 +348,7 @@ interface ParsedTime {
|
|
|
348
348
|
minutes: number;
|
|
349
349
|
seconds: number;
|
|
350
350
|
}
|
|
351
|
+
/** 时间的解析、格式化、比较和步进都在 `utils/timeParser`;这里只做字段用的严格写法和 `hours` 形状。 */
|
|
351
352
|
declare function parseISOTime(value: string): ParsedTime | null;
|
|
352
353
|
declare function formatISOTime(time: ParsedTime, hasSeconds: boolean): ISOTimeString;
|
|
353
354
|
declare function formatDisplayTime(value: string, hourFormat: HourFormat, hasSeconds: boolean): string;
|