@astryx-vue/core 0.1.3 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AlertDialog/index.js +1 -1
- package/dist/{AlertDialog-BylcA4vV.js → AlertDialog-ovx4cBjM.js} +1 -1
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-b0PWt9Fz.js → AppShell-1wNIEtK_.js} +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar-jmHInHwj.js +244 -0
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-CZcgAMjM.js → AvatarGroup-QyzSrpYA.js} +8 -7
- package/dist/Badge/index.d.ts +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge-CjDQPF5g.js +30 -0
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-C3YZFQ9w.js → Breadcrumbs-C97HmjkC.js} +45 -11
- 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-DqC3EDN1.js +352 -0
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.d.ts +2 -0
- package/dist/Carousel/index.js +2 -0
- package/dist/Carousel-BGUnskjo.js +363 -0
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-C1aWl5V3.js → Chat-DCjXRiOF.js} +8 -8
- 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/Citation/index.js +1 -1
- package/dist/{Citation-C1X0Rde8.js → Citation-DunoAqVH.js} +2 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.d.ts +3 -2
- package/dist/Code/index.js +4 -2
- package/dist/Code-yb_KOFtJ.js +299 -0
- package/dist/{CodeBlock-BQdooQy2.js → CodeBlock-CAF-VJnh.js} +8 -2
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-BS9ctCQV.js → Collapsible-DvMiYJp7.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-u5h_E05P.js → CommandPalette-xfm9ldUI.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-BHmGWml0.js → ComplexSelector-B6lBTRhP.js} +2 -2
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-dA-ppaRQ.js → ContextMenu-DUkED3Z3.js} +101 -63
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/DateInput-Crcg-CCj.js +376 -0
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-fmQlr_A7.js → DateRangeInput-e9KSxBBK.js} +2 -2
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-Bs1JmcIp.js → DateTimeInput-fSOfuLex.js} +5 -3
- package/dist/DropdownMenu/index.d.ts +3 -2
- package/dist/DropdownMenu/index.js +3 -2
- package/dist/{DropdownMenu-B0gogrvG.js → DropdownMenu-8G0B1UND.js} +63 -16
- package/dist/DropdownMenu-XvW4BJob.js +164 -0
- package/dist/EmptyState/index.js +1 -1
- package/dist/{EmptyState-Bhlqgsg4.js → EmptyState-CUJdTYKV.js} +1 -1
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-CmAfOpkA.js → FileInput-D-fchyQH.js} +2 -2
- package/dist/Icon/index.d.ts +4 -0
- package/dist/Icon/index.js +3 -0
- package/dist/Icon/plugin.d.ts +45 -0
- package/dist/Icon/plugin.js +177 -0
- package/dist/Icon-Bku25g_K.js +193 -0
- package/dist/Lightbox/index.d.ts +2 -0
- package/dist/Lightbox/index.js +2 -0
- package/dist/Lightbox-uuVGgHxW.js +384 -0
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/Link-DqdQZ37C.js +141 -0
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-CwtLr3f_.js → Markdown-DLICa3db.js} +3 -3
- package/dist/MetadataList/index.d.ts +1 -1
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-DlXQTLog.js → MetadataList-h492rqEN.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-CgQamG6E.js → MobileNavToggle-BMj3Wtuq.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BXL6Dqsu.js → MoreMenu-DkYi5az5.js} +2 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-DT8ZccMI.js → MultiSelector-C2IS-EaU.js} +2 -2
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NavMenu/index.js +1 -1
- package/dist/{NavMenuItem-mzNQESpB.js → NavMenuItem-B-k7olt5.js} +2 -1
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-CjfAsFwj.js +210 -0
- package/dist/Outline/index.d.ts +2 -0
- package/dist/Outline/index.js +2 -0
- package/dist/Outline-BTmrtvXR.js +325 -0
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-zXg3g6fy.js → OverflowList-CRE8BE7V.js} +2 -2
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-DXfgMUKJ.js → Pagination-BpGXPmc7.js} +76 -22
- package/dist/Popover/index.d.ts +1 -1
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-ChDp-7oe.js → ProgressBar-DO9Chic6.js} +31 -11
- 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-BuGKvU9I.js → Resizable-CE8XQDL2.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-DkJOLZSR.js +468 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-Cdrigq2A.js → SideNav-DcDWBnXJ.js} +17 -17
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-DxmLfh8O.js → Stepper-DZKaqEoz.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-C411uNQU.js → TabList-hm06QPiW.js} +10 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-7qRmlIQd.js → Table-DwehtMap.js} +4 -4
- package/dist/Text/index.d.ts +3 -2
- package/dist/Text/index.js +1 -1
- package/dist/{Text-CKd7e3gK.js → Text-BHVghsWo.js} +12 -2
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Cv9UVbzS.js → TextArea-CPwSytdO.js} +12 -6
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/Theme/index.d.ts +2 -0
- package/dist/Theme/index.js +2 -0
- package/dist/Theme-BuUiiJNr.js +429 -0
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-BWVzLLyI.js → Thumbnail-CAOYds8t.js} +11 -11
- package/dist/{TimeField-l3QzU6vC.js → TimeField-BGbxCoKU.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-OkgX-xbQ.js → TimeInput-DJP3l4ZS.js} +1 -1
- package/dist/Timer/index.d.ts +2 -0
- package/dist/Timer/index.js +2 -0
- package/dist/Timer-B7GV6hqd.js +134 -0
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +2 -1
- package/dist/{Timestamp-DUoP9ari.js → Timestamp-BzRp8uWc.js} +5 -122
- package/dist/Toast/index.d.ts +2 -2
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-BKXPvEMp.js → Toast-C2ML-bmi.js} +37 -7
- 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-C4KD0fZD.js → Token-CjocuhzE.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-BA8sTMPZ.js → Tokenizer-mYES5SPM.js} +2 -2
- 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-CZokS7E_.js → TopNav-C2t6JkZb.js} +4 -4
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-CIbAGOMf.js → TreeList-THJ0KamE.js} +3 -3
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-DIw-K4aa.js → Typeahead-D7VnvRpK.js} +2 -2
- package/dist/{context-D6ECRdc5.js → context-DzcK4T_C.js} +58 -2
- package/dist/context-O2Vb8cJl.js +57 -0
- package/dist/formatInstant-BDWUIxS7.js +119 -0
- package/dist/index-1AZ4KZhg.d.ts +96 -0
- package/dist/index-3p2BDVHq.d.ts +31 -0
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-FEy8qFSD.d.ts → index-BHqRH7QW.d.ts} +2 -2
- package/dist/{index-CTolyeii.d.ts → index-BLOEjvaM.d.ts} +16 -2
- package/dist/index-BMrggCw-.d.ts +52 -0
- package/dist/{index-z4p2k9VR.d.ts → index-Bgv4ZmBl.d.ts} +20 -2
- package/dist/{index-BoRIw-bP.d.ts → index-Bt7ewoz2.d.ts} +32 -2
- package/dist/{index-CjtAH60j.d.ts → index-Bu0Zd1uw.d.ts} +1 -1
- package/dist/{index-uQrLBZfF.d.ts → index-Bu3oXIIS.d.ts} +24 -0
- package/dist/{index-CX97hlld.d.ts → index-CBym0hSq.d.ts} +2 -19
- package/dist/index-CJlBAXwj.d.ts +100 -0
- package/dist/{index-DT9S92sh.d.ts → index-CNjbOgty.d.ts} +15 -0
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/index-CRizexSC.d.ts +147 -0
- package/dist/{index-DYChvBOM.d.ts → index-Clmz00IK.d.ts} +31 -0
- package/dist/index-Cm_TiLXU.d.ts +22 -0
- package/dist/index-Cn-sSds-.d.ts +68 -0
- package/dist/index-CsVS37na.d.ts +81 -0
- package/dist/{index-DRmb-oUa.d.ts → index-CuFLztiI.d.ts} +6 -1
- package/dist/{index-CT8KEpec.d.ts → index-D0TlUOtG.d.ts} +1 -1
- package/dist/{index-fa72tWIU.d.ts → index-D2bSSSBP.d.ts} +1 -1
- package/dist/{index-2u4l3wq8.d.ts → index-DAiGhkNZ.d.ts} +15 -2
- package/dist/{index-DGNqi2za.d.ts → index-DQAnGHu7.d.ts} +5 -5
- package/dist/{index-BfOtLyNH.d.ts → index-D_nYxnNv.d.ts} +1 -1
- package/dist/{index-Df2YvC8o.d.ts → index-DeOftUMq.d.ts} +191 -75
- package/dist/{index-DXDGk38y.d.ts → index-Dg3ZmwEg.d.ts} +11 -0
- package/dist/{index-BiMGXtD-.d.ts → index-DimuSES0.d.ts} +14 -1
- package/dist/{index-C_2Z65Rp.d.ts → index-DnEh-HA0.d.ts} +1 -1
- package/dist/{index-D-ZuubCK.d.ts → index-DnSrjbjP.d.ts} +1 -1
- package/dist/{index-mQ6EPmaG.d.ts → index-DsyKhauk.d.ts} +78 -9
- package/dist/{index-C6RecznD.d.ts → index-I4J7gwa1.d.ts} +51 -9
- package/dist/{index-utZGF4GR.d.ts → index-NOXYEdOI.d.ts} +1 -1
- package/dist/{index-B4OOtNP8.d.ts → index-Z_onS2lR.d.ts} +1 -1
- package/dist/{index-CVn0GBdB.d.ts → index-cG1E0U2s.d.ts} +1 -1
- package/dist/{index-DEeJowZf.d.ts → index-cGagYM1g.d.ts} +15 -2
- package/dist/{index-Ck8qy6Rf.d.ts → index-c_TaW8mM.d.ts} +24 -2
- package/dist/{index-Bqb_Fyju.d.ts → index-jdjcb3Js.d.ts} +2 -2
- package/dist/index.d.ts +78 -68
- package/dist/index.js +107 -96
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/registry-B1ObuP--.d.ts +45 -0
- package/dist/registry-C7OZb0PJ.js +135 -0
- package/dist/syntaxTheme-Bcs1YMF7.d.ts +38 -0
- package/dist/syntaxTheme-ClpWALZX.js +75 -0
- package/dist/types-BKcxXW--.d.ts +114 -0
- package/dist/types-Bt-lSgYX.d.ts +65 -0
- package/dist/{index-B8MbfMwV.d.ts → types-DDAAT1Xd.d.ts} +36 -82
- package/package.json +30 -1
- package/styles/avatar.css +14 -0
- package/styles/badge.css +8 -0
- package/styles/breadcrumbs.css +6 -1
- package/styles/button.css +13 -0
- package/styles/calendar.css +16 -0
- package/styles/card.css +2 -0
- package/styles/carousel.css +120 -0
- package/styles/chat.css +5 -2
- package/styles/dropdown-menu.css +11 -0
- package/styles/heading.css +6 -2
- package/styles/icon.css +38 -8
- package/styles/lightbox.css +144 -0
- package/styles/link.css +5 -0
- package/styles/media-theme.css +51 -0
- package/styles/number-input.css +22 -0
- package/styles/outline.css +124 -0
- package/styles/pagination.css +45 -1
- package/styles/progress-bar.css +4 -0
- package/styles/selector.css +58 -0
- package/styles/tab-list.css +15 -0
- package/styles/text-area.css +17 -0
- package/styles/text-input.css +5 -0
- package/styles/text.css +63 -14
- package/styles/theme.css +29 -0
- package/styles/timer.css +34 -0
- package/styles/toast.css +7 -0
- package/styles/toolbar.css +11 -0
- package/styles.css +6 -0
- package/dist/Avatar-5s3HSrtN.js +0 -136
- package/dist/Badge-Ba0EwsTj.js +0 -19
- package/dist/Calendar-CYhGDT6f.js +0 -277
- package/dist/DateInput-D2ErjXYO.js +0 -250
- package/dist/Icon-5MdZQ18k.js +0 -86
- package/dist/Link-CprjOuTI.js +0 -92
- package/dist/NumberInput-DspJO6z6.js +0 -147
- package/dist/Selector-DlZpQh42.js +0 -325
- package/dist/index-BzqRns96.d.ts +0 -64
- package/dist/index-ZJyk8RtQ.d.ts +0 -68
- package/dist/{CheckboxList-EsIEXjK_.js → CheckboxList-BbCPiend.js} +1 -1
- package/dist/{index-4FM5lQdV.d.ts → index-BUXNRekN.d.ts} +1 -1
|
@@ -126,8 +126,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
126
126
|
event.preventDefault();
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
|
+
const preventedBeforeItem = event.defaultPrevented;
|
|
129
130
|
emit("click", event);
|
|
130
|
-
if (
|
|
131
|
+
if (props.keepOpen || !preventedBeforeItem && event.defaultPrevented) return;
|
|
131
132
|
closeMenu?.();
|
|
132
133
|
menu?.close();
|
|
133
134
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as NumberInputEmits, r as NumberInputProps, t as _default } from "../index-
|
|
2
|
-
export { _default as NumberInput, type NumberInputEmits, type NumberInputProps };
|
|
1
|
+
import { i as NumberInputStatus, n as NumberInputEmits, r as NumberInputProps, t as _default } from "../index-DAiGhkNZ.js";
|
|
2
|
+
export { _default as NumberInput, type NumberInputEmits, type NumberInputProps, type NumberInputStatus };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../NumberInput-
|
|
1
|
+
import { t as _sfc_main } from "../NumberInput-CjfAsFwj.js";
|
|
2
2
|
export { _sfc_main as NumberInput };
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { t as useNumberField } from "./useNumberField-DL-Radsp.js";
|
|
2
|
+
import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
|
|
3
|
+
import { t as _sfc_main$1 } from "./FieldIcon--NTgW5IU.js";
|
|
4
|
+
import { t as _sfc_main$2 } from "./Field-8zRxzDHE.js";
|
|
5
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, ref, resolveDynamicComponent, toDisplayString, unref, useId, withCtx } from "vue";
|
|
6
|
+
import "../styles/number-input.css";
|
|
7
|
+
//#region src/NumberInput/NumberInput.vue
|
|
8
|
+
const _hoisted_1 = ["data-status"];
|
|
9
|
+
const _hoisted_2 = [
|
|
10
|
+
"value",
|
|
11
|
+
"placeholder",
|
|
12
|
+
"disabled",
|
|
13
|
+
"aria-label",
|
|
14
|
+
"aria-labelledby",
|
|
15
|
+
"aria-describedby",
|
|
16
|
+
"aria-invalid",
|
|
17
|
+
"title"
|
|
18
|
+
];
|
|
19
|
+
const _hoisted_3 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "astryx-number-input-units"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_4 = ["aria-label"];
|
|
24
|
+
const _hoisted_5 = { class: "astryx-number-input-buttons" };
|
|
25
|
+
const _hoisted_6 = ["disabled", "aria-label"];
|
|
26
|
+
const _hoisted_7 = ["disabled", "aria-label"];
|
|
27
|
+
const _hoisted_8 = ["name", "value"];
|
|
28
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
29
|
+
name: "AstryxNumberInput",
|
|
30
|
+
__name: "NumberInput",
|
|
31
|
+
props: {
|
|
32
|
+
modelValue: { default: null },
|
|
33
|
+
placeholder: { default: "" },
|
|
34
|
+
min: {},
|
|
35
|
+
max: {},
|
|
36
|
+
step: { default: 1 },
|
|
37
|
+
disabled: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
disabledReason: {},
|
|
42
|
+
size: { default: "md" },
|
|
43
|
+
label: {},
|
|
44
|
+
description: {},
|
|
45
|
+
isLabelHidden: { type: Boolean },
|
|
46
|
+
units: {},
|
|
47
|
+
clearable: { type: Boolean },
|
|
48
|
+
status: {},
|
|
49
|
+
name: {}
|
|
50
|
+
},
|
|
51
|
+
emits: ["update:modelValue", "change"],
|
|
52
|
+
setup(__props, { emit: __emit }) {
|
|
53
|
+
const props = __props;
|
|
54
|
+
const emit = __emit;
|
|
55
|
+
const PassThrough = defineComponent({
|
|
56
|
+
name: "NumberInputPassThrough",
|
|
57
|
+
setup(_, { slots }) {
|
|
58
|
+
return () => slots.default?.({});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const inputId = `astryx-number-input-${useId()}`;
|
|
62
|
+
const messages = useAstryxMessages();
|
|
63
|
+
const incrementLabel = computed(() => messages.value.numberInput.increment(props.label));
|
|
64
|
+
const decrementLabel = computed(() => messages.value.numberInput.decrement(props.label));
|
|
65
|
+
const inputValue = ref("");
|
|
66
|
+
const modelValueRef = computed({
|
|
67
|
+
get: () => props.modelValue,
|
|
68
|
+
set: (value) => {
|
|
69
|
+
emit("update:modelValue", value);
|
|
70
|
+
emit("change", value);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const numberField = useNumberField({
|
|
74
|
+
value: modelValueRef,
|
|
75
|
+
min: props.min,
|
|
76
|
+
max: props.max,
|
|
77
|
+
step: props.step,
|
|
78
|
+
disabled: computed(() => props.disabled),
|
|
79
|
+
onChange: (value) => {
|
|
80
|
+
modelValueRef.value = value;
|
|
81
|
+
inputValue.value = value === null ? "" : String(value);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
function onInput(event) {
|
|
85
|
+
const target = event.target;
|
|
86
|
+
const value = target.value.trim();
|
|
87
|
+
if (value === "") {
|
|
88
|
+
numberField.setValue(null);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const parsed = Number.parseFloat(value);
|
|
92
|
+
if (!Number.isNaN(parsed)) numberField.setValue(parsed);
|
|
93
|
+
else target.value = inputValue.value;
|
|
94
|
+
}
|
|
95
|
+
function onKeyDown(event) {
|
|
96
|
+
numberField.onKeyDown(event);
|
|
97
|
+
}
|
|
98
|
+
function resolvedStatus(status) {
|
|
99
|
+
if (status == null || status === "default") return void 0;
|
|
100
|
+
if (typeof status === "string") return { type: status };
|
|
101
|
+
return status;
|
|
102
|
+
}
|
|
103
|
+
const statusValue = computed(() => resolvedStatus(props.status));
|
|
104
|
+
const statusType = computed(() => statusValue.value?.type);
|
|
105
|
+
const showsField = computed(() => {
|
|
106
|
+
if (props.isLabelHidden && !props.description && !statusValue.value?.message) return false;
|
|
107
|
+
return Boolean(props.label || props.description || statusValue.value?.message);
|
|
108
|
+
});
|
|
109
|
+
const shell = computed(() => showsField.value ? _sfc_main$2 : PassThrough);
|
|
110
|
+
const fieldBindings = computed(() => showsField.value ? {
|
|
111
|
+
label: props.label ?? "",
|
|
112
|
+
inputId,
|
|
113
|
+
description: props.description,
|
|
114
|
+
isLabelHidden: props.isLabelHidden || !props.label,
|
|
115
|
+
isDisabled: props.disabled,
|
|
116
|
+
status: statusValue.value
|
|
117
|
+
} : {});
|
|
118
|
+
function clearValue() {
|
|
119
|
+
numberField.setValue(null);
|
|
120
|
+
inputValue.value = "";
|
|
121
|
+
}
|
|
122
|
+
function syncDisplayValue() {
|
|
123
|
+
inputValue.value = props.modelValue === null ? "" : String(props.modelValue);
|
|
124
|
+
}
|
|
125
|
+
syncDisplayValue();
|
|
126
|
+
return (_ctx, _cache) => {
|
|
127
|
+
return openBlock(), createBlock(resolveDynamicComponent(shell.value), normalizeProps(guardReactiveProps(fieldBindings.value)), {
|
|
128
|
+
default: withCtx((field) => [createElementVNode("div", {
|
|
129
|
+
class: normalizeClass(["astryx-number-input", `size-${props.size}`]),
|
|
130
|
+
"data-status": statusType.value
|
|
131
|
+
}, [
|
|
132
|
+
createElementVNode("input", {
|
|
133
|
+
id: inputId,
|
|
134
|
+
type: "text",
|
|
135
|
+
inputmode: "decimal",
|
|
136
|
+
class: "astryx-number-input-field",
|
|
137
|
+
value: inputValue.value,
|
|
138
|
+
placeholder: props.placeholder,
|
|
139
|
+
disabled: props.disabled,
|
|
140
|
+
"aria-label": showsField.value ? void 0 : props.label,
|
|
141
|
+
"aria-labelledby": showsField.value ? field?.labelId : void 0,
|
|
142
|
+
"aria-describedby": field?.describedBy,
|
|
143
|
+
"aria-invalid": statusType.value === "error" ? "true" : void 0,
|
|
144
|
+
title: props.disabledReason,
|
|
145
|
+
onInput,
|
|
146
|
+
onKeydown: onKeyDown
|
|
147
|
+
}, null, 40, _hoisted_2),
|
|
148
|
+
props.units ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(props.units), 1)) : createCommentVNode("v-if", true),
|
|
149
|
+
props.clearable && props.modelValue != null && !props.disabled ? (openBlock(), createElementBlock("button", {
|
|
150
|
+
key: 1,
|
|
151
|
+
type: "button",
|
|
152
|
+
class: "astryx-number-input-clear",
|
|
153
|
+
"aria-label": props.label ? `Clear ${props.label}` : "Clear",
|
|
154
|
+
onClick: clearValue
|
|
155
|
+
}, [createVNode(_sfc_main$1, { type: "clear" })], 8, _hoisted_4)) : createCommentVNode("v-if", true),
|
|
156
|
+
createElementVNode("div", _hoisted_5, [createElementVNode("button", {
|
|
157
|
+
type: "button",
|
|
158
|
+
class: "astryx-number-input-button increment",
|
|
159
|
+
disabled: props.disabled,
|
|
160
|
+
"aria-label": incrementLabel.value,
|
|
161
|
+
tabindex: "-1",
|
|
162
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(numberField).increment && unref(numberField).increment(...args))
|
|
163
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
|
|
164
|
+
class: "astryx-number-input-chevron",
|
|
165
|
+
viewBox: "0 0 12 8",
|
|
166
|
+
width: "12",
|
|
167
|
+
height: "8",
|
|
168
|
+
"aria-hidden": "true",
|
|
169
|
+
fill: "none"
|
|
170
|
+
}, [createElementVNode("path", {
|
|
171
|
+
d: "M1.5 1.75 6 6.25 10.5 1.75",
|
|
172
|
+
stroke: "currentColor",
|
|
173
|
+
"stroke-width": "1.5",
|
|
174
|
+
"stroke-linecap": "round",
|
|
175
|
+
"stroke-linejoin": "round"
|
|
176
|
+
})], -1)])], 8, _hoisted_6), createElementVNode("button", {
|
|
177
|
+
type: "button",
|
|
178
|
+
class: "astryx-number-input-button decrement",
|
|
179
|
+
disabled: props.disabled,
|
|
180
|
+
"aria-label": decrementLabel.value,
|
|
181
|
+
tabindex: "-1",
|
|
182
|
+
onClick: _cache[1] || (_cache[1] = (...args) => unref(numberField).decrement && unref(numberField).decrement(...args))
|
|
183
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
|
|
184
|
+
class: "astryx-number-input-chevron",
|
|
185
|
+
viewBox: "0 0 12 8",
|
|
186
|
+
width: "12",
|
|
187
|
+
height: "8",
|
|
188
|
+
"aria-hidden": "true",
|
|
189
|
+
fill: "none"
|
|
190
|
+
}, [createElementVNode("path", {
|
|
191
|
+
d: "M1.5 1.75 6 6.25 10.5 1.75",
|
|
192
|
+
stroke: "currentColor",
|
|
193
|
+
"stroke-width": "1.5",
|
|
194
|
+
"stroke-linecap": "round",
|
|
195
|
+
"stroke-linejoin": "round"
|
|
196
|
+
})], -1)])], 8, _hoisted_7)]),
|
|
197
|
+
props.name ? (openBlock(), createElementBlock("input", {
|
|
198
|
+
key: 2,
|
|
199
|
+
type: "hidden",
|
|
200
|
+
name: props.name,
|
|
201
|
+
value: props.modelValue ?? ""
|
|
202
|
+
}, null, 8, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
203
|
+
], 10, _hoisted_1)]),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 16);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
//#endregion
|
|
210
|
+
export { _sfc_main as t };
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { t as useListFocus } from "./useListFocus-D0iOJl39.js";
|
|
2
|
+
import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
|
|
3
|
+
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, toDisplayString, toRef, unref, watch } from "vue";
|
|
4
|
+
import "../styles/outline.css";
|
|
5
|
+
//#region src/Outline/scrollGeometry.ts
|
|
6
|
+
function getScrollableAncestor(element) {
|
|
7
|
+
let current = element?.parentElement ?? null;
|
|
8
|
+
while (current != null) {
|
|
9
|
+
const overflowY = getComputedStyle(current).overflowY;
|
|
10
|
+
if ((overflowY === "auto" || overflowY === "scroll" || overflowY === "overlay") && current.scrollHeight > current.clientHeight) return current;
|
|
11
|
+
current = current.parentElement;
|
|
12
|
+
}
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
function getScrollMarginTop(element) {
|
|
16
|
+
return Number.parseFloat(getComputedStyle(element).scrollMarginTop) || 0;
|
|
17
|
+
}
|
|
18
|
+
function getRootTop(scrollRoot) {
|
|
19
|
+
return scrollRoot != null ? scrollRoot.getBoundingClientRect().top : 0;
|
|
20
|
+
}
|
|
21
|
+
function getRestingTop(target, scrollRoot, offset) {
|
|
22
|
+
return getRootTop(scrollRoot) + offset + getScrollMarginTop(target);
|
|
23
|
+
}
|
|
24
|
+
function scrollToTarget(target, scrollRoot, scrollTarget, offset) {
|
|
25
|
+
const behavior = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth";
|
|
26
|
+
if (offset === 0) {
|
|
27
|
+
target.scrollIntoView({
|
|
28
|
+
behavior,
|
|
29
|
+
block: "start"
|
|
30
|
+
});
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const delta = target.getBoundingClientRect().top - getRestingTop(target, scrollRoot, offset);
|
|
34
|
+
scrollTarget.scrollBy({
|
|
35
|
+
top: delta,
|
|
36
|
+
behavior
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function resolveActiveId(items, scrollRoot, offset) {
|
|
40
|
+
if (items.length === 0) return void 0;
|
|
41
|
+
if (scrollRoot != null ? scrollRoot.scrollTop + scrollRoot.clientHeight >= scrollRoot.scrollHeight - 2 : window.innerHeight + window.scrollY >= document.documentElement.scrollHeight - 2) return items[items.length - 1].id;
|
|
42
|
+
let activeId = items[0].id;
|
|
43
|
+
for (const item of items) {
|
|
44
|
+
const element = document.getElementById(item.id);
|
|
45
|
+
if (element == null) continue;
|
|
46
|
+
if (element.getBoundingClientRect().top <= getRestingTop(element, scrollRoot, offset) + 1) activeId = item.id;
|
|
47
|
+
else break;
|
|
48
|
+
}
|
|
49
|
+
return activeId;
|
|
50
|
+
}
|
|
51
|
+
/** Heading levels 1 and 2 share the first indent. Levels 5 and 6 share the fourth. */
|
|
52
|
+
function indentLevel(level) {
|
|
53
|
+
return Math.max(1, Math.min(4, level - 1 || 1));
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/Outline/useIndicator.ts
|
|
57
|
+
/** Place the sliding bar on the active link, measured against the track. */
|
|
58
|
+
function useOutlineIndicator(root, activeId) {
|
|
59
|
+
let frame = 0;
|
|
60
|
+
let observer = null;
|
|
61
|
+
function place() {
|
|
62
|
+
const nav = root.value;
|
|
63
|
+
const track = nav?.querySelector(".astryx-outline__track");
|
|
64
|
+
const active = nav?.querySelector("[aria-current=\"location\"]");
|
|
65
|
+
if (nav == null || track == null || active == null) return;
|
|
66
|
+
const trackRect = track.getBoundingClientRect();
|
|
67
|
+
const activeRect = active.getBoundingClientRect();
|
|
68
|
+
nav.style.setProperty("--astryx-outline-indicator-top", `${activeRect.top - trackRect.top}px`);
|
|
69
|
+
nav.style.setProperty("--astryx-outline-indicator-height", `${activeRect.height}px`);
|
|
70
|
+
}
|
|
71
|
+
function schedule() {
|
|
72
|
+
if (typeof requestAnimationFrame !== "function") {
|
|
73
|
+
place();
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (frame !== 0) cancelAnimationFrame(frame);
|
|
77
|
+
frame = requestAnimationFrame(() => {
|
|
78
|
+
frame = 0;
|
|
79
|
+
place();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
onMounted(() => {
|
|
83
|
+
schedule();
|
|
84
|
+
observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(schedule);
|
|
85
|
+
if (root.value != null) observer?.observe(root.value);
|
|
86
|
+
window.addEventListener("resize", schedule);
|
|
87
|
+
});
|
|
88
|
+
onBeforeUnmount(() => {
|
|
89
|
+
observer?.disconnect();
|
|
90
|
+
window.removeEventListener("resize", schedule);
|
|
91
|
+
if (frame !== 0 && typeof cancelAnimationFrame === "function") cancelAnimationFrame(frame);
|
|
92
|
+
});
|
|
93
|
+
watch(activeId, schedule);
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/Outline/useScrollSpy.ts
|
|
97
|
+
const SCROLL_SETTLE_TIMEOUT_MS = 1200;
|
|
98
|
+
const SCROLL_KEYS = /* @__PURE__ */ new Set([
|
|
99
|
+
"ArrowUp",
|
|
100
|
+
"ArrowDown",
|
|
101
|
+
"PageUp",
|
|
102
|
+
"PageDown",
|
|
103
|
+
"Home",
|
|
104
|
+
"End",
|
|
105
|
+
" ",
|
|
106
|
+
"Spacebar"
|
|
107
|
+
]);
|
|
108
|
+
function useScrollSpy(options) {
|
|
109
|
+
const isControlled = computed(() => options.activeId.value !== void 0);
|
|
110
|
+
const uncontrolledId = ref(options.items.value[0]?.id);
|
|
111
|
+
const resolvedId = computed(() => isControlled.value ? options.activeId.value : uncontrolledId.value);
|
|
112
|
+
const suppressed = ref(false);
|
|
113
|
+
let navigation = null;
|
|
114
|
+
function scrollRoot() {
|
|
115
|
+
const explicit = options.scrollContainer.value;
|
|
116
|
+
if (explicit) return explicit;
|
|
117
|
+
return getScrollableAncestor(options.root.value);
|
|
118
|
+
}
|
|
119
|
+
function sync() {
|
|
120
|
+
if (isControlled.value || suppressed.value) return;
|
|
121
|
+
const next = resolveActiveId(options.items.value, scrollRoot(), options.offset.value);
|
|
122
|
+
if (next != null && next !== uncontrolledId.value) {
|
|
123
|
+
uncontrolledId.value = next;
|
|
124
|
+
options.onActive(next);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function scrollTo(id) {
|
|
128
|
+
const target = typeof document === "undefined" ? null : document.getElementById(id);
|
|
129
|
+
if (target == null) return false;
|
|
130
|
+
navigation?.supersede();
|
|
131
|
+
options.onNavigateStart?.(id);
|
|
132
|
+
if (isControlled.value) options.onActive(id);
|
|
133
|
+
else suppressed.value = true;
|
|
134
|
+
const root = scrollRoot();
|
|
135
|
+
const targetScroller = root ?? window;
|
|
136
|
+
let settled = false;
|
|
137
|
+
let timer = 0;
|
|
138
|
+
function cleanup() {
|
|
139
|
+
targetScroller.removeEventListener("scrollend", onSettle);
|
|
140
|
+
targetScroller.removeEventListener("wheel", onManual);
|
|
141
|
+
targetScroller.removeEventListener("touchmove", onManual);
|
|
142
|
+
window.removeEventListener("keydown", onKeyDown);
|
|
143
|
+
if (timer !== 0) clearTimeout(timer);
|
|
144
|
+
navigation = null;
|
|
145
|
+
}
|
|
146
|
+
function finish(didArrive, shouldResume = true) {
|
|
147
|
+
if (settled) return;
|
|
148
|
+
settled = true;
|
|
149
|
+
cleanup();
|
|
150
|
+
if (!isControlled.value) {
|
|
151
|
+
suppressed.value = false;
|
|
152
|
+
if (didArrive) {
|
|
153
|
+
uncontrolledId.value = id;
|
|
154
|
+
options.onActive(id);
|
|
155
|
+
} else if (shouldResume) sync();
|
|
156
|
+
}
|
|
157
|
+
options.onNavigateEnd?.(id);
|
|
158
|
+
}
|
|
159
|
+
function onSettle() {
|
|
160
|
+
finish(true);
|
|
161
|
+
}
|
|
162
|
+
function onManual() {
|
|
163
|
+
finish(false);
|
|
164
|
+
}
|
|
165
|
+
function onKeyDown(event) {
|
|
166
|
+
if (!event.defaultPrevented && SCROLL_KEYS.has(event.key)) finish(false);
|
|
167
|
+
}
|
|
168
|
+
if (options.hasScrollOnClick.value) {
|
|
169
|
+
targetScroller.addEventListener("scrollend", onSettle);
|
|
170
|
+
targetScroller.addEventListener("wheel", onManual, { passive: true });
|
|
171
|
+
targetScroller.addEventListener("touchmove", onManual, { passive: true });
|
|
172
|
+
window.addEventListener("keydown", onKeyDown);
|
|
173
|
+
timer = window.setTimeout(onSettle, SCROLL_SETTLE_TIMEOUT_MS);
|
|
174
|
+
navigation = { supersede: () => finish(false, false) };
|
|
175
|
+
scrollToTarget(target, root, targetScroller, options.offset.value);
|
|
176
|
+
} else finish(true);
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
let listened = null;
|
|
180
|
+
onMounted(() => {
|
|
181
|
+
sync();
|
|
182
|
+
listened = scrollRoot() ?? window;
|
|
183
|
+
listened.addEventListener("scroll", sync, { passive: true });
|
|
184
|
+
window.addEventListener("resize", sync);
|
|
185
|
+
});
|
|
186
|
+
onBeforeUnmount(() => {
|
|
187
|
+
listened?.removeEventListener("scroll", sync);
|
|
188
|
+
window.removeEventListener("resize", sync);
|
|
189
|
+
navigation?.supersede();
|
|
190
|
+
});
|
|
191
|
+
watch(() => options.items.value.map((item) => item.id).join("\n"), () => {
|
|
192
|
+
if (!isControlled.value && (uncontrolledId.value == null || !options.items.value.some((item) => item.id === uncontrolledId.value))) uncontrolledId.value = options.items.value[0]?.id;
|
|
193
|
+
sync();
|
|
194
|
+
});
|
|
195
|
+
return {
|
|
196
|
+
resolvedId,
|
|
197
|
+
scrollTo
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/Outline/Outline.vue
|
|
202
|
+
const _hoisted_1 = ["aria-label", "data-density"];
|
|
203
|
+
const _hoisted_2 = [
|
|
204
|
+
"href",
|
|
205
|
+
"data-level",
|
|
206
|
+
"data-active",
|
|
207
|
+
"aria-current",
|
|
208
|
+
"onClick",
|
|
209
|
+
"onKeydown"
|
|
210
|
+
];
|
|
211
|
+
const _hoisted_3 = { class: "astryx-outline__label" };
|
|
212
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
213
|
+
name: "AstryxOutline",
|
|
214
|
+
inheritAttrs: false,
|
|
215
|
+
__name: "Outline",
|
|
216
|
+
props: {
|
|
217
|
+
items: {},
|
|
218
|
+
activeId: {},
|
|
219
|
+
label: {},
|
|
220
|
+
density: { default: "default" },
|
|
221
|
+
offset: { default: 0 },
|
|
222
|
+
scrollContainer: { default: null },
|
|
223
|
+
hasScrollOnClick: {
|
|
224
|
+
type: Boolean,
|
|
225
|
+
default: true
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
emits: [
|
|
229
|
+
"navigateEnd",
|
|
230
|
+
"navigateStart",
|
|
231
|
+
"update:activeId"
|
|
232
|
+
],
|
|
233
|
+
setup(__props, { emit: __emit }) {
|
|
234
|
+
const props = __props;
|
|
235
|
+
const emit = __emit;
|
|
236
|
+
const messages = useAstryxMessages();
|
|
237
|
+
const root = ref(null);
|
|
238
|
+
const regionLabel = computed(() => props.label ?? messages.value.outline.label);
|
|
239
|
+
const { resolvedId, scrollTo } = useScrollSpy({
|
|
240
|
+
activeId: toRef(props, "activeId"),
|
|
241
|
+
items: toRef(props, "items"),
|
|
242
|
+
root,
|
|
243
|
+
offset: toRef(props, "offset"),
|
|
244
|
+
scrollContainer: toRef(props, "scrollContainer"),
|
|
245
|
+
hasScrollOnClick: toRef(props, "hasScrollOnClick"),
|
|
246
|
+
onActive: (id) => emit("update:activeId", id),
|
|
247
|
+
onNavigateStart: (id) => emit("navigateStart", id),
|
|
248
|
+
onNavigateEnd: (id) => emit("navigateEnd", id)
|
|
249
|
+
});
|
|
250
|
+
const { handleFocus, handleKeyDown, listRef } = useListFocus({
|
|
251
|
+
hasRovingTabIndex: true,
|
|
252
|
+
itemSelector: "a[href]",
|
|
253
|
+
orientation: "vertical"
|
|
254
|
+
});
|
|
255
|
+
function seatTabStop() {
|
|
256
|
+
const list = listRef.value;
|
|
257
|
+
if (list == null || document.activeElement != null && list.contains(document.activeElement)) return;
|
|
258
|
+
const links = [...list.querySelectorAll("a[href]")];
|
|
259
|
+
const active = links.find((link) => link.getAttribute("aria-current") === "location");
|
|
260
|
+
if (active == null) return;
|
|
261
|
+
for (const link of links) link.tabIndex = link === active ? 0 : -1;
|
|
262
|
+
}
|
|
263
|
+
watch(resolvedId, () => {
|
|
264
|
+
nextTick(seatTabStop);
|
|
265
|
+
});
|
|
266
|
+
useOutlineIndicator(root, resolvedId);
|
|
267
|
+
function hasModifier(event) {
|
|
268
|
+
return event.metaKey || event.altKey || event.ctrlKey || event.shiftKey;
|
|
269
|
+
}
|
|
270
|
+
function navigate(id) {
|
|
271
|
+
if (scrollTo(id)) window.history.pushState(null, "", `#${id}`);
|
|
272
|
+
}
|
|
273
|
+
function onClick(id, event) {
|
|
274
|
+
if (event.defaultPrevented || hasModifier(event)) return;
|
|
275
|
+
if (document.getElementById(id) == null) return;
|
|
276
|
+
event.preventDefault();
|
|
277
|
+
navigate(id);
|
|
278
|
+
}
|
|
279
|
+
function onItemKeyDown(id, event) {
|
|
280
|
+
if (event.key !== " " && event.key !== "Spacebar") return;
|
|
281
|
+
if (event.defaultPrevented || hasModifier(event)) return;
|
|
282
|
+
event.preventDefault();
|
|
283
|
+
navigate(id);
|
|
284
|
+
}
|
|
285
|
+
return (_ctx, _cache) => {
|
|
286
|
+
return openBlock(), createElementBlock("nav", {
|
|
287
|
+
ref_key: "root",
|
|
288
|
+
ref: root,
|
|
289
|
+
class: normalizeClass(["astryx-outline", _ctx.$attrs.class]),
|
|
290
|
+
style: normalizeStyle(_ctx.$attrs.style),
|
|
291
|
+
"aria-label": regionLabel.value,
|
|
292
|
+
"data-density": __props.density,
|
|
293
|
+
"data-component": "outline"
|
|
294
|
+
}, [
|
|
295
|
+
createCommentVNode(" eslint-disable-next-line vue-a11y/no-static-element-interactions -- 方向键在链接之间移动焦点,列表本身不是另一个控件。 "),
|
|
296
|
+
createElementVNode("ul", {
|
|
297
|
+
ref_key: "listRef",
|
|
298
|
+
ref: listRef,
|
|
299
|
+
class: "astryx-outline__list",
|
|
300
|
+
onKeydown: _cache[0] || (_cache[0] = (...args) => unref(handleKeyDown) && unref(handleKeyDown)(...args)),
|
|
301
|
+
onFocus: _cache[1] || (_cache[1] = (...args) => unref(handleFocus) && unref(handleFocus)(...args))
|
|
302
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
303
|
+
return openBlock(), createElementBlock("li", {
|
|
304
|
+
key: item.id,
|
|
305
|
+
class: "astryx-outline__item"
|
|
306
|
+
}, [createElementVNode("a", {
|
|
307
|
+
class: "astryx-outline__link",
|
|
308
|
+
href: `#${item.id}`,
|
|
309
|
+
"data-level": unref(indentLevel)(item.level),
|
|
310
|
+
"data-active": item.id === unref(resolvedId) || void 0,
|
|
311
|
+
"aria-current": item.id === unref(resolvedId) ? "location" : void 0,
|
|
312
|
+
onClick: ($event) => onClick(item.id, $event),
|
|
313
|
+
onKeydown: ($event) => onItemKeyDown(item.id, $event)
|
|
314
|
+
}, [createElementVNode("span", _hoisted_3, toDisplayString(item.label), 1)], 40, _hoisted_2)]);
|
|
315
|
+
}), 128))], 544),
|
|
316
|
+
_cache[2] || (_cache[2] = createElementVNode("div", {
|
|
317
|
+
class: "astryx-outline__track",
|
|
318
|
+
"aria-hidden": "true"
|
|
319
|
+
}, [createElementVNode("span", { class: "astryx-outline__line" }), createElementVNode("span", { class: "astryx-outline__indicator" })], -1))
|
|
320
|
+
], 14, _hoisted_1);
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
//#endregion
|
|
325
|
+
export { _sfc_main as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Cn as _default, En as OverflowListProps, Tn as OverflowListItem, wn as OverflowListEmits } from "../index-
|
|
1
|
+
import { Cn as _default, En as OverflowListProps, Tn as OverflowListItem, wn as OverflowListEmits } from "../index-DeOftUMq.js";
|
|
2
2
|
export { _default as OverflowList, type OverflowListEmits, type OverflowListItem, type OverflowListProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../OverflowList-
|
|
1
|
+
import { t as _sfc_main } from "../OverflowList-CRE8BE7V.js";
|
|
2
2
|
export { _sfc_main as OverflowList };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
2
|
-
import { a as useAstryxMessages } from "./context-
|
|
2
|
+
import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
|
|
3
3
|
import { n as resolveNavRoot } from "./link-CdcUSxAj.js";
|
|
4
4
|
import { t as _sfc_main$2 } from "./NavDisclosure-DHrSNRDR.js";
|
|
5
|
-
import { n as _sfc_main$3, t as _sfc_main$4 } from "./NavMenuItem-
|
|
5
|
+
import { n as _sfc_main$3, t as _sfc_main$4 } from "./NavMenuItem-B-k7olt5.js";
|
|
6
6
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
7
7
|
import "../styles/overflow-list.css";
|
|
8
8
|
//#region src/OverflowList/OverflowMore.vue
|
package/dist/Overlay/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OverlayContainerProps, c as OverlayScrimMode, d as OverlayShowOn, f as OverlaySlots, i as OverlayAlign, l as OverlayScrimProps, m as UseOverlayResult, n as _default$1, o as OverlayPosition, p as UseOverlayOptions, r as _default, s as OverlayProps, t as useOverlay, u as OverlayScrimSlots } from "../index-
|
|
1
|
+
import { a as OverlayContainerProps, c as OverlayScrimMode, d as OverlayShowOn, f as OverlaySlots, i as OverlayAlign, l as OverlayScrimProps, m as UseOverlayResult, n as _default$1, o as OverlayPosition, p as UseOverlayOptions, r as _default, s as OverlayProps, t as useOverlay, u as OverlayScrimSlots } from "../index-BDZCJ9ri.js";
|
|
2
2
|
export { _default as Overlay, type OverlayAlign, type OverlayContainerProps, type OverlayPosition, type OverlayProps, _default$1 as OverlayScrim, type OverlayScrimMode, type OverlayScrimProps, type OverlayScrimSlots, type OverlayShowOn, type OverlaySlots, type UseOverlayOptions, type UseOverlayResult, useOverlay };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { _default as Pagination, type PaginationEmits, type PaginationProps, type PaginationSlots };
|
|
1
|
+
import { a as PaginationSlots, i as PaginationSize, n as PaginationEmits, o as PaginationVariant, r as PaginationProps, t as _default } from "../index-c_TaW8mM.js";
|
|
2
|
+
export { _default as Pagination, type PaginationEmits, type PaginationProps, type PaginationSize, type PaginationSlots, type PaginationVariant };
|
package/dist/Pagination/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Pagination-
|
|
1
|
+
import { t as _sfc_main } from "../Pagination-BpGXPmc7.js";
|
|
2
2
|
export { _sfc_main as Pagination };
|