@astryx-vue/core 0.2.3 → 0.2.4
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/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-ovx4cBjM.js → AlertDialog-B6UeBCE7.js} +2 -2
- package/dist/AppShell/index.d.ts +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-Dd-D4bA2.js → AppShell-CeBmB0Q9.js} +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/{Avatar-jmHInHwj.js → Avatar-BB4Z4LF1.js} +10 -4
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts +2 -2
- package/dist/BottomSheet/index.js +3 -2
- package/dist/{BottomSheet-Dg95HB1s.js → BottomSheet-BV6vfgGu.js} +82 -22
- package/dist/BottomSheet-o7xw-TOi.js +153 -0
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/{Breadcrumbs-CWGfgLNK.js → Breadcrumbs-D6G7f5WL.js} +1 -1
- package/dist/Button/index.d.ts +1 -1
- 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-CnOsSjMY.js → Calendar-DmTeM7PO.js} +2 -2
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-JA7ilqI_.js → Carousel-CIKrcA2r.js} +1 -1
- package/dist/Chat/index.d.ts +1 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-C7WrCOE4.js → Chat-BFox3u9D.js} +1 -1
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/{CheckboxList-CnCGnkZk.js → CheckboxList-BlPf7vPe.js} +4 -4
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-CtwrU33I.js → Citation-BG-vg9ia.js} +1 -1
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.d.ts +3 -3
- package/dist/Code/index.js +4 -4
- package/dist/{Code-BvefYRpx.js → Code-XnPuGxey.js} +1 -1
- package/dist/{CodeBlock-BZGzYeoL.js → CodeBlock-B2pnEOJY.js} +145 -15
- package/dist/Collapsible/index.d.ts +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BNbM9T9y.js → CommandPalette-DKgHzmJk.js} +10 -10
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-LtbLlrcj.js → ComplexSelector-Dv44FFhN.js} +1 -1
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +2 -2
- package/dist/{ContextMenu-DVQl0xL5.js → ContextMenu-BeJO5HYx.js} +4 -369
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-zm8sNc0t.js → DateInput-D4XFAEMp.js} +3 -3
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-DlVFzrf7.js → DateRangeInput-Cp6AZfew.js} +2 -2
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-C7Z-p6Yd.js → DateTimeInput-B6MPPp76.js} +3 -3
- package/dist/Dialog/index.d.ts +1 -1
- package/dist/Divider/index.d.ts +1 -1
- package/dist/DropdownMenu/index.d.ts +2 -2
- package/dist/DropdownMenu/index.js +3 -3
- package/dist/{DropdownMenu-BoZChdev.js → DropdownMenu--lnUeJEG.js} +3 -3
- package/dist/{DropdownMenu-u1psFjis.js → DropdownMenu-6E9jFdFe.js} +4 -4
- package/dist/{DropdownMenuRadioItem.vue-uVM0FD2f.d.ts → DropdownMenuRadioItem.vue-CXEURBcq.d.ts} +1 -1
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-CUJdTYKV.js → EmptyState-0RWymQUS.js} +2 -2
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-QdlZn7qK.js → FileInput-DuNwdbAo.js} +1 -1
- package/dist/Grid/index.d.ts +1 -1
- package/dist/Heading/index.d.ts +2 -2
- package/dist/Heading/index.js +1 -1
- package/dist/Heading-B9C3LZlS.js +94 -0
- package/dist/Indicator/index.d.ts +2 -2
- package/dist/InputGroup/index.d.ts +1 -1
- package/dist/Item-DrYJL1TG.js +590 -0
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-BSzfqZ-u.js → Lightbox-Br3o0SyQ.js} +1 -1
- package/dist/Link/index.d.ts +3 -2
- package/dist/Link/index.js +1 -1
- package/dist/Link-DCZ6922-.js +196 -0
- package/dist/List/index.d.ts +3 -3
- package/dist/List/index.js +2 -2
- package/dist/{ListItem-pGxvn6QJ.js → ListItem-CcRHWuEm.js} +8 -2
- package/dist/Markdown/index.d.ts +2 -2
- package/dist/Markdown/index.js +2 -2
- package/dist/{Markdown-B6tSqenv.js → Markdown-Bz0R3kNj.js} +274 -30
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-aN1tRn6W.js → MetadataList-CFaocx6j.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-fqcSafkc.js → MobileNavToggle-Dh3uLivq.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-B3brqdK_.js → MoreMenu-B95nRSe8.js} +2 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-BD5PMgez.js → MultiSelector-DuF5TECE.js} +4 -4
- package/dist/{NavDisclosure-DbYLDXK0.js → NavDisclosure-C6sPZ89n.js} +4 -1
- package/dist/NavHeadingSurface-Cb3x9iDx.js +287 -0
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.d.ts +2 -2
- package/dist/NavMenu/index.js +4 -3
- package/dist/NavMenu-ClIgMaxE.js +176 -0
- package/dist/{NavMenuItem-DrwIMHKO.js → NavMenuItem-E7S8gBh-.js} +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-CBeU4lEl.js → NumberInput-B4IL3s_8.js} +1 -1
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline--HVMSB6i.js → Outline-DBUuchi9.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-FMh7r-r_.js → OverflowList-aDd_oem0.js} +3 -3
- package/dist/Pagination/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DlIvESjx.js → Pagination-CNe9F6Fl.js} +181 -45
- package/dist/Popover/index.d.ts +1 -1
- package/dist/PowerSearch/index.d.ts +1 -1
- package/dist/PowerSearch/index.js +1 -1
- package/dist/{PowerSearch-CMG7Rb69.js → PowerSearch-C6U8Sq1Y.js} +13 -13
- package/dist/ProgressBar/index.d.ts +2 -2
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-DO9Chic6.js → ProgressBar-DF6WZNCI.js} +45 -6
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{Resizable-CXpvj1TZ.js → ResizeHandle-DYy0e3v9.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 +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-BpPnuWH3.js → Selector-5N-hq2nF.js} +3 -3
- package/dist/SideNav/index.d.ts +2 -2
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-D4TupqgE.js → SideNav-CT9lfspi.js} +225 -229
- 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-H-6-T5Ps.js → Stepper-BqhVCgC-.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/{Table-nqA_njNz.js → Table-CsdH8fCB.js} +4 -4
- package/dist/Text/index.d.ts +3 -3
- package/dist/Text/index.js +1 -1
- package/dist/Text-DIzZw6FA.js +86 -0
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/Theme/index.d.ts +3 -3
- package/dist/Theme/index.js +2 -2
- package/dist/Theme-CtaUWo4g.js +1246 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-CXb3m_Hv.js → Thumbnail-BnQwX1cQ.js} +2 -2
- package/dist/{TimeField-B3cndWb0.js → TimeField-Biiuv0hB.js} +1 -1
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BHQ_LKGm.js → TimeInput-C9gptCOK.js} +1 -1
- package/dist/Timer/index.d.ts +1 -1
- package/dist/Timer/index.js +1 -1
- package/dist/{Timer-B7GV6hqd.js → Timer-kxzQx3tp.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +1 -1
- package/dist/{Timestamp-Cfuxbb3i.js → Timestamp-D7bd_nF3.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-CdVLH0_H.js → Token-D2GsI_Ei.js} +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-DlD-S_8-.js → Tokenizer-rwzamZg4.js} +3 -3
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.js +1 -1
- package/dist/{Tooltip-mp0NMh_Y.js → Tooltip-C2fh9anJ.js} +23 -8
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-DzV874G7.js → TopNav-arWFLTBM.js} +112 -42
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-DEwvlZRV.js → TreeList-C9xvMpJZ.js} +1 -1
- package/dist/Typeahead/index.d.ts +2 -2
- package/dist/Typeahead/index.js +3 -2
- package/dist/Typeahead-_V11btpv.js +499 -0
- package/dist/{TypeaheadMenu-CGvo0Tud.js → TypeaheadMenu-BEObzonz.js} +46 -10
- package/dist/composables/index.d.ts +2 -2
- package/dist/composables/index.js +4 -4
- package/dist/composables-CWw6t-RJ.js +520 -0
- package/dist/{context-DmOLCubj.js → context-CPh7kE-a.js} +58 -10
- package/dist/{index-BRfR0lhb.d.ts → index-12QYAbiz.d.ts} +1 -1
- package/dist/{index-DMQG6kdM.d.ts → index-6yB8BtEu.d.ts} +2 -2
- package/dist/{index-f4NGT-e2.d.ts → index-B4OOtNP8.d.ts} +3 -3
- package/dist/index-BBtJt5_A.d.ts +26 -0
- package/dist/{index-Ch6BbxCP.d.ts → index-BH9PzQ1F.d.ts} +13 -8
- package/dist/{index-MPcg1Pm4.d.ts → index-BKr7yvVv.d.ts} +1 -1
- package/dist/{index-D_UEJIU5.d.ts → index-BPwD6aBv.d.ts} +1 -1
- package/dist/{index-D1Twv_fL.d.ts → index-BcZI402h.d.ts} +4 -4
- package/dist/{index-C8wDPDcP.d.ts → index-Bi49IrAJ.d.ts} +50 -8
- package/dist/{index-B1x05arQ.d.ts → index-BlOIC_AM.d.ts} +1 -1
- package/dist/{index-C5p2NeCr.d.ts → index-Blm197N_.d.ts} +11 -2
- package/dist/{index-Bu3oXIIS.d.ts → index-BmmdzwT9.d.ts} +6 -0
- package/dist/{index-BMn9ghAX.d.ts → index-Bu0Zd1uw.d.ts} +3 -3
- package/dist/{index-Ctu32CLv.d.ts → index-BxhJqiZ7.d.ts} +2 -2
- package/dist/{index-CA6RbRWx.d.ts → index-By2mSzUA.d.ts} +1 -1
- package/dist/{index-HV6W3xCx.d.ts → index-Byar3h1e.d.ts} +1 -1
- package/dist/{index-LIyvJTW3.d.ts → index-C3GaPqvJ.d.ts} +84 -8
- package/dist/{index-DAiGhkNZ.d.ts → index-CFIXnk5D.d.ts} +1 -1
- package/dist/{index-ViSV0RBx.d.ts → index-CI9kyg74.d.ts} +12 -2
- package/dist/{index-C-QpeUlQ.d.ts → index-CNjbOgty.d.ts} +2 -2
- package/dist/{index-BB5yVIN-.d.ts → index-CUCcYKxl.d.ts} +3 -3
- package/dist/{index-Ca8VIE4l.d.ts → index-CVn0GBdB.d.ts} +1 -1
- package/dist/{index-xfkEuGLY.d.ts → index-CZeoAr0a.d.ts} +2 -2
- package/dist/{index-C2sfHfBw.d.ts → index-D-ezcKaY.d.ts} +3 -3
- package/dist/{index-BcJBLWJ0.d.ts → index-DA52oIdw.d.ts} +2 -2
- package/dist/{index-D7-WTV6I.d.ts → index-D_nYxnNv.d.ts} +1 -1
- package/dist/{index-Cm_TiLXU.d.ts → index-Dgg0bHVM.d.ts} +7 -3
- package/dist/index-DxR1FChm.d.ts +158 -0
- package/dist/{index-BTAgQRP0.d.ts → index-EtZgovdH.d.ts} +169 -81
- package/dist/{index-B9f1rUEv.d.ts → index-XuAAcYiP.d.ts} +1 -1
- package/dist/{index-D0TlUOtG.d.ts → index-YmSe1ujk.d.ts} +76 -3
- package/dist/{index-BMrggCw-.d.ts → index-bvr3WHvs.d.ts} +1 -1
- package/dist/{index-CDDMDHJM.d.ts → index-c67ca7eJ.d.ts} +1 -1
- package/dist/{index-D8o50qOE.d.ts → index-cL3q7O4R.d.ts} +32 -3
- package/dist/{index-CGZ2xi3r.d.ts → index-eshFLli0.d.ts} +40 -3
- package/dist/{index-DkVEBdWa.d.ts → index-fa72tWIU.d.ts} +2 -2
- package/dist/{index-COxy6LEW.d.ts → index-gW0HW02U.d.ts} +1 -1
- package/dist/{index-foQMNKZO.d.ts → index-hCpxKePE.d.ts} +49 -3
- package/dist/{index-DxsKyAxq.d.ts → index-vizlhXVs.d.ts} +131 -2
- package/dist/{index-DfgHJE7H.d.ts → index-z3uLM1O6.d.ts} +153 -24
- package/dist/index.d.ts +81 -80
- package/dist/index.js +118 -115
- package/dist/locale/index.d.ts +2 -2
- package/dist/locale/index.js +3 -3
- package/dist/locale-sLw5Caia.js +917 -0
- package/dist/{searchResultMessage-DN0HeRRB.js → searchResultMessage-CCnq-_ce.js} +1 -1
- package/dist/syntaxTheme-CwVEcVDk.d.ts +57 -0
- package/dist/{syntaxTheme-ClpWALZX.js → syntaxTheme-R7xnu5x5.js} +24 -3
- package/dist/{types-Bt-lSgYX.d.ts → types-D9nP_X-c.d.ts} +14 -1
- package/dist/{types-CAZY4Xua.d.ts → types-DGYHIu4I.d.ts} +30 -1
- package/dist/types-D_J66aPN.d.ts +85 -0
- package/dist/types-gKsEkk2g.d.ts +320 -0
- package/dist/{useMenuDrillIn-OaEwjK44.js → useMenuDrillIn-BgjJcY3K.js} +1 -1
- package/dist/useMenuPress-DUmEy4TB.js +425 -0
- package/dist/{composables-DDI08XFF.js → useResizable-B3ahKLoZ.js} +73 -248
- package/dist/useTruncation-B5qXQzAP.js +53 -0
- package/locales/SOURCE.json +37 -0
- package/locales/af-ZA.json +1482 -0
- package/locales/ar-SA.json +1482 -0
- package/locales/ca-ES.json +1482 -0
- package/locales/cs-CZ.json +1482 -0
- package/locales/da-DK.json +1482 -0
- package/locales/de-DE.json +1482 -0
- package/locales/el-GR.json +1482 -0
- package/locales/en.json +1646 -0
- package/locales/es-ES.json +1482 -0
- package/locales/fi-FI.json +1482 -0
- package/locales/fr-FR.json +1482 -0
- package/locales/he-IL.json +1482 -0
- package/locales/hu-HU.json +1482 -0
- package/locales/it-IT.json +1482 -0
- package/locales/ja-JP.json +1482 -0
- package/locales/ko-KR.json +1482 -0
- package/locales/nl-NL.json +1482 -0
- package/locales/no-NO.json +1482 -0
- package/locales/pl-PL.json +1482 -0
- package/locales/pt-BR.json +1482 -0
- package/locales/pt-PT.json +1482 -0
- package/locales/ro-RO.json +1482 -0
- package/locales/ru-RU.json +1482 -0
- package/locales/sr-SP.json +1482 -0
- package/locales/sv-SE.json +1482 -0
- package/locales/tr-TR.json +1482 -0
- package/locales/uk-UA.json +1482 -0
- package/locales/vi-VN.json +1482 -0
- package/locales/zh-CN.json +1482 -0
- package/locales/zh-TW.json +1482 -0
- package/package.json +3 -1
- package/styles/bottom-sheet.css +27 -0
- package/styles/code.css +62 -0
- package/styles/container-reveal.css +104 -0
- package/styles/heading.css +47 -0
- package/styles/keyboard-hint.css +28 -0
- package/styles/link.css +34 -0
- package/styles/list.css +88 -1
- package/styles/markdown.css +12 -0
- package/styles/pagination.css +30 -0
- package/styles/progress-bar.css +49 -0
- package/styles/side-nav.css +36 -1
- package/styles/text.css +18 -0
- package/styles/top-nav.css +145 -6
- package/styles/typeahead.css +24 -0
- package/styles.css +2 -0
- package/dist/Heading-Dugosn6j.js +0 -43
- package/dist/Item-C1z6gXn8.js +0 -289
- package/dist/Link-DqdQZ37C.js +0 -141
- package/dist/Text-BHVghsWo.js +0 -53
- package/dist/Theme-CejS9MHm.js +0 -447
- package/dist/Typeahead-DQ3tmqYe.js +0 -375
- package/dist/index-Bqb_Fyju.d.ts +0 -80
- package/dist/index-Dg3ZmwEg.d.ts +0 -75
- package/dist/locale-CCwVnyMZ.js +0 -42
- package/dist/syntaxTheme-Bcs1YMF7.d.ts +0 -38
- package/dist/types-jmqqnkKA.d.ts +0 -163
- package/dist/useHotkeys-dABSK1o9.js +0 -80
- package/dist/useLongPress-Cyxwa73s.js +0 -60
- package/dist/{index-BXkNZF3q.d.ts → index-IdK2g5B4.d.ts} +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
1
|
+
import { o as useAstryxMessages } from "./context-CPh7kE-a.js";
|
|
2
|
+
import { t as usePendingChange } from "./usePendingChange-ib-h8FZK.js";
|
|
3
|
+
import { t as _sfc_main$1 } from "./Selector-5N-hq2nF.js";
|
|
4
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, vShow, watch, withDirectives, withKeys } from "vue";
|
|
4
5
|
import "../styles/pagination.css";
|
|
5
6
|
/**
|
|
6
7
|
* 按容器宽度决定分页怎么排。
|
|
@@ -47,27 +48,42 @@ function generatePageRange(currentPage, totalPages, siblingCount) {
|
|
|
47
48
|
/**
|
|
48
49
|
* 分页逻辑:页码计算、页码范围生成。
|
|
49
50
|
*/
|
|
51
|
+
function pageStride(step) {
|
|
52
|
+
return Number.isInteger(step) && step != null && step >= 1 ? step : 1;
|
|
53
|
+
}
|
|
50
54
|
function usePagination(options) {
|
|
51
|
-
const { page, pageSize, total, onPageChange, onPageSizeChange, siblingCount } = options;
|
|
55
|
+
const { page, pageSize, total, onPageChange, onPageSizeChange, siblingCount, step, hasMore } = options;
|
|
52
56
|
const totalPages = computed(() => {
|
|
53
57
|
return Math.max(1, Math.ceil(total.value / pageSize.value));
|
|
54
58
|
});
|
|
59
|
+
const isCursor = computed(() => toValue(hasMore) !== void 0 && total.value <= 0);
|
|
55
60
|
const canPrevious = computed(() => page.value > 1);
|
|
56
|
-
const canNext = computed(() => page.value < totalPages.value);
|
|
61
|
+
const canNext = computed(() => isCursor.value ? toValue(hasMore) === true : page.value < totalPages.value);
|
|
57
62
|
const pageNumbers = computed(() => {
|
|
63
|
+
if (isCursor.value) return [];
|
|
58
64
|
const count = toValue(siblingCount) ?? 1;
|
|
59
65
|
return generatePageRange(page.value, totalPages.value, count);
|
|
60
66
|
});
|
|
61
67
|
function previous() {
|
|
62
|
-
if (canPrevious.value)
|
|
68
|
+
if (!canPrevious.value) return;
|
|
69
|
+
onPageChange(Math.max(1, page.value - pageStride(toValue(step))));
|
|
63
70
|
}
|
|
64
71
|
function next() {
|
|
65
|
-
if (canNext.value)
|
|
72
|
+
if (!canNext.value) return;
|
|
73
|
+
const target = page.value + pageStride(toValue(step));
|
|
74
|
+
onPageChange(isCursor.value ? target : Math.min(target, totalPages.value));
|
|
66
75
|
}
|
|
67
76
|
function goto(targetPage) {
|
|
68
|
-
const
|
|
77
|
+
const lower = Math.max(1, targetPage);
|
|
78
|
+
const clamped = isCursor.value ? lower : Math.min(lower, totalPages.value);
|
|
69
79
|
if (clamped !== page.value) onPageChange(clamped);
|
|
70
80
|
}
|
|
81
|
+
function first() {
|
|
82
|
+
if (canPrevious.value) onPageChange(1);
|
|
83
|
+
}
|
|
84
|
+
function last() {
|
|
85
|
+
if (!isCursor.value && canNext.value) onPageChange(totalPages.value);
|
|
86
|
+
}
|
|
71
87
|
function setPageSize(size) {
|
|
72
88
|
onPageSizeChange?.(size);
|
|
73
89
|
const newTotalPages = Math.max(1, Math.ceil(total.value / size));
|
|
@@ -81,6 +97,9 @@ function usePagination(options) {
|
|
|
81
97
|
previous,
|
|
82
98
|
next,
|
|
83
99
|
goto,
|
|
100
|
+
first,
|
|
101
|
+
last,
|
|
102
|
+
isCursor,
|
|
84
103
|
setPageSize
|
|
85
104
|
};
|
|
86
105
|
}
|
|
@@ -90,7 +109,8 @@ const _hoisted_1 = [
|
|
|
90
109
|
"data-density",
|
|
91
110
|
"data-variant",
|
|
92
111
|
"data-size",
|
|
93
|
-
"aria-label"
|
|
112
|
+
"aria-label",
|
|
113
|
+
"aria-busy"
|
|
94
114
|
];
|
|
95
115
|
const _hoisted_2 = {
|
|
96
116
|
key: 0,
|
|
@@ -98,46 +118,66 @@ const _hoisted_2 = {
|
|
|
98
118
|
};
|
|
99
119
|
const _hoisted_3 = { class: "astryx-pagination-content" };
|
|
100
120
|
const _hoisted_4 = ["disabled", "aria-label"];
|
|
101
|
-
const _hoisted_5 =
|
|
121
|
+
const _hoisted_5 = ["disabled", "aria-label"];
|
|
122
|
+
const _hoisted_6 = {
|
|
102
123
|
class: "astryx-pagination-label",
|
|
103
124
|
"aria-hidden": "true"
|
|
104
125
|
};
|
|
105
|
-
const
|
|
126
|
+
const _hoisted_7 = {
|
|
127
|
+
key: 1,
|
|
128
|
+
class: "astryx-pagination-input"
|
|
129
|
+
};
|
|
130
|
+
const _hoisted_8 = {
|
|
131
|
+
class: "astryx-pagination-input-label",
|
|
132
|
+
"aria-hidden": "true"
|
|
133
|
+
};
|
|
134
|
+
const _hoisted_9 = [
|
|
135
|
+
"max",
|
|
136
|
+
"value",
|
|
137
|
+
"disabled",
|
|
138
|
+
"aria-label"
|
|
139
|
+
];
|
|
140
|
+
const _hoisted_10 = {
|
|
106
141
|
key: 0,
|
|
142
|
+
class: "astryx-pagination-input-total"
|
|
143
|
+
};
|
|
144
|
+
const _hoisted_11 = {
|
|
145
|
+
key: 2,
|
|
107
146
|
class: "astryx-pagination-count"
|
|
108
147
|
};
|
|
109
|
-
const
|
|
110
|
-
key:
|
|
148
|
+
const _hoisted_12 = {
|
|
149
|
+
key: 3,
|
|
111
150
|
class: "astryx-pagination-count"
|
|
112
151
|
};
|
|
113
|
-
const
|
|
114
|
-
const
|
|
152
|
+
const _hoisted_13 = ["aria-label"];
|
|
153
|
+
const _hoisted_14 = [
|
|
115
154
|
"disabled",
|
|
116
155
|
"aria-current",
|
|
117
156
|
"aria-label",
|
|
118
157
|
"onClick"
|
|
119
158
|
];
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
key:
|
|
159
|
+
const _hoisted_15 = ["aria-hidden"];
|
|
160
|
+
const _hoisted_16 = {
|
|
161
|
+
key: 6,
|
|
123
162
|
class: "astryx-pagination-pages"
|
|
124
163
|
};
|
|
125
|
-
const
|
|
164
|
+
const _hoisted_17 = [
|
|
126
165
|
"disabled",
|
|
127
166
|
"aria-label",
|
|
128
167
|
"aria-current",
|
|
129
168
|
"onClick"
|
|
130
169
|
];
|
|
131
|
-
const
|
|
132
|
-
const
|
|
170
|
+
const _hoisted_18 = ["disabled", "aria-label"];
|
|
171
|
+
const _hoisted_19 = {
|
|
133
172
|
class: "astryx-pagination-label",
|
|
134
173
|
"aria-hidden": "true"
|
|
135
174
|
};
|
|
136
|
-
const
|
|
137
|
-
|
|
175
|
+
const _hoisted_20 = ["disabled", "aria-label"];
|
|
176
|
+
const _hoisted_21 = {
|
|
177
|
+
key: 8,
|
|
138
178
|
class: "astryx-pagination-size-changer"
|
|
139
179
|
};
|
|
140
|
-
const
|
|
180
|
+
const _hoisted_22 = { class: "astryx-pagination-size-label" };
|
|
141
181
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
142
182
|
name: "AstryxPagination",
|
|
143
183
|
__name: "Pagination",
|
|
@@ -147,6 +187,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
147
187
|
total: { default: 0 },
|
|
148
188
|
totalPages: {},
|
|
149
189
|
variant: { default: "pages" },
|
|
190
|
+
siblingCount: {},
|
|
191
|
+
step: { default: 1 },
|
|
192
|
+
hasMore: { type: Boolean },
|
|
193
|
+
pageLabel: {},
|
|
194
|
+
hasFirstLast: {
|
|
195
|
+
type: [Boolean, null],
|
|
196
|
+
default: null
|
|
197
|
+
},
|
|
198
|
+
changeAction: {},
|
|
150
199
|
size: { default: "md" },
|
|
151
200
|
showSizeChanger: {
|
|
152
201
|
type: Boolean,
|
|
@@ -179,9 +228,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
179
228
|
const props = __props;
|
|
180
229
|
const emit = __emit;
|
|
181
230
|
const messages = useAstryxMessages();
|
|
182
|
-
const
|
|
183
|
-
const
|
|
231
|
+
const stride = computed(() => Number.isInteger(props.step) && props.step >= 1 ? props.step : 1);
|
|
232
|
+
const resolvedPrevLabel = computed(() => props.prevLabel ?? (stride.value > 1 ? messages.value.pagination.previousBy(stride.value) : messages.value.pagination.previous));
|
|
233
|
+
const resolvedNextLabel = computed(() => props.nextLabel ?? (stride.value > 1 ? messages.value.pagination.nextBy(stride.value) : messages.value.pagination.next));
|
|
184
234
|
const resolvedPageSizeLabel = computed(() => props.pageSizeLabel ?? messages.value.pagination.perPage);
|
|
235
|
+
const resolvedPageLabel = computed(() => props.pageLabel ?? messages.value.pagination.pageLabel);
|
|
236
|
+
const pending = usePendingChange(() => props.changeAction);
|
|
185
237
|
function resolvedItemTotal() {
|
|
186
238
|
if (props.total > 0) return props.total;
|
|
187
239
|
if (props.totalPages != null && props.totalPages > 0) return props.totalPages * props.pageSize;
|
|
@@ -193,7 +245,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
193
245
|
const variant = computed(() => props.variant);
|
|
194
246
|
const root = ref(null);
|
|
195
247
|
const density = ref("full");
|
|
196
|
-
const siblingCount = computed(() =>
|
|
248
|
+
const siblingCount = computed(() => {
|
|
249
|
+
if (density.value !== "full") return siblingCountForDensity(density.value);
|
|
250
|
+
return props.siblingCount ?? 1;
|
|
251
|
+
});
|
|
197
252
|
let resizeObserver;
|
|
198
253
|
function applyContainerWidth(width) {
|
|
199
254
|
density.value = paginationDensityForWidth(width);
|
|
@@ -215,10 +270,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
215
270
|
pageSize: pageSizeRef,
|
|
216
271
|
total: totalRef,
|
|
217
272
|
siblingCount,
|
|
273
|
+
step: stride,
|
|
274
|
+
hasMore: computed(() => props.hasMore),
|
|
218
275
|
onPageChange: (page) => {
|
|
219
276
|
pageRef.value = page;
|
|
220
277
|
emit("update:page", page);
|
|
221
278
|
emit("change", page, pageSizeRef.value);
|
|
279
|
+
pending.run(page);
|
|
222
280
|
},
|
|
223
281
|
onPageSizeChange: (size) => {
|
|
224
282
|
pageSizeRef.value = size;
|
|
@@ -232,6 +290,28 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
232
290
|
totalRef.value = resolvedItemTotal();
|
|
233
291
|
}
|
|
234
292
|
syncFromProps();
|
|
293
|
+
watch(() => props.page, (page) => {
|
|
294
|
+
if (page !== pageRef.value) pageRef.value = page;
|
|
295
|
+
});
|
|
296
|
+
watch(() => props.pageSize, (pageSize) => {
|
|
297
|
+
if (pageSize !== pageSizeRef.value) pageSizeRef.value = pageSize;
|
|
298
|
+
});
|
|
299
|
+
watch(() => [
|
|
300
|
+
props.total,
|
|
301
|
+
props.totalPages,
|
|
302
|
+
props.pageSize
|
|
303
|
+
], () => {
|
|
304
|
+
totalRef.value = resolvedItemTotal();
|
|
305
|
+
});
|
|
306
|
+
const showFirstLast = computed(() => {
|
|
307
|
+
if (pagination.isCursor.value) return false;
|
|
308
|
+
return (props.hasFirstLast ?? props.variant === "input") && pagination.totalPages.value > 1;
|
|
309
|
+
});
|
|
310
|
+
function onInputCommit(event) {
|
|
311
|
+
const raw = Number(event.target.value);
|
|
312
|
+
if (!Number.isFinite(raw)) return;
|
|
313
|
+
pagination.goto(Math.trunc(raw));
|
|
314
|
+
}
|
|
235
315
|
const pageSizeOptions = computed(() => {
|
|
236
316
|
return props.pageSizeOptions.map((size) => ({
|
|
237
317
|
value: size,
|
|
@@ -262,19 +342,40 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
262
342
|
"data-variant": variant.value,
|
|
263
343
|
"data-size": props.size,
|
|
264
344
|
role: "navigation",
|
|
265
|
-
"aria-label": unref(messages).pagination.nav
|
|
345
|
+
"aria-label": unref(messages).pagination.nav,
|
|
346
|
+
"aria-busy": unref(pending).busy.value || void 0
|
|
266
347
|
}, [props.showTotal ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "total", {
|
|
267
348
|
total: totalRef.value,
|
|
268
349
|
from: fromIndex.value,
|
|
269
350
|
to: toIndex.value
|
|
270
351
|
}, () => [createTextVNode(toDisplayString(unref(messages).pagination.total(totalRef.value, fromIndex.value, toIndex.value)), 1)])])) : createCommentVNode("v-if", true), createElementVNode("div", _hoisted_3, [
|
|
352
|
+
showFirstLast.value ? (openBlock(), createElementBlock("button", {
|
|
353
|
+
key: 0,
|
|
354
|
+
type: "button",
|
|
355
|
+
class: "astryx-pagination-button astryx-pagination-first",
|
|
356
|
+
disabled: props.disabled || !unref(pagination).canPrevious.value,
|
|
357
|
+
"aria-label": unref(messages).pagination.first,
|
|
358
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(pagination).first && unref(pagination).first(...args))
|
|
359
|
+
}, [..._cache[5] || (_cache[5] = [createElementVNode("svg", {
|
|
360
|
+
width: "16",
|
|
361
|
+
height: "16",
|
|
362
|
+
viewBox: "0 0 16 16",
|
|
363
|
+
fill: "none",
|
|
364
|
+
"aria-hidden": "true"
|
|
365
|
+
}, [createElementVNode("path", {
|
|
366
|
+
d: "M11 12L7 8L11 4M7 12L3 8L7 4",
|
|
367
|
+
stroke: "currentColor",
|
|
368
|
+
"stroke-width": "1.5",
|
|
369
|
+
"stroke-linecap": "round",
|
|
370
|
+
"stroke-linejoin": "round"
|
|
371
|
+
})], -1)])], 8, _hoisted_4)) : createCommentVNode("v-if", true),
|
|
271
372
|
createElementVNode("button", {
|
|
272
373
|
type: "button",
|
|
273
374
|
class: "astryx-pagination-button astryx-pagination-prev",
|
|
274
375
|
disabled: props.disabled || !unref(pagination).canPrevious.value,
|
|
275
376
|
"aria-label": resolvedPrevLabel.value,
|
|
276
|
-
onClick: _cache[
|
|
277
|
-
}, [_cache[
|
|
377
|
+
onClick: _cache[1] || (_cache[1] = (...args) => unref(pagination).previous && unref(pagination).previous(...args))
|
|
378
|
+
}, [_cache[6] || (_cache[6] = createElementVNode("svg", {
|
|
278
379
|
width: "16",
|
|
279
380
|
height: "16",
|
|
280
381
|
viewBox: "0 0 16 16",
|
|
@@ -285,9 +386,24 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
285
386
|
"stroke-width": "1.5",
|
|
286
387
|
"stroke-linecap": "round",
|
|
287
388
|
"stroke-linejoin": "round"
|
|
288
|
-
})], -1)), createElementVNode("span",
|
|
289
|
-
variant.value === "
|
|
290
|
-
|
|
389
|
+
})], -1)), createElementVNode("span", _hoisted_6, toDisplayString(resolvedPrevLabel.value), 1)], 8, _hoisted_5),
|
|
390
|
+
variant.value === "input" ? (openBlock(), createElementBlock("span", _hoisted_7, [
|
|
391
|
+
createElementVNode("span", _hoisted_8, toDisplayString(resolvedPageLabel.value), 1),
|
|
392
|
+
createElementVNode("input", {
|
|
393
|
+
class: "astryx-pagination-input-field",
|
|
394
|
+
type: "number",
|
|
395
|
+
inputmode: "numeric",
|
|
396
|
+
min: 1,
|
|
397
|
+
max: unref(pagination).isCursor.value ? void 0 : unref(pagination).totalPages.value,
|
|
398
|
+
value: pageRef.value,
|
|
399
|
+
disabled: props.disabled || unref(pagination).isCursor.value,
|
|
400
|
+
"aria-label": unref(messages).pagination.goToPage,
|
|
401
|
+
onChange: onInputCommit,
|
|
402
|
+
onKeydown: withKeys(onInputCommit, ["enter"])
|
|
403
|
+
}, null, 40, _hoisted_9),
|
|
404
|
+
!unref(pagination).isCursor.value ? (openBlock(), createElementBlock("span", _hoisted_10, toDisplayString(unref(messages).pagination.ofTotal(unref(pagination).totalPages.value)), 1)) : createCommentVNode("v-if", true)
|
|
405
|
+
])) : variant.value === "count" && !unref(pagination).isCursor.value ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(unref(messages).pagination.total(totalRef.value, fromIndex.value, toIndex.value)), 1)) : variant.value === "compact" && !unref(pagination).isCursor.value ? (openBlock(), createElementBlock("span", _hoisted_12, toDisplayString(unref(messages).pagination.pageOf(pageRef.value, unref(pagination).totalPages.value)), 1)) : variant.value === "dots" && !unref(pagination).isCursor.value ? (openBlock(), createElementBlock("div", {
|
|
406
|
+
key: 4,
|
|
291
407
|
class: "astryx-pagination-dots",
|
|
292
408
|
role: "group",
|
|
293
409
|
"aria-label": unref(messages).pagination.nav
|
|
@@ -300,14 +416,14 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
300
416
|
"aria-current": dotPage === pageRef.value ? "page" : void 0,
|
|
301
417
|
"aria-label": unref(messages).pagination.page(dotPage),
|
|
302
418
|
onClick: ($event) => onPageClick(dotPage)
|
|
303
|
-
}, null, 10,
|
|
304
|
-
}), 128))], 8,
|
|
305
|
-
variant.value === "pages" ? (openBlock(), createElementBlock("span", {
|
|
306
|
-
key:
|
|
419
|
+
}, null, 10, _hoisted_14);
|
|
420
|
+
}), 128))], 8, _hoisted_13)) : createCommentVNode("v-if", true),
|
|
421
|
+
variant.value === "pages" && !unref(pagination).isCursor.value ? (openBlock(), createElementBlock("span", {
|
|
422
|
+
key: 5,
|
|
307
423
|
class: "astryx-pagination-compact",
|
|
308
424
|
"aria-hidden": density.value === "minimal" ? void 0 : true
|
|
309
|
-
}, toDisplayString(unref(messages).pagination.compact(pageRef.value, unref(pagination).totalPages.value)), 9,
|
|
310
|
-
variant.value === "pages" ? withDirectives((openBlock(), createElementBlock("div",
|
|
425
|
+
}, toDisplayString(unref(messages).pagination.compact(pageRef.value, unref(pagination).totalPages.value)), 9, _hoisted_15)) : createCommentVNode("v-if", true),
|
|
426
|
+
variant.value === "pages" && !unref(pagination).isCursor.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_16, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagination).pageNumbers.value, (page, index) => {
|
|
311
427
|
return openBlock(), createElementBlock("button", {
|
|
312
428
|
key: index,
|
|
313
429
|
type: "button",
|
|
@@ -319,15 +435,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
319
435
|
"aria-label": isEllipsis(page) ? unref(messages).pagination.more : unref(messages).pagination.page(page),
|
|
320
436
|
"aria-current": page === pageRef.value ? "page" : void 0,
|
|
321
437
|
onClick: ($event) => onPageClick(page)
|
|
322
|
-
}, toDisplayString(isEllipsis(page) ? "..." : page), 11,
|
|
438
|
+
}, toDisplayString(isEllipsis(page) ? "..." : page), 11, _hoisted_17);
|
|
323
439
|
}), 128))], 512)), [[vShow, density.value !== "minimal"]]) : createCommentVNode("v-if", true),
|
|
324
440
|
createElementVNode("button", {
|
|
325
441
|
type: "button",
|
|
326
442
|
class: "astryx-pagination-button astryx-pagination-next",
|
|
327
443
|
disabled: props.disabled || !unref(pagination).canNext.value,
|
|
328
444
|
"aria-label": resolvedNextLabel.value,
|
|
329
|
-
onClick: _cache[
|
|
330
|
-
}, [createElementVNode("span",
|
|
445
|
+
onClick: _cache[2] || (_cache[2] = (...args) => unref(pagination).next && unref(pagination).next(...args))
|
|
446
|
+
}, [createElementVNode("span", _hoisted_19, toDisplayString(resolvedNextLabel.value), 1), _cache[7] || (_cache[7] = createElementVNode("svg", {
|
|
331
447
|
width: "16",
|
|
332
448
|
height: "16",
|
|
333
449
|
viewBox: "0 0 16 16",
|
|
@@ -338,13 +454,33 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
338
454
|
"stroke-width": "1.5",
|
|
339
455
|
"stroke-linecap": "round",
|
|
340
456
|
"stroke-linejoin": "round"
|
|
341
|
-
})], -1))], 8,
|
|
342
|
-
|
|
457
|
+
})], -1))], 8, _hoisted_18),
|
|
458
|
+
showFirstLast.value ? (openBlock(), createElementBlock("button", {
|
|
459
|
+
key: 7,
|
|
460
|
+
type: "button",
|
|
461
|
+
class: "astryx-pagination-button astryx-pagination-last",
|
|
462
|
+
disabled: props.disabled || !unref(pagination).canNext.value,
|
|
463
|
+
"aria-label": unref(messages).pagination.last,
|
|
464
|
+
onClick: _cache[3] || (_cache[3] = (...args) => unref(pagination).last && unref(pagination).last(...args))
|
|
465
|
+
}, [..._cache[8] || (_cache[8] = [createElementVNode("svg", {
|
|
466
|
+
width: "16",
|
|
467
|
+
height: "16",
|
|
468
|
+
viewBox: "0 0 16 16",
|
|
469
|
+
fill: "none",
|
|
470
|
+
"aria-hidden": "true"
|
|
471
|
+
}, [createElementVNode("path", {
|
|
472
|
+
d: "M5 4L9 8L5 12M9 4L13 8L9 12",
|
|
473
|
+
stroke: "currentColor",
|
|
474
|
+
"stroke-width": "1.5",
|
|
475
|
+
"stroke-linecap": "round",
|
|
476
|
+
"stroke-linejoin": "round"
|
|
477
|
+
})], -1)])], 8, _hoisted_20)) : createCommentVNode("v-if", true),
|
|
478
|
+
props.showSizeChanger ? (openBlock(), createElementBlock("div", _hoisted_21, [createElementVNode("span", _hoisted_22, toDisplayString(resolvedPageSizeLabel.value), 1), createVNode(_sfc_main$1, {
|
|
343
479
|
"model-value": pageSizeRef.value,
|
|
344
480
|
options: pageSizeOptions.value,
|
|
345
481
|
disabled: props.disabled,
|
|
346
482
|
size: "sm",
|
|
347
|
-
"onUpdate:modelValue": _cache[
|
|
483
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = (size) => size && unref(pagination).setPageSize(Number(size)))
|
|
348
484
|
}, null, 8, [
|
|
349
485
|
"model-value",
|
|
350
486
|
"options",
|
package/dist/Popover/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as PopoverRole, i as PopoverProps, n as PopoverPadding, r as PopoverPlacement, t as PopoverAlignment } from "../types-Db3Owy8Q.js";
|
|
2
|
-
import { t as _default } from "../index-
|
|
2
|
+
import { t as _default } from "../index-Bu0Zd1uw.js";
|
|
3
3
|
export { _default as Popover, type PopoverAlignment, type PopoverPadding, type PopoverPlacement, type PopoverProps, type PopoverRole };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as PowerSearchItem, C as PowerSearchEmits, D as PowerSearchFieldType, E as PowerSearchFieldDefinition, F as PowerSearchSlots, I as PowerSearchStatus, M as PowerSearchOverflow, N as PowerSearchProps, O as PowerSearchFilter, P as PowerSearchSize, S as PowerSearchConfig, T as PowerSearchField, _ as FilterValue, a as usePowerSearchConfig, b as PowerSearchChangeType, c as resolveOperatorLabel, d as formatFilterValue, f as completePowerSearchFilter, g as DateTimeRangePart, h as DateTimeRange, i as createPowerSearchConfig, j as PowerSearchOperator, k as PowerSearchHandle, l as formatDateAbsolute, m as createPowerSearchLookup, n as InferPowerSearchData, o as _default, p as PowerSearchLookup, r as applyPowerSearchFilters, s as resolveEditorPlacement, t as searchPowerSearchFields, u as formatDateAbsoluteCompact, v as OperatorValue, w as PowerSearchEntity, x as PowerSearchComponents, y as PartialFilter } from "../index-
|
|
1
|
+
import { A as PowerSearchItem, C as PowerSearchEmits, D as PowerSearchFieldType, E as PowerSearchFieldDefinition, F as PowerSearchSlots, I as PowerSearchStatus, M as PowerSearchOverflow, N as PowerSearchProps, O as PowerSearchFilter, P as PowerSearchSize, S as PowerSearchConfig, T as PowerSearchField, _ as FilterValue, a as usePowerSearchConfig, b as PowerSearchChangeType, c as resolveOperatorLabel, d as formatFilterValue, f as completePowerSearchFilter, g as DateTimeRangePart, h as DateTimeRange, i as createPowerSearchConfig, j as PowerSearchOperator, k as PowerSearchHandle, l as formatDateAbsolute, m as createPowerSearchLookup, n as InferPowerSearchData, o as _default, p as PowerSearchLookup, r as applyPowerSearchFilters, s as resolveEditorPlacement, t as searchPowerSearchFields, u as formatDateAbsoluteCompact, v as OperatorValue, w as PowerSearchEntity, x as PowerSearchComponents, y as PartialFilter } from "../index-6yB8BtEu.js";
|
|
2
2
|
export { type DateTimeRange, type DateTimeRangePart, type FilterValue, type InferPowerSearchData, type OperatorValue, type PartialFilter, _default as PowerSearch, type PowerSearchChangeType, type PowerSearchComponents, type PowerSearchConfig, type PowerSearchEmits, type PowerSearchEntity, type PowerSearchField, type PowerSearchFieldDefinition, type PowerSearchFieldType, type PowerSearchFilter, type PowerSearchHandle, type PowerSearchItem, type PowerSearchLookup, type PowerSearchOperator, type PowerSearchOverflow, type PowerSearchProps, type PowerSearchSize, type PowerSearchSlots, type PowerSearchStatus, applyPowerSearchFilters, completePowerSearchFilter, createPowerSearchConfig, createPowerSearchLookup, formatDateAbsolute, formatDateAbsoluteCompact, formatFilterValue, resolveEditorPlacement, resolveOperatorLabel, searchPowerSearchFields, usePowerSearchConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as searchPowerSearchFields, c as formatDateAbsolute, d as createPowerSearchLookup, f as completePowerSearchFilter, i as _sfc_main, l as formatDateAbsoluteCompact, n as createPowerSearchConfig, o as resolveEditorPlacement, r as usePowerSearchConfig, s as resolveOperatorLabel, t as applyPowerSearchFilters, u as formatFilterValue } from "../PowerSearch-
|
|
1
|
+
import { a as searchPowerSearchFields, c as formatDateAbsolute, d as createPowerSearchLookup, f as completePowerSearchFilter, i as _sfc_main, l as formatDateAbsoluteCompact, n as createPowerSearchConfig, o as resolveEditorPlacement, r as usePowerSearchConfig, s as resolveOperatorLabel, t as applyPowerSearchFilters, u as formatFilterValue } from "../PowerSearch-C6U8Sq1Y.js";
|
|
2
2
|
export { _sfc_main as PowerSearch, applyPowerSearchFilters, completePowerSearchFilter, createPowerSearchConfig, createPowerSearchLookup, formatDateAbsolute, formatDateAbsoluteCompact, formatFilterValue, resolveEditorPlacement, resolveOperatorLabel, searchPowerSearchFields, usePowerSearchConfig };
|
|
@@ -2,24 +2,24 @@ import { t as _sfc_main$5 } from "./Button-DrqeomlE.js";
|
|
|
2
2
|
import { t as useAnnounce } from "./announce-Cnio10Wk.js";
|
|
3
3
|
import { t as createStaticSource } from "./useAsyncSource-Gk0VtE7_.js";
|
|
4
4
|
import { t as useDismiss } from "./useDismiss-Cj8x_51F.js";
|
|
5
|
+
import { a as useAstryxLocale, o as useAstryxMessages } from "./context-CPh7kE-a.js";
|
|
5
6
|
import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
6
|
-
import {
|
|
7
|
-
import { t as _sfc_main$6 } from "./Tooltip-mp0NMh_Y.js";
|
|
7
|
+
import { t as _sfc_main$6 } from "./Tooltip-C2fh9anJ.js";
|
|
8
8
|
import { t as _sfc_main$7 } from "./Icon-bteSId7T.js";
|
|
9
9
|
import { t as _sfc_main$8 } from "./Field-8zRxzDHE.js";
|
|
10
|
-
import { t as _sfc_main$9 } from "./DateInput-
|
|
11
|
-
import { t as _sfc_main$10 } from "./DateRangeInput-
|
|
12
|
-
import { t as _sfc_main$11 } from "./DateTimeInput-
|
|
13
|
-
import { t as _sfc_main$12 } from "./Token-
|
|
10
|
+
import { t as _sfc_main$9 } from "./DateInput-D4XFAEMp.js";
|
|
11
|
+
import { t as _sfc_main$10 } from "./DateRangeInput-Cp6AZfew.js";
|
|
12
|
+
import { t as _sfc_main$11 } from "./DateTimeInput-B6MPPp76.js";
|
|
13
|
+
import { t as _sfc_main$12 } from "./Token-D2GsI_Ei.js";
|
|
14
14
|
import { n as useAnchoredListbox, t as scrollOptionIntoView } from "./useAnchoredListbox-BN9LQnon.js";
|
|
15
|
-
import { t as _sfc_main$13 } from "./MultiSelector-
|
|
16
|
-
import { t as _sfc_main$14 } from "./NumberInput-
|
|
17
|
-
import { t as _sfc_main$15 } from "./Selector-
|
|
18
|
-
import {
|
|
15
|
+
import { t as _sfc_main$13 } from "./MultiSelector-DuF5TECE.js";
|
|
16
|
+
import { t as _sfc_main$14 } from "./NumberInput-B4IL3s_8.js";
|
|
17
|
+
import { t as _sfc_main$15 } from "./Selector-5N-hq2nF.js";
|
|
18
|
+
import { r as useTypeaheadMenu } from "./TypeaheadMenu-BEObzonz.js";
|
|
19
19
|
import { t as _sfc_main$16 } from "./TextInput-BasnjVvy.js";
|
|
20
|
-
import { t as _sfc_main$17 } from "./TimeInput-
|
|
21
|
-
import { t as _sfc_main$18 } from "./Tokenizer-
|
|
22
|
-
import { t as _sfc_main$19 } from "./Typeahead-
|
|
20
|
+
import { t as _sfc_main$17 } from "./TimeInput-C9gptCOK.js";
|
|
21
|
+
import { t as _sfc_main$18 } from "./Tokenizer-rwzamZg4.js";
|
|
22
|
+
import { t as _sfc_main$19 } from "./Typeahead-_V11btpv.js";
|
|
23
23
|
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, toDisplayString, unref, useId, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
24
24
|
import "../styles/visually-hidden-utility.css";
|
|
25
25
|
import "../styles/typeahead.css";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { _default as ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant };
|
|
1
|
+
import { a as ProgressBarVariant, i as ProgressBarSize, n as ProgressBarMark, r as ProgressBarProps, t as _default } from "../index-CI9kyg74.js";
|
|
2
|
+
export { _default as ProgressBar, type ProgressBarMark, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../ProgressBar-
|
|
1
|
+
import { t as _sfc_main } from "../ProgressBar-DF6WZNCI.js";
|
|
2
2
|
export { _sfc_main as ProgressBar };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as _sfc_main$1 } from "./Tooltip-C2fh9anJ.js";
|
|
2
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, toDisplayString, unref, useAttrs, useId, withCtx } from "vue";
|
|
2
3
|
import "../styles/visually-hidden.css";
|
|
3
4
|
import "../styles/progress-bar.css";
|
|
4
5
|
//#region src/ProgressBar/ProgressBar.vue
|
|
@@ -18,7 +19,8 @@ const _hoisted_4 = {
|
|
|
18
19
|
"aria-hidden": "true"
|
|
19
20
|
};
|
|
20
21
|
const _hoisted_5 = ["id"];
|
|
21
|
-
const _hoisted_6 =
|
|
22
|
+
const _hoisted_6 = { class: "astryx-progress-bar-rail" };
|
|
23
|
+
const _hoisted_7 = [
|
|
22
24
|
"aria-labelledby",
|
|
23
25
|
"aria-describedby",
|
|
24
26
|
"aria-valuemin",
|
|
@@ -26,7 +28,12 @@ const _hoisted_6 = [
|
|
|
26
28
|
"aria-valuenow",
|
|
27
29
|
"aria-valuetext"
|
|
28
30
|
];
|
|
29
|
-
const
|
|
31
|
+
const _hoisted_8 = [
|
|
32
|
+
"aria-label",
|
|
33
|
+
"data-placement",
|
|
34
|
+
"data-variant"
|
|
35
|
+
];
|
|
36
|
+
const _hoisted_9 = ["id"];
|
|
30
37
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
31
38
|
name: "AstryxProgressBar",
|
|
32
39
|
inheritAttrs: false,
|
|
@@ -48,6 +55,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
48
55
|
hasValueLabel: { type: Boolean },
|
|
49
56
|
valueText: {},
|
|
50
57
|
formatValueLabel: {},
|
|
58
|
+
marks: {},
|
|
51
59
|
width: {}
|
|
52
60
|
},
|
|
53
61
|
setup(__props) {
|
|
@@ -75,6 +83,21 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
75
83
|
});
|
|
76
84
|
const labelledBy = computed(() => [labelId.value, attrs["aria-labelledby"]].filter(Boolean).join(" ") || void 0);
|
|
77
85
|
const describedBy = computed(() => [descriptionId.value, attrs["aria-describedby"]].filter(Boolean).join(" ") || void 0);
|
|
86
|
+
const resolvedMarks = computed(() => {
|
|
87
|
+
if (props.isIndeterminate || !props.marks) return [];
|
|
88
|
+
const span = max.value - min.value;
|
|
89
|
+
return props.marks.flatMap((mark, index) => {
|
|
90
|
+
if (!Number.isFinite(mark.value) || !mark.label) return [];
|
|
91
|
+
const clampedMark = Math.min(max.value, Math.max(min.value, mark.value));
|
|
92
|
+
const pct = span === 0 ? 0 : (clampedMark - min.value) / span * 100;
|
|
93
|
+
return [{
|
|
94
|
+
key: `${mark.value}:${mark.label}:${index}`,
|
|
95
|
+
label: mark.label,
|
|
96
|
+
pct,
|
|
97
|
+
onFill: percentage.value > 0 && pct <= percentage.value
|
|
98
|
+
}];
|
|
99
|
+
});
|
|
100
|
+
});
|
|
78
101
|
return (_ctx, _cache) => {
|
|
79
102
|
return openBlock(), createElementBlock("div", {
|
|
80
103
|
class: normalizeClass(["astryx-progress-bar", unref(attrs).class]),
|
|
@@ -92,7 +115,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
92
115
|
id: labelId.value,
|
|
93
116
|
class: "astryx-visually-hidden"
|
|
94
117
|
}, toDisplayString(__props.label), 9, _hoisted_5)) : createCommentVNode("v-if", true),
|
|
95
|
-
createElementVNode("div", {
|
|
118
|
+
createElementVNode("div", _hoisted_6, [createElementVNode("div", {
|
|
96
119
|
class: "astryx-progress-bar-track",
|
|
97
120
|
role: "progressbar",
|
|
98
121
|
"aria-labelledby": labelledBy.value,
|
|
@@ -104,12 +127,28 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
104
127
|
}, [createElementVNode("div", {
|
|
105
128
|
class: "astryx-progress-bar-fill",
|
|
106
129
|
style: normalizeStyle(__props.isIndeterminate ? void 0 : fillWidth.value)
|
|
107
|
-
}, null, 4)], 8,
|
|
130
|
+
}, null, 4)], 8, _hoisted_7), (openBlock(true), createElementBlock(Fragment, null, renderList(resolvedMarks.value, (mark) => {
|
|
131
|
+
return openBlock(), createBlock(_sfc_main$1, {
|
|
132
|
+
key: mark.key,
|
|
133
|
+
class: "astryx-progress-bar-mark-anchor",
|
|
134
|
+
content: mark.label,
|
|
135
|
+
style: normalizeStyle({ insetInlineStart: `${mark.pct}%` })
|
|
136
|
+
}, {
|
|
137
|
+
default: withCtx(() => [createElementVNode("span", {
|
|
138
|
+
class: "astryx-progress-bar-mark",
|
|
139
|
+
tabindex: "0",
|
|
140
|
+
"aria-label": mark.label,
|
|
141
|
+
"data-placement": mark.onFill ? "fill" : "track",
|
|
142
|
+
"data-variant": __props.variant
|
|
143
|
+
}, null, 8, _hoisted_8)]),
|
|
144
|
+
_: 2
|
|
145
|
+
}, 1032, ["content", "style"]);
|
|
146
|
+
}), 128))]),
|
|
108
147
|
__props.description ? (openBlock(), createElementBlock("span", {
|
|
109
148
|
key: 2,
|
|
110
149
|
id: descriptionId.value,
|
|
111
150
|
class: "astryx-progress-bar-description"
|
|
112
|
-
}, toDisplayString(__props.description), 9,
|
|
151
|
+
}, toDisplayString(__props.description), 9, _hoisted_9)) : createCommentVNode("v-if", true)
|
|
113
152
|
], 14, _hoisted_1);
|
|
114
153
|
};
|
|
115
154
|
}
|
package/dist/Radio/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cn as RadioStatusType, Sn as RadioStatus, _n as RadioOption, bn as RadioSize, dn as _default, fn as RadioChangeEvent, hn as RadioGroupSlots, mn as RadioGroupProps, pn as RadioGroupEmits, un as _default$1, vn as RadioOrientation, wn as RadioValue, xn as RadioSlots, yn as RadioProps } from "../index-EtZgovdH.js";
|
|
2
2
|
export { _default as Radio, type RadioChangeEvent, _default$1 as RadioGroup, type RadioGroupEmits, type RadioGroupProps, type RadioGroupSlots, type RadioOption, type RadioOrientation, type RadioProps, type RadioSize, type RadioSlots, type RadioStatus, type RadioStatusType, type RadioValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn as RadioListItemProps, gn as RadioListProps, ln as _default, sn as _default$1 } from "../index-EtZgovdH.js";
|
|
2
2
|
export { _default as RadioList, _default$1 as RadioListItem, type RadioListItemProps, type RadioListProps };
|
package/dist/Resizable/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../
|
|
1
|
+
import { t as _sfc_main } from "../ResizeHandle-DYy0e3v9.js";
|
|
2
2
|
export { _sfc_main as ResizeHandle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as useAstryxMessages } from "./context-CPh7kE-a.js";
|
|
2
2
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, onBeforeUnmount, openBlock, ref, renderSlot, useAttrs, useTemplateRef } from "vue";
|
|
3
3
|
import "../styles/resize-handle.css";
|
|
4
4
|
//#region src/Resizable/ResizeHandle.vue
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { an as ScrollableAreaProps, in as _default, on as ScrollableAreaSlots } from "../index-EtZgovdH.js";
|
|
2
2
|
export { _default as ScrollableArea, type ScrollableAreaProps, type ScrollableAreaSlots };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SegmentedControlItemProps, c as SegmentedControlProps, i as SegmentedControlEmits, l as SegmentedControlSize, n as _default, o as SegmentedControlItemSlots, r as SegmentedControlContextValue, s as SegmentedControlLayout, t as _default$1, u as SegmentedControlSlots } from "../index-
|
|
1
|
+
import { a as SegmentedControlItemProps, c as SegmentedControlProps, i as SegmentedControlEmits, l as SegmentedControlSize, n as _default, o as SegmentedControlItemSlots, r as SegmentedControlContextValue, s as SegmentedControlLayout, t as _default$1, u as SegmentedControlSlots } from "../index-gW0HW02U.js";
|
|
2
2
|
export { _default as SegmentedControl, type SegmentedControlContextValue, type SegmentedControlEmits, _default$1 as SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlItemSlots, type SegmentedControlLayout, type SegmentedControlProps, type SegmentedControlSize, type SegmentedControlSlots };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { en as _default, nn as SelectableCardProps, rn as SelectableCardSlots, tn as SelectableCardEmits } from "../index-EtZgovdH.js";
|
|
2
2
|
export { _default as SelectableCard, _default as default, type SelectableCardEmits, type SelectableCardProps, type SelectableCardSlots };
|
package/dist/Selector/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SelectorOption, c as SelectorProps, d as SelectorSlots, f as SelectorStatus, h as SelectorVariant, i as SelectorIndicatorPosition, l as SelectorSection, m as SelectorStatusVariant, n as SelectorEmits, o as SelectorOptionInput, p as SelectorStatusInput, r as SelectorEntry, s as SelectorPresentation, t as _default, u as SelectorSize } from "../index-
|
|
1
|
+
import { a as SelectorOption, c as SelectorProps, d as SelectorSlots, f as SelectorStatus, h as SelectorVariant, i as SelectorIndicatorPosition, l as SelectorSection, m as SelectorStatusVariant, n as SelectorEmits, o as SelectorOptionInput, p as SelectorStatusInput, r as SelectorEntry, s as SelectorPresentation, t as _default, u as SelectorSize } from "../index-D-ezcKaY.js";
|
|
2
2
|
export { _default as Selector, type SelectorEmits, type SelectorEntry, type SelectorIndicatorPosition, type SelectorOption, type SelectorOptionInput, type SelectorPresentation, type SelectorProps, type SelectorSection, type SelectorSize, type SelectorSlots, type SelectorStatus, type SelectorStatusInput, type SelectorStatusVariant, type SelectorVariant };
|
package/dist/Selector/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Selector-
|
|
1
|
+
import { t as _sfc_main } from "../Selector-5N-hq2nF.js";
|
|
2
2
|
export { _sfc_main as Selector };
|