@astryx-vue/core 0.2.2 → 0.2.3
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/THIRD_PARTY_NOTICES.md +2 -0
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-Cb41gIAj.js → AppShell-Dd-D4bA2.js} +2 -2
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +3 -2
- package/dist/Breadcrumbs/index.js +3 -2
- package/dist/{Breadcrumbs-CTQ7fjDn.js → Breadcrumbs-CWGfgLNK.js} +13 -8
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +2 -2
- package/dist/Calendar/index.js +1 -1
- package/dist/Calendar-CnOsSjMY.js +656 -0
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-X0cuQkvg.js → Carousel-JA7ilqI_.js} +2 -2
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-M0tiGrNT.js → Chat-C7WrCOE4.js} +3 -3
- package/dist/CheckboxIndicator/index.js +1 -1
- package/dist/CheckboxIndicator-D37cm2Rh.js +68 -0
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-CMsEE1_4.js → CheckboxInput-25Q8ItH-.js} +10 -9
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-BbCPiend.js → CheckboxList-CnCGnkZk.js} +77 -24
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-C1veUk5p.js → Citation-CtwrU33I.js} +2 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.d.ts +1 -1
- package/dist/Code/index.js +2 -2
- package/dist/{Code-yb_KOFtJ.js → Code-BvefYRpx.js} +2 -1
- package/dist/{CodeBlock-DesTJAkm.js → CodeBlock-BZGzYeoL.js} +1 -1
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-BestK35V.js → Collapsible-3YerR-FO.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BArt97V8.js → CommandPalette-BNbM9T9y.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-CAoig1RK.js → ComplexSelector-LtbLlrcj.js} +3 -3
- package/dist/ContextMenu/index.d.ts +3 -2
- package/dist/ContextMenu/index.js +3 -2
- package/dist/{ContextMenu-9Im6i43E.js → ContextMenu-DVQl0xL5.js} +204 -56
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/DateInput-zm8sNc0t.js +743 -0
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-DwDy3eRo.js → DateRangeInput-DlVFzrf7.js} +54 -19
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-BYiaC9bn.js → DateTimeInput-C7Z-p6Yd.js} +54 -15
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/DropdownMenu/index.d.ts +3 -3
- package/dist/DropdownMenu/index.js +4 -3
- package/dist/{DropdownMenu-Dh-WAHKb.js → DropdownMenu-BoZChdev.js} +308 -63
- package/dist/DropdownMenu-u1psFjis.js +325 -0
- package/dist/DropdownMenuRadioItem.vue-uVM0FD2f.d.ts +564 -0
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-DLO6V12n.js → FileInput-QdlZn7qK.js} +2 -2
- package/dist/Icon/index.d.ts +4 -3
- package/dist/Icon/index.js +2 -2
- package/dist/{Icon-CJKjdJy-.js → Icon-bteSId7T.js} +113 -18
- package/dist/Indicator/index.d.ts +3 -0
- package/dist/Indicator/index.js +2 -0
- package/dist/InputGroup/index.d.ts +2 -2
- package/dist/InputGroup/index.js +3 -2
- package/dist/InputGroup-BzR6JRZb.js +129 -0
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CdFCS_EA.js → Lightbox-BSzfqZ-u.js} +2 -2
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-BqKloI3w.js → Markdown-B6tSqenv.js} +8 -5
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-CvZkmisf.js → MetadataList-aN1tRn6W.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-Bwi0qXXM.js → MobileNavToggle-fqcSafkc.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BwJaJrkB.js → MoreMenu-B3brqdK_.js} +1 -1
- package/dist/MultiSelector/index.d.ts +2 -2
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-C-ETfFy_.js → MultiSelector-BD5PMgez.js} +303 -121
- package/dist/{NavDisclosure-DHrSNRDR.js → NavDisclosure-DbYLDXK0.js} +1 -1
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.js +2 -2
- package/dist/{NavMenuItem-B-k7olt5.js → NavMenuItem-DrwIMHKO.js} +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DjetVB8O.js → NumberInput-CBeU4lEl.js} +1 -1
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-Bz9c-u5y.js → Outline--HVMSB6i.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-ED-KN9Y5.js → OverflowList-FMh7r-r_.js} +3 -3
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-Cb66HMEf.js → Pagination-DlIvESjx.js} +2 -2
- package/dist/Popover/index.d.ts +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/{Popover-Crhk9PNP.js → Popover-D7zqpFwU.js} +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-CjU8y4mi.js → PowerSearch-CMG7Rb69.js} +14 -14
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/Radio/index.d.ts +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/{RadioGroup-BqjdSCfJ.js → RadioGroup-CBqUPq_L.js} +16 -8
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/RadioList/index.js +1 -1
- package/dist/{RadioList-DI8ujXcT.js → RadioList-CPOJn9Th.js} +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{Resizable-D-TBCg0Y.js → Resizable-CXpvj1TZ.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +2 -2
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-BpPnuWH3.js +618 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-DonEfiAx.js → SideNav-D4TupqgE.js} +3 -3
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-D2ZIcUNx.js → Stepper-H-6-T5Ps.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-D3F-stq-.js → TabList-BlzkrObv.js} +2 -2
- package/dist/Table/index.js +1 -1
- package/dist/{Table-CrP2Uffq.js → Table-nqA_njNz.js} +6 -6
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/Theme/index.d.ts +2 -1
- package/dist/Theme/index.js +1 -1
- package/dist/{Theme-BuUiiJNr.js → Theme-CejS9MHm.js} +21 -3
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-BC5JGPGZ.js → Thumbnail-CXb3m_Hv.js} +2 -2
- package/dist/{TimeField-DpHFrNv0.js → TimeField-B3cndWb0.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-DJLV0_4z.js → TimeInput-BHQ_LKGm.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-GKNjjt5g.js → Timestamp-Cfuxbb3i.js} +2 -2
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-Chu_eCVs.js → Token-CdVLH0_H.js} +2 -2
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-DRDpvQ_l.js → Tokenizer-DlD-S_8-.js} +3 -3
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-CEyWddtA.js → TopNav-DzV874G7.js} +5 -5
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-COS8US8e.js → TreeList-DEwvlZRV.js} +2 -2
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-P7cCqtaQ.js → Typeahead-DQ3tmqYe.js} +3 -3
- package/dist/{context-O2Vb8cJl.js → colorMode-CBgdgDSn.js} +1 -7
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +10 -5
- package/dist/{composables-CVfjp9h4.js → composables-DDI08XFF.js} +98 -1
- package/dist/context-Cws_tXTr.js +7 -0
- package/dist/context-D5-MwxnN.js +4 -0
- package/dist/{context-CiKncNSH.js → context-DmOLCubj.js} +82 -8
- package/dist/{index-DimuSES0.d.ts → index-B1x05arQ.d.ts} +3 -1
- package/dist/index-B9f1rUEv.d.ts +77 -0
- package/dist/{index-D-ZuubCK.d.ts → index-BB5yVIN-.d.ts} +2 -2
- package/dist/{index-Bu0Zd1uw.d.ts → index-BMn9ghAX.d.ts} +3 -3
- package/dist/{index-CJlBAXwj.d.ts → index-BRfR0lhb.d.ts} +41 -4
- package/dist/{index-DNRBbwp_.d.ts → index-BTAgQRP0.d.ts} +758 -111
- package/dist/{index-DA52oIdw.d.ts → index-BcJBLWJ0.d.ts} +2 -2
- package/dist/{index-jdjcb3Js.d.ts → index-Bqb_Fyju.d.ts} +2 -2
- package/dist/{index-CNjbOgty.d.ts → index-C-QpeUlQ.d.ts} +2 -2
- package/dist/{index-DGXviOlp.d.ts → index-C2sfHfBw.d.ts} +31 -5
- package/dist/{index-By2mSzUA.d.ts → index-CA6RbRWx.d.ts} +1 -1
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-CVn0GBdB.d.ts → index-Ca8VIE4l.d.ts} +1 -1
- package/dist/{index-CRizexSC.d.ts → index-Ch6BbxCP.d.ts} +2 -67
- package/dist/{index-DWH_HzXi.d.ts → index-ChWlKHjc.d.ts} +1 -1
- package/dist/{index-kVhSuA9t.d.ts → index-Ctu32CLv.d.ts} +4 -4
- package/dist/{index-DOUEn7V0.d.ts → index-D1Twv_fL.d.ts} +65 -6
- package/dist/{index-D_nYxnNv.d.ts → index-D7-WTV6I.d.ts} +1 -1
- package/dist/{index-c_TaW8mM.d.ts → index-D8o50qOE.d.ts} +1 -1
- package/dist/{index-D4I_obqR.d.ts → index-DAiGhkNZ.d.ts} +1 -1
- package/dist/{index-Cs5pcwY3.d.ts → index-DMQG6kdM.d.ts} +3 -3
- package/dist/index-D_UEJIU5.d.ts +83 -0
- package/dist/{index-fa72tWIU.d.ts → index-DkVEBdWa.d.ts} +2 -2
- package/dist/{index-B1TG2GPS.d.ts → index-DxsKyAxq.d.ts} +116 -44
- package/dist/{index-BHqRH7QW.d.ts → index-FEy8qFSD.d.ts} +2 -2
- package/dist/{index-qiZtHnGK.d.ts → index-LIyvJTW3.d.ts} +39 -0
- package/dist/{index-BKr7yvVv.d.ts → index-MPcg1Pm4.d.ts} +1 -1
- package/dist/{index-cGagYM1g.d.ts → index-ViSV0RBx.d.ts} +1 -1
- package/dist/{index-C7mxUcDR.d.ts → index-f4NGT-e2.d.ts} +4 -4
- package/dist/{index-DsyKhauk.d.ts → index-foQMNKZO.d.ts} +1 -1
- package/dist/{index-u5ozu0G7.d.ts → index-vP0EtrJJ.d.ts} +13 -3
- package/dist/{index-CZeoAr0a.d.ts → index-xfkEuGLY.d.ts} +2 -2
- package/dist/index.d.ts +76 -75
- package/dist/index.js +115 -107
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +2 -2
- package/dist/{locale-Cpk_nrLA.js → locale-CCwVnyMZ.js} +25 -1
- package/dist/searchResultMessage-DN0HeRRB.js +94 -0
- package/dist/semantic-CKH9XVqa.d.ts +54 -0
- package/dist/{types-pnljWjEE.d.ts → types-CwyibrRB.d.ts} +12 -11
- package/dist/types-jmqqnkKA.d.ts +163 -0
- package/dist/{useAnchoredListbox-7W90Ny-9.js → useAnchoredListbox-BN9LQnon.js} +1 -1
- package/dist/useDatePresentation-C07PnOCw.js +21 -0
- package/dist/{useMonthGrid-CmJsZTcB.js → useDateRange-CIXoE_8k.js} +1 -42
- package/dist/useDisclosureHandle-Df3HhAfC.js +24 -0
- package/dist/{useDismiss-CAiHU6QD.js → useDismiss-Cj8x_51F.js} +8 -4
- package/dist/useFieldControlState-voICDrys.js +18 -0
- package/dist/useHandleRef-6cdKugm8.js +17 -0
- package/dist/useIndicator-i1NORM7W.js +147 -0
- package/dist/useMenuDrillIn-OaEwjK44.js +520 -0
- package/dist/useMonthGrid-fGHSSrFc.js +43 -0
- package/dist/usePendingChange-ib-h8FZK.js +25 -0
- package/dist/useSubmenuMode-CZN9qrUo.js +37 -0
- package/package.json +5 -1
- package/styles/calendar.css +38 -3
- package/styles/check-indicator.css +17 -0
- package/styles/checkbox-indicator.css +29 -10
- package/styles/checkbox-input.css +0 -11
- package/styles/date-input.css +48 -0
- package/styles/dropdown-menu.css +163 -0
- package/styles/field.css +48 -0
- package/styles/icon.css +51 -3
- package/styles/input-group.css +32 -3
- package/styles/multi-selector.css +26 -0
- package/styles/radio-indicator.css +90 -0
- package/styles/radio.css +9 -42
- package/styles/selector.css +112 -14
- package/styles.css +2 -0
- package/dist/Calendar-BFaI5AMv.js +0 -352
- package/dist/CheckboxIndicator-DdJmksHt.js +0 -52
- package/dist/DateInput-BLocxqC3.js +0 -376
- package/dist/DropdownMenu-Ddfr-aEC.js +0 -164
- package/dist/InputGroup-ChrFVxzV.js +0 -42
- package/dist/Selector-DE2IEFML.js +0 -468
- package/dist/index-Bgv4ZmBl.d.ts +0 -72
- package/dist/index-DN7MXPHM.d.ts +0 -398
- package/dist/index-IbUN4M8V.d.ts +0 -40
- package/dist/types-DDAAT1Xd.d.ts +0 -285
- package/dist/useGridRovingFocus-DQQAOYH5.js +0 -99
- /package/dist/{index-BUXNRekN.d.ts → index-BXkNZF3q.d.ts} +0 -0
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
import { t as useCombobox } from "./useCombobox-CTo5C-gc.js";
|
|
2
|
-
import { t as useDismiss } from "./useDismiss-CAiHU6QD.js";
|
|
3
|
-
import { a as useAstryxMessages } from "./context-CiKncNSH.js";
|
|
4
|
-
import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
|
|
5
|
-
import { t as _sfc_main$1 } from "./BottomSheet-Dg95HB1s.js";
|
|
6
|
-
import { t as _sfc_main$2 } from "./Field-8zRxzDHE.js";
|
|
7
|
-
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
8
|
-
import "../styles/visually-hidden-utility.css";
|
|
9
|
-
import "../styles/selector.css";
|
|
10
|
-
//#region src/Selector/Selector.vue
|
|
11
|
-
const _hoisted_1 = [
|
|
12
|
-
"disabled",
|
|
13
|
-
"aria-expanded",
|
|
14
|
-
"aria-label",
|
|
15
|
-
"aria-activedescendant",
|
|
16
|
-
"title"
|
|
17
|
-
];
|
|
18
|
-
const _hoisted_2 = ["aria-label"];
|
|
19
|
-
const _hoisted_3 = { class: "astryx-selector-sheet-title" };
|
|
20
|
-
const _hoisted_4 = ["data-placement"];
|
|
21
|
-
const _hoisted_5 = {
|
|
22
|
-
key: 0,
|
|
23
|
-
class: "astryx-selector-search"
|
|
24
|
-
};
|
|
25
|
-
const _hoisted_6 = [
|
|
26
|
-
"id",
|
|
27
|
-
"aria-label",
|
|
28
|
-
"placeholder",
|
|
29
|
-
"value"
|
|
30
|
-
];
|
|
31
|
-
const _hoisted_7 = {
|
|
32
|
-
key: 1,
|
|
33
|
-
class: "astryx-selector-options"
|
|
34
|
-
};
|
|
35
|
-
const _hoisted_8 = {
|
|
36
|
-
key: 0,
|
|
37
|
-
class: "astryx-selector-section",
|
|
38
|
-
role: "presentation"
|
|
39
|
-
};
|
|
40
|
-
const _hoisted_9 = [
|
|
41
|
-
"id",
|
|
42
|
-
"aria-selected",
|
|
43
|
-
"aria-disabled",
|
|
44
|
-
"onClick",
|
|
45
|
-
"onKeydown"
|
|
46
|
-
];
|
|
47
|
-
const _hoisted_10 = { class: "astryx-selector-option-label" };
|
|
48
|
-
const _hoisted_11 = {
|
|
49
|
-
key: 1,
|
|
50
|
-
class: "astryx-selector-option-description"
|
|
51
|
-
};
|
|
52
|
-
const _hoisted_12 = {
|
|
53
|
-
key: 2,
|
|
54
|
-
class: "astryx-selector-empty"
|
|
55
|
-
};
|
|
56
|
-
const _hoisted_13 = [
|
|
57
|
-
"id",
|
|
58
|
-
"name",
|
|
59
|
-
"value",
|
|
60
|
-
"aria-label"
|
|
61
|
-
];
|
|
62
|
-
const _hoisted_14 = ["value"];
|
|
63
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
64
|
-
name: "AstryxSelector",
|
|
65
|
-
inheritAttrs: false,
|
|
66
|
-
__name: "Selector",
|
|
67
|
-
props: {
|
|
68
|
-
modelValue: { default: null },
|
|
69
|
-
options: {},
|
|
70
|
-
placeholder: {},
|
|
71
|
-
disabled: {
|
|
72
|
-
type: Boolean,
|
|
73
|
-
default: false
|
|
74
|
-
},
|
|
75
|
-
disabledReason: {},
|
|
76
|
-
status: { default: "default" },
|
|
77
|
-
statusMessage: {},
|
|
78
|
-
statusVariant: { default: "attached" },
|
|
79
|
-
size: { default: "md" },
|
|
80
|
-
variant: { default: "default" },
|
|
81
|
-
presentation: { default: "popover" },
|
|
82
|
-
searchable: {
|
|
83
|
-
type: Boolean,
|
|
84
|
-
default: false
|
|
85
|
-
},
|
|
86
|
-
searchPlaceholder: {},
|
|
87
|
-
clearable: {
|
|
88
|
-
type: Boolean,
|
|
89
|
-
default: false
|
|
90
|
-
},
|
|
91
|
-
clearLabel: {},
|
|
92
|
-
emptyText: {},
|
|
93
|
-
label: {},
|
|
94
|
-
isLabelHidden: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
default: false
|
|
97
|
-
},
|
|
98
|
-
description: {},
|
|
99
|
-
width: {},
|
|
100
|
-
name: {}
|
|
101
|
-
},
|
|
102
|
-
emits: [
|
|
103
|
-
"update:modelValue",
|
|
104
|
-
"change",
|
|
105
|
-
"search"
|
|
106
|
-
],
|
|
107
|
-
setup(__props, { emit: __emit }) {
|
|
108
|
-
const props = __props;
|
|
109
|
-
const emit = __emit;
|
|
110
|
-
const slots = useSlots();
|
|
111
|
-
const selectorId = `astryx-selector-${useId()}`;
|
|
112
|
-
const listboxId = `${selectorId}-listbox`;
|
|
113
|
-
const messages = useAstryxMessages();
|
|
114
|
-
const resolvedPlaceholder = computed(() => props.placeholder ?? messages.value.selector.placeholder);
|
|
115
|
-
const resolvedSearchPlaceholder = computed(() => props.searchPlaceholder ?? messages.value.selector.search);
|
|
116
|
-
const resolvedClearLabel = computed(() => props.clearLabel ?? messages.value.selector.clear);
|
|
117
|
-
const resolvedEmptyText = computed(() => props.emptyText ?? messages.value.selector.empty);
|
|
118
|
-
const fieldRef = useTemplateRef("fieldRef");
|
|
119
|
-
const listboxRef = useTemplateRef("listboxRef");
|
|
120
|
-
const searchInputRef = useTemplateRef("searchInputRef");
|
|
121
|
-
const sheetSlot = useTemplateRef("sheetSlot");
|
|
122
|
-
const isSheet = computed(() => props.presentation === "bottom-sheet");
|
|
123
|
-
const sheetLabel = computed(() => props.label || resolvedPlaceholder.value);
|
|
124
|
-
const isEnabled = computed(() => !props.disabled);
|
|
125
|
-
const isSearchable = computed(() => props.searchable);
|
|
126
|
-
function isSection(entry) {
|
|
127
|
-
return typeof entry === "object" && entry !== null && "type" in entry && entry.type === "section";
|
|
128
|
-
}
|
|
129
|
-
function asOption(entry) {
|
|
130
|
-
if (typeof entry === "string") return {
|
|
131
|
-
value: entry,
|
|
132
|
-
label: entry
|
|
133
|
-
};
|
|
134
|
-
return entry;
|
|
135
|
-
}
|
|
136
|
-
const normalizedEntries = computed(() => props.options.map((entry) => {
|
|
137
|
-
if (isSection(entry)) return {
|
|
138
|
-
...entry,
|
|
139
|
-
options: entry.options.map(asOption)
|
|
140
|
-
};
|
|
141
|
-
return asOption(entry);
|
|
142
|
-
}));
|
|
143
|
-
const flatOptions = computed(() => normalizedEntries.value.flatMap((entry) => isSection(entry) ? entry.options : [entry]));
|
|
144
|
-
const comboboxOptions = computed(() => flatOptions.value.map((opt) => ({
|
|
145
|
-
value: opt.value,
|
|
146
|
-
label: opt.label,
|
|
147
|
-
disabled: opt.disabled ?? false
|
|
148
|
-
})));
|
|
149
|
-
const modelValueRef = computed({
|
|
150
|
-
get: () => props.modelValue,
|
|
151
|
-
set: (value) => {
|
|
152
|
-
emit("update:modelValue", value);
|
|
153
|
-
emit("change", value);
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
const combobox = useCombobox({
|
|
157
|
-
options: comboboxOptions,
|
|
158
|
-
modelValue: modelValueRef,
|
|
159
|
-
isEnabled,
|
|
160
|
-
isSearchable,
|
|
161
|
-
onChange: (value) => {
|
|
162
|
-
modelValueRef.value = value;
|
|
163
|
-
},
|
|
164
|
-
onOpenChange: (isOpen) => {
|
|
165
|
-
if (isOpen && props.searchable) nextTick(() => {
|
|
166
|
-
searchInputRef.value?.focus();
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
const sheetOpen = computed({
|
|
171
|
-
get: () => isSheet.value && combobox.isOpen.value,
|
|
172
|
-
set: (open) => {
|
|
173
|
-
if (!open && combobox.isOpen.value) combobox.close();
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
const popoverOpen = computed(() => combobox.isOpen.value && !isSheet.value);
|
|
177
|
-
const listboxTarget = computed(() => isSheet.value && sheetSlot.value ? sheetSlot.value : "body");
|
|
178
|
-
const { position } = usePositionedLayer({
|
|
179
|
-
anchor: fieldRef,
|
|
180
|
-
layer: listboxRef,
|
|
181
|
-
isOpen: popoverOpen,
|
|
182
|
-
placement: computed(() => "below"),
|
|
183
|
-
alignment: computed(() => "start"),
|
|
184
|
-
gap: 4
|
|
185
|
-
});
|
|
186
|
-
useDismiss({
|
|
187
|
-
container: listboxRef,
|
|
188
|
-
trigger: fieldRef,
|
|
189
|
-
isEnabled: popoverOpen,
|
|
190
|
-
enableEscape: ref(true),
|
|
191
|
-
onDismiss: () => {
|
|
192
|
-
combobox.close();
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
const selectedOption = computed(() => {
|
|
196
|
-
if (props.modelValue == null) return null;
|
|
197
|
-
return flatOptions.value.find((opt) => opt.value === props.modelValue) ?? null;
|
|
198
|
-
});
|
|
199
|
-
const fieldLabel = computed(() => props.label || resolvedPlaceholder.value);
|
|
200
|
-
const hideLabel = computed(() => props.isLabelHidden || !props.label);
|
|
201
|
-
const statusType = computed(() => {
|
|
202
|
-
const status = props.status;
|
|
203
|
-
if (status == null || status === "default") return "default";
|
|
204
|
-
if (typeof status === "string") return status;
|
|
205
|
-
return status.type;
|
|
206
|
-
});
|
|
207
|
-
const fieldStatus = computed(() => {
|
|
208
|
-
const status = props.status;
|
|
209
|
-
if (status && typeof status === "object") return status;
|
|
210
|
-
if (!props.statusMessage || statusType.value === "default") return void 0;
|
|
211
|
-
return {
|
|
212
|
-
type: statusType.value,
|
|
213
|
-
message: props.statusMessage
|
|
214
|
-
};
|
|
215
|
-
});
|
|
216
|
-
const displayRows = computed(() => {
|
|
217
|
-
const indexByValue = new Map(combobox.filteredOptions.value.map((option, index) => [option.value, index]));
|
|
218
|
-
const rows = [];
|
|
219
|
-
for (const entry of normalizedEntries.value) {
|
|
220
|
-
if (isSection(entry)) {
|
|
221
|
-
const children = entry.options.filter((option) => indexByValue.has(option.value));
|
|
222
|
-
if (children.length === 0) continue;
|
|
223
|
-
rows.push({
|
|
224
|
-
kind: "section",
|
|
225
|
-
title: entry.title
|
|
226
|
-
});
|
|
227
|
-
for (const option of children) rows.push({
|
|
228
|
-
kind: "option",
|
|
229
|
-
option,
|
|
230
|
-
index: indexByValue.get(option.value)
|
|
231
|
-
});
|
|
232
|
-
continue;
|
|
233
|
-
}
|
|
234
|
-
if (!indexByValue.has(entry.value)) continue;
|
|
235
|
-
rows.push({
|
|
236
|
-
kind: "option",
|
|
237
|
-
option: entry,
|
|
238
|
-
index: indexByValue.get(entry.value)
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
return rows;
|
|
242
|
-
});
|
|
243
|
-
const displayText = computed(() => {
|
|
244
|
-
return selectedOption.value?.label ?? resolvedPlaceholder.value;
|
|
245
|
-
});
|
|
246
|
-
const isEmpty = computed(() => {
|
|
247
|
-
return combobox.filteredOptions.value.length === 0;
|
|
248
|
-
});
|
|
249
|
-
function onTriggerClick() {
|
|
250
|
-
if (isEnabled.value) combobox.toggle();
|
|
251
|
-
}
|
|
252
|
-
function onTriggerKeyDown(event) {
|
|
253
|
-
combobox.onKeyDown(event);
|
|
254
|
-
}
|
|
255
|
-
function onOptionClick(option) {
|
|
256
|
-
if (!option.disabled) combobox.select(option.value);
|
|
257
|
-
}
|
|
258
|
-
function onClear(event) {
|
|
259
|
-
event.stopPropagation();
|
|
260
|
-
modelValueRef.value = null;
|
|
261
|
-
combobox.close();
|
|
262
|
-
}
|
|
263
|
-
function onSearchInput(event) {
|
|
264
|
-
const target = event.target;
|
|
265
|
-
combobox.setSearchQuery(target.value);
|
|
266
|
-
emit("search", target.value);
|
|
267
|
-
}
|
|
268
|
-
function getOptionId(index) {
|
|
269
|
-
return `${listboxId}-option-${index}`;
|
|
270
|
-
}
|
|
271
|
-
const anchorWidth = ref(0);
|
|
272
|
-
function syncAnchorWidth() {
|
|
273
|
-
anchorWidth.value = fieldRef.value?.getBoundingClientRect().width ?? 0;
|
|
274
|
-
}
|
|
275
|
-
const listboxStyle = computed(() => isSheet.value ? void 0 : {
|
|
276
|
-
top: `${position.value.top}px`,
|
|
277
|
-
left: `${position.value.left}px`,
|
|
278
|
-
minWidth: anchorWidth.value > 0 ? `${anchorWidth.value}px` : void 0
|
|
279
|
-
});
|
|
280
|
-
watch(combobox.isOpen, (open) => {
|
|
281
|
-
if (open) syncAnchorWidth();
|
|
282
|
-
}, { flush: "pre" });
|
|
283
|
-
onMounted(syncAnchorWidth);
|
|
284
|
-
watch(() => combobox.activeIndex.value, (index) => {
|
|
285
|
-
if (index >= 0 && combobox.isOpen.value) nextTick(() => {
|
|
286
|
-
const listbox = listboxRef.value;
|
|
287
|
-
const optionEl = listbox?.querySelector(`#${getOptionId(index)}`);
|
|
288
|
-
if (!listbox || !optionEl) return;
|
|
289
|
-
const listboxRect = listbox.getBoundingClientRect();
|
|
290
|
-
const optionRect = optionEl.getBoundingClientRect();
|
|
291
|
-
if (optionRect.top < listboxRect.top) listbox.scrollTop -= listboxRect.top - optionRect.top;
|
|
292
|
-
else if (optionRect.bottom > listboxRect.bottom) listbox.scrollTop += optionRect.bottom - listboxRect.bottom;
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
return (_ctx, _cache) => {
|
|
296
|
-
return openBlock(), createBlock(_sfc_main$2, {
|
|
297
|
-
class: normalizeClass(["astryx-selector", [
|
|
298
|
-
`size-${props.size}`,
|
|
299
|
-
`status-${statusType.value}`,
|
|
300
|
-
`variant-${props.variant}`
|
|
301
|
-
]]),
|
|
302
|
-
label: fieldLabel.value,
|
|
303
|
-
"input-id": selectorId,
|
|
304
|
-
description: props.description,
|
|
305
|
-
"is-label-hidden": hideLabel.value,
|
|
306
|
-
"is-disabled": props.disabled,
|
|
307
|
-
status: fieldStatus.value,
|
|
308
|
-
"status-variant": props.statusVariant,
|
|
309
|
-
width: props.width
|
|
310
|
-
}, {
|
|
311
|
-
default: withCtx(() => [
|
|
312
|
-
createElementVNode("div", {
|
|
313
|
-
ref_key: "fieldRef",
|
|
314
|
-
ref: fieldRef,
|
|
315
|
-
class: normalizeClass(["astryx-selector-field", {
|
|
316
|
-
"is-open": unref(combobox).isOpen.value,
|
|
317
|
-
"is-disabled": props.disabled,
|
|
318
|
-
"is-ghost": props.variant === "ghost"
|
|
319
|
-
}])
|
|
320
|
-
}, [createElementVNode("button", {
|
|
321
|
-
id: selectorId,
|
|
322
|
-
type: "button",
|
|
323
|
-
class: normalizeClass(["astryx-selector-trigger", {
|
|
324
|
-
"is-open": unref(combobox).isOpen.value,
|
|
325
|
-
"is-disabled": props.disabled
|
|
326
|
-
}]),
|
|
327
|
-
disabled: props.disabled,
|
|
328
|
-
"aria-haspopup": "listbox",
|
|
329
|
-
"aria-expanded": unref(combobox).isOpen.value,
|
|
330
|
-
"aria-controls": listboxId,
|
|
331
|
-
"aria-label": props.label,
|
|
332
|
-
"aria-activedescendant": unref(combobox).activeIndex.value >= 0 ? getOptionId(unref(combobox).activeIndex.value) : void 0,
|
|
333
|
-
title: props.disabledReason,
|
|
334
|
-
onClick: onTriggerClick,
|
|
335
|
-
onKeydown: onTriggerKeyDown
|
|
336
|
-
}, [createElementVNode("span", { class: normalizeClass(["astryx-selector-value", {
|
|
337
|
-
"is-placeholder": !selectedOption.value,
|
|
338
|
-
"is-rich": unref(slots).selected
|
|
339
|
-
}]) }, [unref(slots).selected ? renderSlot(_ctx.$slots, "selected", { option: selectedOption.value }, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(displayText.value), 1)], 64))], 2), _cache[1] || (_cache[1] = createElementVNode("span", {
|
|
340
|
-
class: "astryx-selector-icon",
|
|
341
|
-
"aria-hidden": "true"
|
|
342
|
-
}, [createElementVNode("svg", {
|
|
343
|
-
width: "16",
|
|
344
|
-
height: "16",
|
|
345
|
-
viewBox: "0 0 16 16",
|
|
346
|
-
fill: "none"
|
|
347
|
-
}, [createElementVNode("path", {
|
|
348
|
-
d: "M4 6L8 10L12 6",
|
|
349
|
-
stroke: "currentColor",
|
|
350
|
-
"stroke-width": "1.5",
|
|
351
|
-
"stroke-linecap": "round",
|
|
352
|
-
"stroke-linejoin": "round"
|
|
353
|
-
})])], -1))], 42, _hoisted_1), props.clearable && selectedOption.value ? (openBlock(), createElementBlock("button", {
|
|
354
|
-
key: 0,
|
|
355
|
-
type: "button",
|
|
356
|
-
class: "astryx-selector-clear",
|
|
357
|
-
"aria-label": resolvedClearLabel.value,
|
|
358
|
-
onClick: onClear
|
|
359
|
-
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
|
|
360
|
-
width: "16",
|
|
361
|
-
height: "16",
|
|
362
|
-
viewBox: "0 0 16 16",
|
|
363
|
-
fill: "none"
|
|
364
|
-
}, [createElementVNode("path", {
|
|
365
|
-
d: "M12 4L4 12M4 4L12 12",
|
|
366
|
-
stroke: "currentColor",
|
|
367
|
-
"stroke-width": "1.5",
|
|
368
|
-
"stroke-linecap": "round"
|
|
369
|
-
})], -1)])], 8, _hoisted_2)) : createCommentVNode("v-if", true)], 2),
|
|
370
|
-
isSheet.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
371
|
-
key: 0,
|
|
372
|
-
"is-open": sheetOpen.value,
|
|
373
|
-
"onUpdate:isOpen": _cache[0] || (_cache[0] = ($event) => sheetOpen.value = $event),
|
|
374
|
-
height: "hug",
|
|
375
|
-
label: sheetLabel.value,
|
|
376
|
-
padding: 2
|
|
377
|
-
}, {
|
|
378
|
-
default: withCtx(() => [createElementVNode("div", {
|
|
379
|
-
ref_key: "sheetSlot",
|
|
380
|
-
ref: sheetSlot,
|
|
381
|
-
class: "astryx-selector-sheet"
|
|
382
|
-
}, [createElementVNode("div", _hoisted_3, toDisplayString(sheetLabel.value), 1)], 512)]),
|
|
383
|
-
_: 1
|
|
384
|
-
}, 8, ["is-open", "label"])) : createCommentVNode("v-if", true),
|
|
385
|
-
(openBlock(), createBlock(Teleport, { to: listboxTarget.value }, [withDirectives(createElementVNode("div", {
|
|
386
|
-
id: listboxId,
|
|
387
|
-
ref_key: "listboxRef",
|
|
388
|
-
ref: listboxRef,
|
|
389
|
-
role: "listbox",
|
|
390
|
-
class: normalizeClass(["astryx-selector-listbox", { "is-sheet": isSheet.value }]),
|
|
391
|
-
"data-placement": isSheet.value ? void 0 : unref(position).placement,
|
|
392
|
-
style: normalizeStyle(listboxStyle.value),
|
|
393
|
-
tabindex: "-1"
|
|
394
|
-
}, [props.searchable ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("input", {
|
|
395
|
-
id: `${selectorId}-search`,
|
|
396
|
-
ref_key: "searchInputRef",
|
|
397
|
-
ref: searchInputRef,
|
|
398
|
-
type: "text",
|
|
399
|
-
class: "astryx-selector-search-input",
|
|
400
|
-
"aria-label": resolvedSearchPlaceholder.value,
|
|
401
|
-
placeholder: resolvedSearchPlaceholder.value,
|
|
402
|
-
value: unref(combobox).searchQuery.value,
|
|
403
|
-
onInput: onSearchInput
|
|
404
|
-
}, null, 40, _hoisted_6)])) : createCommentVNode("v-if", true), !isEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_7, [(openBlock(true), createElementBlock(Fragment, null, renderList(displayRows.value, (row, rowIndex) => {
|
|
405
|
-
return openBlock(), createElementBlock(Fragment, { key: row.kind === "section" ? `section-${rowIndex}` : row.option?.value }, [row.kind === "section" ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(row.title), 1)) : row.option && row.index != null ? (openBlock(), createElementBlock("div", {
|
|
406
|
-
key: 1,
|
|
407
|
-
id: getOptionId(row.index),
|
|
408
|
-
role: "option",
|
|
409
|
-
tabindex: "0",
|
|
410
|
-
class: normalizeClass(["astryx-selector-option", {
|
|
411
|
-
"is-active": row.index === unref(combobox).activeIndex.value,
|
|
412
|
-
"is-selected": row.option.value === props.modelValue,
|
|
413
|
-
"is-disabled": row.option.disabled
|
|
414
|
-
}]),
|
|
415
|
-
"aria-selected": row.option.value === props.modelValue,
|
|
416
|
-
"aria-disabled": row.option.disabled,
|
|
417
|
-
onClick: ($event) => onOptionClick(row.option),
|
|
418
|
-
onKeydown: [withKeys(($event) => onOptionClick(row.option), ["enter"]), withKeys(withModifiers(($event) => onOptionClick(row.option), ["prevent"]), ["space"])]
|
|
419
|
-
}, [unref(slots).option ? renderSlot(_ctx.$slots, "option", {
|
|
420
|
-
option: row.option,
|
|
421
|
-
isActive: row.index === unref(combobox).activeIndex.value,
|
|
422
|
-
isSelected: row.option.value === props.modelValue
|
|
423
|
-
}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
424
|
-
row.option.icon ? (openBlock(), createElementBlock("span", {
|
|
425
|
-
key: 0,
|
|
426
|
-
class: normalizeClass(["astryx-selector-option-icon", row.option.icon]),
|
|
427
|
-
"aria-hidden": "true"
|
|
428
|
-
}, null, 2)) : createCommentVNode("v-if", true),
|
|
429
|
-
createElementVNode("span", _hoisted_10, toDisplayString(row.option.label), 1),
|
|
430
|
-
row.option.description ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(row.option.description), 1)) : createCommentVNode("v-if", true)
|
|
431
|
-
], 64))], 42, _hoisted_9)) : createCommentVNode("v-if", true)], 64);
|
|
432
|
-
}), 128))])) : (openBlock(), createElementBlock("div", _hoisted_12, [unref(slots).empty ? renderSlot(_ctx.$slots, "empty", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(resolvedEmptyText.value), 1)], 64))]))], 14, _hoisted_4), [[vShow, unref(combobox).isOpen.value]])], 8, ["to"])),
|
|
433
|
-
props.name ? (openBlock(), createElementBlock("select", {
|
|
434
|
-
key: 1,
|
|
435
|
-
id: `${selectorId}-hidden-select`,
|
|
436
|
-
name: props.name,
|
|
437
|
-
value: props.modelValue ?? "",
|
|
438
|
-
"aria-label": props.label || resolvedPlaceholder.value,
|
|
439
|
-
tabindex: "-1",
|
|
440
|
-
style: {
|
|
441
|
-
"position": "absolute",
|
|
442
|
-
"left": "-9999px",
|
|
443
|
-
"width": "1px",
|
|
444
|
-
"height": "1px"
|
|
445
|
-
}
|
|
446
|
-
}, [_cache[3] || (_cache[3] = createElementVNode("option", { value: "" }, null, -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(flatOptions.value, (option) => {
|
|
447
|
-
return openBlock(), createElementBlock("option", {
|
|
448
|
-
key: option.value,
|
|
449
|
-
value: option.value
|
|
450
|
-
}, toDisplayString(option.label), 9, _hoisted_14);
|
|
451
|
-
}), 128))], 8, _hoisted_13)) : createCommentVNode("v-if", true)
|
|
452
|
-
]),
|
|
453
|
-
_: 3
|
|
454
|
-
}, 8, [
|
|
455
|
-
"class",
|
|
456
|
-
"label",
|
|
457
|
-
"description",
|
|
458
|
-
"is-label-hidden",
|
|
459
|
-
"is-disabled",
|
|
460
|
-
"status",
|
|
461
|
-
"status-variant",
|
|
462
|
-
"width"
|
|
463
|
-
]);
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
//#endregion
|
|
468
|
-
export { _sfc_main as t };
|
package/dist/index-Bgv4ZmBl.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { CalendarDate } from "@internationalized/date";
|
|
2
|
-
//#region src/Calendar/types.d.ts
|
|
3
|
-
interface CalendarRangeValue {
|
|
4
|
-
start: Date | null;
|
|
5
|
-
end: Date | null;
|
|
6
|
-
}
|
|
7
|
-
interface CalendarProps {
|
|
8
|
-
/** 当前选中的日期。`mode="range"` 时改用 `range`。 */
|
|
9
|
-
modelValue?: Date | null;
|
|
10
|
-
/** 选一天,或选一段起止日期。 */
|
|
11
|
-
mode?: 'single' | 'range';
|
|
12
|
-
/** 范围模式下的起止日期,用 `v-model:range` 绑定。 */
|
|
13
|
-
range?: CalendarRangeValue | null;
|
|
14
|
-
/** 并排显示的月份数。 */
|
|
15
|
-
numberOfMonths?: 1 | 2;
|
|
16
|
-
/** 打开时先显示这一天所在的月份。 */
|
|
17
|
-
focusDate?: Date;
|
|
18
|
-
/** 最小可选日期 */
|
|
19
|
-
min?: Date;
|
|
20
|
-
/** 最大可选日期 */
|
|
21
|
-
max?: Date;
|
|
22
|
-
/** 禁用的日期判断函数 */
|
|
23
|
-
isDateDisabled?: (date: Date) => boolean;
|
|
24
|
-
/** 日历标签 */
|
|
25
|
-
label?: string;
|
|
26
|
-
/** 是否禁用 */
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
}
|
|
29
|
-
interface CalendarEmits {
|
|
30
|
-
(event: 'update:modelValue', value: Date | null): void;
|
|
31
|
-
(event: 'update:range', value: CalendarRangeValue): void;
|
|
32
|
-
(event: 'change', value: Date | null): void;
|
|
33
|
-
}
|
|
34
|
-
interface CalendarSlots {
|
|
35
|
-
/** 自定义日期单元格 */
|
|
36
|
-
day?: (props: {
|
|
37
|
-
date: CalendarDate;
|
|
38
|
-
isSelected: boolean;
|
|
39
|
-
isDisabled: boolean;
|
|
40
|
-
isToday: boolean;
|
|
41
|
-
isInMonth: boolean;
|
|
42
|
-
}) => any;
|
|
43
|
-
/** 自定义头部 */
|
|
44
|
-
header?: () => any;
|
|
45
|
-
}
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/Calendar/Calendar.vue.d.ts
|
|
48
|
-
type __VLS_Slots = CalendarSlots;
|
|
49
|
-
declare const __VLS_base: import("vue").DefineComponent<CalendarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
50
|
-
change: (value: Date | null) => any;
|
|
51
|
-
"update:modelValue": (value: Date | null) => any;
|
|
52
|
-
"update:range": (value: CalendarRangeValue) => any;
|
|
53
|
-
}, string, import("vue").PublicProps, Readonly<CalendarProps> & Readonly<{
|
|
54
|
-
onChange?: ((value: Date | null) => any) | undefined;
|
|
55
|
-
"onUpdate:modelValue"?: ((value: Date | null) => any) | undefined;
|
|
56
|
-
"onUpdate:range"?: ((value: CalendarRangeValue) => any) | undefined;
|
|
57
|
-
}>, {
|
|
58
|
-
modelValue: Date | null;
|
|
59
|
-
mode: "single" | "range";
|
|
60
|
-
disabled: boolean;
|
|
61
|
-
range: CalendarRangeValue | null;
|
|
62
|
-
numberOfMonths: 1 | 2;
|
|
63
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
65
|
-
declare const _default: typeof __VLS_export;
|
|
66
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
67
|
-
new (): {
|
|
68
|
-
$slots: S;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
//#endregion
|
|
72
|
-
export { CalendarSlots as a, CalendarRangeValue as i, CalendarEmits as n, CalendarProps as r, _default as t };
|