@astryx-vue/core 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AppShell/index.d.ts +2 -0
- package/dist/AppShell/index.js +2 -0
- package/dist/AppShell-b0PWt9Fz.js +249 -0
- package/dist/AspectRatio/index.d.ts +2 -0
- package/dist/AspectRatio/index.js +2 -0
- package/dist/AspectRatio-Bij7e-tq.js +40 -0
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/Banner/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.js +1 -1
- package/dist/{Calendar-DpYFXwgb.js → Calendar-CYhGDT6f.js} +2 -1
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-Bfd-YPAK.js → Chat-C1aWl5V3.js} +2 -2
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxInput/index.js +1 -1
- package/dist/{CheckboxInput-C86o3XoG.js → CheckboxInput-CMsEE1_4.js} +4 -2
- package/dist/CheckboxList/index.d.ts +2 -0
- package/dist/CheckboxList/index.js +2 -0
- package/dist/CheckboxList-EsIEXjK_.js +174 -0
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-DaDd1teb.js → Citation-C1X0Rde8.js} +2 -2
- package/dist/ClickableCard/index.d.ts +2 -0
- package/dist/ClickableCard/index.js +2 -0
- package/dist/ClickableCard-Bhds4RRe.js +112 -0
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-CK-NWM_1.js → CodeBlock-BQdooQy2.js} +1 -1
- package/dist/Collapsible/index.d.ts +2 -2
- package/dist/Collapsible/index.js +2 -2
- package/dist/Collapsible-BS9ctCQV.js +192 -0
- package/dist/CommandPalette/index.d.ts +2 -0
- package/dist/CommandPalette/index.js +2 -0
- package/dist/CommandPalette-u5h_E05P.js +489 -0
- package/dist/ComplexSelector/index.d.ts +2 -0
- package/dist/ComplexSelector/index.js +2 -0
- package/dist/ComplexSelector-BHmGWml0.js +293 -0
- package/dist/ContextMenu/index.d.ts +1 -1
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-BJh99Exj.js → ContextMenu-dA-ppaRQ.js} +284 -12
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.js +1 -1
- package/dist/{DateInput-zJAdXByM.js → DateInput-D2ErjXYO.js} +18 -10
- package/dist/DateRangeInput/index.d.ts +2 -0
- package/dist/DateRangeInput/index.js +2 -0
- package/dist/DateRangeInput-fmQlr_A7.js +385 -0
- package/dist/DateTimeInput/index.d.ts +2 -0
- package/dist/DateTimeInput/index.js +2 -0
- package/dist/DateTimeInput-Bs1JmcIp.js +196 -0
- package/dist/Divider/index.d.ts +1 -1
- package/dist/DropdownMenu/index.d.ts +1 -1
- package/dist/DropdownMenu/index.js +1 -1
- package/dist/{DropdownMenu-C3j2zaEn.js → DropdownMenu-B0gogrvG.js} +2 -2
- package/dist/Field/index.d.ts +2 -2
- package/dist/Field/index.js +3 -4
- package/dist/{Field-VlTBsIEo.js → Field-8zRxzDHE.js} +11 -3
- package/dist/{FieldLabel-B1NRyQlS.js → FieldLabel-DmmJyX7w.js} +6 -1
- package/dist/FieldStatus/index.d.ts +2 -0
- package/dist/FieldStatus/index.js +2 -0
- package/dist/FileInput/index.d.ts +2 -0
- package/dist/FileInput/index.js +2 -0
- package/dist/FileInput-CmAfOpkA.js +238 -0
- package/dist/FormLayout/index.d.ts +2 -0
- package/dist/FormLayout/index.js +2 -0
- package/dist/FormLayout-D47FjiOq.js +40 -0
- package/dist/HoverCard/index.d.ts +1 -1
- package/dist/{Icon-B6qNgBP9.js → Icon-5MdZQ18k.js} +10 -2
- package/dist/Layout/index.d.ts +2 -0
- package/dist/Layout/index.js +3 -0
- package/dist/Layout-Bed3kP0M.js +56 -0
- package/dist/LayoutPanel-C34uOq3e.js +358 -0
- package/dist/List/index.d.ts +1 -1
- package/dist/Markdown/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-DyKIwAL_.js → Markdown-CwtLr3f_.js} +2 -2
- package/dist/MetadataList/index.d.ts +2 -0
- package/dist/MetadataList/index.js +2 -0
- package/dist/MetadataList-DlXQTLog.js +124 -0
- package/dist/MobileNav/index.d.ts +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-BK2iRJF-.js → MobileNavToggle-CgQamG6E.js} +19 -12
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BjUsVWWk.js → MoreMenu-BXL6Dqsu.js} +2 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-CKTbTj1A.js → MultiSelector-DT8ZccMI.js} +3 -3
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NavMenu/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +1 -1
- package/dist/NumberInput/index.js +1 -1
- package/dist/{NumberInput-DU3_rw7z.js → NumberInput-DspJO6z6.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-B2T5UtiQ.js → OverflowList-zXg3g6fy.js} +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-qCgNwwhr.js → Pagination-DXfgMUKJ.js} +2 -2
- package/dist/Popover/index.d.ts +2 -1
- package/dist/Radio/index.d.ts +2 -2
- package/dist/Radio/index.js +2 -2
- package/dist/{Radio-BioQfwHQ.js → RadioGroup-BqjdSCfJ.js} +21 -88
- package/dist/RadioList/index.d.ts +2 -0
- package/dist/RadioList/index.js +2 -0
- package/dist/RadioList-DI8ujXcT.js +122 -0
- package/dist/Resizable/index.d.ts +2 -0
- package/dist/Resizable/index.js +2 -0
- package/dist/Resizable-BuGKvU9I.js +261 -0
- package/dist/ScrollableArea/index.d.ts +2 -0
- package/dist/ScrollableArea/index.js +2 -0
- package/dist/ScrollableArea-DQDYjnxO.js +78 -0
- package/dist/Section/index.d.ts +2 -0
- package/dist/Section/index.js +2 -0
- package/dist/Section-C48Wqfc7.js +68 -0
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +2 -0
- package/dist/SelectableCard/index.js +2 -0
- package/dist/SelectableCard-Bj5s_tIN.js +108 -0
- package/dist/Selector/index.d.ts +1 -1
- package/dist/Selector/index.js +1 -1
- package/dist/{Selector-C6sPJMtH.js → Selector-DlZpQh42.js} +1 -1
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +2 -1
- package/dist/{SideNav-D9lnn-sM.js → SideNav-Cdrigq2A.js} +49 -27
- package/dist/Slider/index.js +1 -1
- package/dist/{Slider-DTnWxtnb.js → Slider-D8h_RKcF.js} +1 -1
- package/dist/Stack/index.d.ts +1 -1
- package/dist/Stepper/index.d.ts +2 -0
- package/dist/Stepper/index.js +2 -0
- package/dist/Stepper-DxmLfh8O.js +423 -0
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/{Switch-CNdnr5TP.js → Switch-SesQzPGZ.js} +4 -2
- package/dist/TabList/index.d.ts +2 -2
- package/dist/TabList/index.js +2 -2
- package/dist/TabList-C411uNQU.js +380 -0
- package/dist/Table/index.d.ts +3 -0
- package/dist/Table/index.js +2 -0
- package/dist/Table-7qRmlIQd.js +967 -0
- package/dist/Text/index.d.ts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-BL0NuB99.js → TextArea-Cv9UVbzS.js} +5 -3
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/TextInput/index.js +1 -1
- package/dist/{TextInput-B0IKC7g5.js → TextInput-BasnjVvy.js} +5 -3
- package/dist/Thumbnail/index.d.ts +2 -0
- package/dist/Thumbnail/index.js +2 -0
- package/dist/Thumbnail-BWVzLLyI.js +163 -0
- package/dist/TimeField-l3QzU6vC.js +214 -0
- package/dist/TimeInput/index.d.ts +2 -0
- package/dist/TimeInput/index.js +2 -0
- package/dist/TimeInput-OkgX-xbQ.js +121 -0
- package/dist/Timestamp/index.d.ts +2 -0
- package/dist/Timestamp/index.js +2 -0
- package/dist/Timestamp-DUoP9ari.js +465 -0
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-Ctf9jekS.js → Token-C4KD0fZD.js} +1 -1
- package/dist/Tokenizer/index.d.ts +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-D5MPgau0.js → Tokenizer-BA8sTMPZ.js} +3 -3
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-CjbMCbkC.js → TopNav-CZokS7E_.js} +57 -31
- package/dist/TreeList/index.d.ts +2 -0
- package/dist/TreeList/index.js +2 -0
- package/dist/TreeList-CIbAGOMf.js +506 -0
- package/dist/Typeahead/index.d.ts +1 -1
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-BMoU3hfx.js → Typeahead-DIw-K4aa.js} +3 -3
- package/dist/composables/index.d.ts +3 -2
- package/dist/composables/index.js +8 -2
- package/dist/composables-CVfjp9h4.js +502 -0
- package/dist/context-BjNya0v8.js +19 -0
- package/dist/context-Cfjh8te1.js +29 -0
- package/dist/{locale-56lkR7OK.js → context-D6ECRdc5.js} +267 -18
- package/dist/index-1uRMrk63.d.ts +54 -0
- package/dist/{index-Dw21t7Uf.d.ts → index-2u4l3wq8.d.ts} +2 -2
- package/dist/{index-CvLlWLIZ.d.ts → index-B4OOtNP8.d.ts} +4 -4
- package/dist/{index-_1-uvr27.d.ts → index-B8MbfMwV.d.ts} +1 -1
- package/dist/{index-MPcg1Pm4.d.ts → index-BKr7yvVv.d.ts} +1 -1
- package/dist/index-Be1czg3M.d.ts +167 -0
- package/dist/{index-Dbmgcm8a.d.ts → index-BeR-1LgF.d.ts} +2 -0
- package/dist/{index-CnVbMebA.d.ts → index-Bqb_Fyju.d.ts} +3 -3
- package/dist/index-BrJzFA5X.d.ts +38 -0
- package/dist/{index-BDZCJ9ri.d.ts → index-BuubzuE8.d.ts} +2 -2
- package/dist/index-By2mSzUA.d.ts +67 -0
- package/dist/{index-HV6W3xCx.d.ts → index-Byar3h1e.d.ts} +1 -1
- package/dist/{index-BQuN_dWR.d.ts → index-BzqRns96.d.ts} +1 -1
- package/dist/{index-BkIgRYGz.d.ts → index-C5p2NeCr.d.ts} +2 -2
- package/dist/{index-Cc2HGODZ.d.ts → index-C6RecznD.d.ts} +3 -3
- package/dist/{index-BSRk8MFK.d.ts → index-C8wDPDcP.d.ts} +1 -1
- package/dist/index-CDdRQQF3.d.ts +170 -0
- package/dist/index-COqjznX0.d.ts +47 -0
- package/dist/{index-Cz9ZHVf6.d.ts → index-CT8KEpec.d.ts} +2 -2
- package/dist/{index-CxspvLBl.d.ts → index-CTolyeii.d.ts} +1 -1
- package/dist/index-CVn0GBdB.d.ts +115 -0
- package/dist/index-CX97hlld.d.ts +158 -0
- package/dist/index-C_2Z65Rp.d.ts +67 -0
- package/dist/index-CjtAH60j.d.ts +38 -0
- package/dist/index-CtlkhQ55.d.ts +36 -0
- package/dist/{index-JeZ0YTyd.d.ts → index-D-ZuubCK.d.ts} +4 -4
- package/dist/index-DA52oIdw.d.ts +171 -0
- package/dist/{index-C8NW9xre.d.ts → index-DGNqi2za.d.ts} +7 -7
- package/dist/{index-CCA4R0Mf.d.ts → index-DT9S92sh.d.ts} +31 -6
- package/dist/index-DXSs3rwa.d.ts +252 -0
- package/dist/{index-C0S2Xzoi.d.ts → index-DYChvBOM.d.ts} +135 -0
- package/dist/index-Da7Jm8Ht.d.ts +10 -0
- package/dist/{index-CaHXYQ_E.d.ts → index-Df2YvC8o.d.ts} +717 -147
- package/dist/{index-DjOdQv5B.d.ts → index-DfgHJE7H.d.ts} +1 -1
- package/dist/{index-CPhDtlv-.d.ts → index-FEy8qFSD.d.ts} +3 -3
- package/dist/{index-DBcbfStA.d.ts → index-SMh42NI8.d.ts} +182 -2
- package/dist/{index-Cdi82rTW.d.ts → index-ZJyk8RtQ.d.ts} +6 -2
- package/dist/{index-BeJqhW4l.d.ts → index-fa72tWIU.d.ts} +3 -3
- package/dist/{index-COxy6LEW.d.ts → index-gW0HW02U.d.ts} +1 -1
- package/dist/{index-BQa836Vz.d.ts → index-iBLzInje.d.ts} +6 -14
- package/dist/{index-BhYFxnjV.d.ts → index-kaKBOZSU.d.ts} +2 -2
- package/dist/index-nKlTsNfV.d.ts +42 -0
- package/dist/index-utZGF4GR.d.ts +79 -0
- package/dist/index.d.ts +76 -59
- package/dist/index.js +119 -78
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +2 -1
- package/dist/locale-Cpk_nrLA.js +18 -0
- package/dist/size-BuTzpgnR.d.ts +14 -0
- package/dist/size-xcIqExkS.js +79 -0
- package/dist/{index-Cp0NlzQv.d.ts → types-Db3Owy8Q.d.ts} +1 -36
- package/dist/types-JktRxujg.d.ts +107 -0
- package/dist/useAppShellMobile-DTsyuAJ4.js +19 -0
- package/dist/useClickableContainer-DyNpnSEa.js +112 -0
- package/dist/useFileSelection-BPtaegqK.js +58 -0
- package/dist/useMonthGrid-CmJsZTcB.js +139 -0
- package/dist/useResizable-CeESZS1v.d.ts +72 -0
- package/dist/useScrollableArea-DDk_CluT.js +172 -0
- package/dist/useTimeValue-DWk6oTAZ.js +113 -0
- package/package.json +97 -1
- package/styles/app-shell.css +151 -0
- package/styles/aspect-ratio.css +49 -0
- package/styles/bordered-control.css +87 -0
- package/styles/calendar.css +8 -2
- package/styles/card.css +5 -1
- package/styles/checkbox-list.css +15 -0
- package/styles/clickable-card.css +101 -0
- package/styles/collapsible.css +37 -0
- package/styles/command-palette.css +183 -0
- package/styles/complex-selector.css +114 -0
- package/styles/date-range-input.css +163 -0
- package/styles/date-time-input.css +40 -0
- package/styles/field.css +14 -3
- package/styles/file-input.css +87 -0
- package/styles/form-layout.css +31 -0
- package/styles/heading.css +19 -17
- package/styles/icon.css +32 -0
- package/styles/layout.css +280 -0
- package/styles/metadata-list.css +107 -0
- package/styles/number-input.css +6 -0
- package/styles/radio.css +32 -0
- package/styles/resize-handle.css +128 -0
- package/styles/scrollable-area.css +50 -0
- package/styles/section.css +60 -0
- package/styles/selector.css +10 -0
- package/styles/side-nav.css +26 -0
- package/styles/stepper.css +357 -0
- package/styles/tab-menu.css +91 -0
- package/styles/table.css +256 -0
- package/styles/text-area.css +6 -1
- package/styles/text-input.css +6 -0
- package/styles/thumbnail.css +151 -0
- package/styles/time-input.css +51 -0
- package/styles/timestamp.css +93 -0
- package/styles/tree-list.css +229 -0
- package/styles.css +23 -0
- package/dist/Collapsible-ByXCGhT8.js +0 -102
- package/dist/TabList-LV1U4ZD6.js +0 -184
- package/dist/composables-Dq9RS33w.js +0 -111
- package/dist/index-TnaIHsCS.d.ts +0 -87
|
@@ -1,25 +1,14 @@
|
|
|
1
1
|
import { t as useHotkeys } from "./useHotkeys-dABSK1o9.js";
|
|
2
|
-
import { a as useAstryxMessages } from "./
|
|
3
|
-
import { t as
|
|
2
|
+
import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
|
|
3
|
+
import { i as useSideNavRenderMode, r as useSideNavCollapse, t as sideNavCollapseKey } from "./context-BjNya0v8.js";
|
|
4
|
+
import { t as _sfc_main$5 } from "./Icon-5MdZQ18k.js";
|
|
4
5
|
import { n as resolveNavRoot } from "./link-CdcUSxAj.js";
|
|
5
6
|
import { t as _sfc_main$6 } from "./NavItem-FFOisITc.js";
|
|
6
7
|
import { t as _sfc_main$7 } from "./NavDisclosure-DHrSNRDR.js";
|
|
7
8
|
import { t as _sfc_main$8 } from "./Tooltip-mp0NMh_Y.js";
|
|
8
|
-
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance,
|
|
9
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, getCurrentInstance, normalizeClass, openBlock, provide, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useId, useSlots, watch, withCtx, withModifiers } from "vue";
|
|
9
10
|
import "../styles/visually-hidden.css";
|
|
10
11
|
import "../styles/side-nav.css";
|
|
11
|
-
//#region src/SideNav/context.ts
|
|
12
|
-
const sideNavCollapseKey = Symbol("astryx-side-nav-collapse");
|
|
13
|
-
const fallbackCollapse = {
|
|
14
|
-
isCollapsed: ref(false),
|
|
15
|
-
isCollapsible: ref(false),
|
|
16
|
-
navId: "",
|
|
17
|
-
toggle: () => {}
|
|
18
|
-
};
|
|
19
|
-
function useSideNavCollapse() {
|
|
20
|
-
return inject(sideNavCollapseKey, fallbackCollapse);
|
|
21
|
-
}
|
|
22
|
-
//#endregion
|
|
23
12
|
//#region src/SideNav/SideNavCollapseButton.vue
|
|
24
13
|
const _hoisted_1$4 = [
|
|
25
14
|
"aria-label",
|
|
@@ -76,17 +65,22 @@ const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
|
76
65
|
});
|
|
77
66
|
//#endregion
|
|
78
67
|
//#region src/SideNav/SideNav.vue
|
|
79
|
-
const _hoisted_1$3 =
|
|
68
|
+
const _hoisted_1$3 = {
|
|
69
|
+
key: 0,
|
|
70
|
+
class: "astryx-side-nav astryx-side-nav--topbar",
|
|
71
|
+
"data-mode": "topbar"
|
|
72
|
+
};
|
|
80
73
|
const _hoisted_2$3 = {
|
|
81
74
|
key: 0,
|
|
82
|
-
class: "astryx-side-
|
|
75
|
+
class: "astryx-side-nav__topbar-icons"
|
|
83
76
|
};
|
|
84
77
|
const _hoisted_3$3 = {
|
|
85
|
-
key:
|
|
86
|
-
class: "astryx-side-
|
|
78
|
+
key: 1,
|
|
79
|
+
class: "astryx-side-nav astryx-side-nav--drawer",
|
|
80
|
+
"data-mode": "drawer"
|
|
87
81
|
};
|
|
88
82
|
const _hoisted_4$3 = {
|
|
89
|
-
key:
|
|
83
|
+
key: 0,
|
|
90
84
|
class: "astryx-side-nav__top-content"
|
|
91
85
|
};
|
|
92
86
|
const _hoisted_5$2 = { class: "astryx-side-nav__body" };
|
|
@@ -98,6 +92,28 @@ const _hoisted_7$2 = {
|
|
|
98
92
|
key: 0,
|
|
99
93
|
class: "astryx-side-nav__footer-icons"
|
|
100
94
|
};
|
|
95
|
+
const _hoisted_8$2 = ["aria-label", "data-collapsed"];
|
|
96
|
+
const _hoisted_9$1 = {
|
|
97
|
+
key: 0,
|
|
98
|
+
class: "astryx-side-nav__top"
|
|
99
|
+
};
|
|
100
|
+
const _hoisted_10$1 = {
|
|
101
|
+
key: 0,
|
|
102
|
+
class: "astryx-side-nav__heading-row"
|
|
103
|
+
};
|
|
104
|
+
const _hoisted_11$1 = {
|
|
105
|
+
key: 1,
|
|
106
|
+
class: "astryx-side-nav__top-content"
|
|
107
|
+
};
|
|
108
|
+
const _hoisted_12$1 = { class: "astryx-side-nav__body" };
|
|
109
|
+
const _hoisted_13$1 = {
|
|
110
|
+
key: 1,
|
|
111
|
+
class: "astryx-side-nav__bottom"
|
|
112
|
+
};
|
|
113
|
+
const _hoisted_14$1 = {
|
|
114
|
+
key: 0,
|
|
115
|
+
class: "astryx-side-nav__footer-icons"
|
|
116
|
+
};
|
|
101
117
|
const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
102
118
|
name: "AstryxSideNav",
|
|
103
119
|
__name: "SideNav",
|
|
@@ -132,6 +148,7 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
132
148
|
const hasTop = computed(() => slots.header != null || slots.top != null || showButton.value);
|
|
133
149
|
const hasBottom = computed(() => slots.footer != null || slots.footerIcons != null);
|
|
134
150
|
const label = computed(() => props.label || messages.value.nav.sideNav);
|
|
151
|
+
const renderMode = useSideNavRenderMode();
|
|
135
152
|
watch(() => config.value.defaultIsCollapsed, (value) => {
|
|
136
153
|
if (value != null && props.isCollapsed === void 0 && config.value.isCollapsed === void 0) localCollapsed.value = value;
|
|
137
154
|
}, { immediate: true });
|
|
@@ -159,19 +176,24 @@ const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
|
159
176
|
toggle
|
|
160
177
|
});
|
|
161
178
|
return (_ctx, _cache) => {
|
|
162
|
-
return openBlock(), createElementBlock("
|
|
179
|
+
return unref(renderMode) === "topbar" ? (openBlock(), createElementBlock("div", _hoisted_1$3, [renderSlot(_ctx.$slots, "header"), slots.footerIcons ? (openBlock(), createElementBlock("div", _hoisted_2$3, [renderSlot(_ctx.$slots, "footerIcons")])) : createCommentVNode("v-if", true)])) : unref(renderMode) === "drawer" || unref(renderMode) === "drawer-content" ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
180
|
+
slots.top ? (openBlock(), createElementBlock("div", _hoisted_4$3, [renderSlot(_ctx.$slots, "top")])) : createCommentVNode("v-if", true),
|
|
181
|
+
createElementVNode("div", _hoisted_5$2, [renderSlot(_ctx.$slots, "default")]),
|
|
182
|
+
hasBottom.value ? (openBlock(), createElementBlock("div", _hoisted_6$2, [renderSlot(_ctx.$slots, "footer"), slots.footerIcons ? (openBlock(), createElementBlock("div", _hoisted_7$2, [renderSlot(_ctx.$slots, "footerIcons")])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)
|
|
183
|
+
])) : (openBlock(), createElementBlock("nav", {
|
|
184
|
+
key: 2,
|
|
163
185
|
id: navId,
|
|
164
186
|
class: normalizeClass(["astryx-side-nav", { "astryx-side-nav--collapsed": isCollapsed.value }]),
|
|
165
187
|
"aria-label": label.value,
|
|
166
188
|
"data-collapsed": isCollapsed.value || void 0
|
|
167
189
|
}, [
|
|
168
|
-
hasTop.value ? (openBlock(), createElementBlock("div",
|
|
190
|
+
hasTop.value ? (openBlock(), createElementBlock("div", _hoisted_9$1, [slots.header || showButton.value ? (openBlock(), createElementBlock("div", _hoisted_10$1, [renderSlot(_ctx.$slots, "header"), showButton.value ? (openBlock(), createBlock(_sfc_main$4, {
|
|
169
191
|
key: 0,
|
|
170
192
|
label: config.value.buttonLabel
|
|
171
|
-
}, null, 8, ["label"])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), slots.top ? (openBlock(), createElementBlock("div",
|
|
172
|
-
createElementVNode("div",
|
|
173
|
-
hasBottom.value ? (openBlock(), createElementBlock("div",
|
|
174
|
-
], 10,
|
|
193
|
+
}, null, 8, ["label"])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true), slots.top ? (openBlock(), createElementBlock("div", _hoisted_11$1, [renderSlot(_ctx.$slots, "top")])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true),
|
|
194
|
+
createElementVNode("div", _hoisted_12$1, [renderSlot(_ctx.$slots, "default")]),
|
|
195
|
+
hasBottom.value ? (openBlock(), createElementBlock("div", _hoisted_13$1, [renderSlot(_ctx.$slots, "footer"), slots.footerIcons ? (openBlock(), createElementBlock("div", _hoisted_14$1, [renderSlot(_ctx.$slots, "footerIcons")])) : createCommentVNode("v-if", true)])) : createCommentVNode("v-if", true)
|
|
196
|
+
], 10, _hoisted_8$2));
|
|
175
197
|
};
|
|
176
198
|
}
|
|
177
199
|
});
|
|
@@ -774,4 +796,4 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
774
796
|
}
|
|
775
797
|
});
|
|
776
798
|
//#endregion
|
|
777
|
-
export { _sfc_main$4 as a, _sfc_main$3 as i, _sfc_main$1 as n,
|
|
799
|
+
export { _sfc_main$4 as a, _sfc_main$3 as i, _sfc_main$1 as n, _sfc_main$2 as r, _sfc_main as t };
|
package/dist/Slider/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Slider-
|
|
1
|
+
import { t as _sfc_main } from "../Slider-D8h_RKcF.js";
|
|
2
2
|
export { _sfc_main as Slider };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as _sfc_main$2 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
2
2
|
import { n as useButtonTooltip } from "./Button-DrqeomlE.js";
|
|
3
3
|
import { t as _sfc_main$3 } from "./ButtonTooltip-nWWrth8j.js";
|
|
4
|
-
import { t as _sfc_main$4 } from "./Field-
|
|
4
|
+
import { t as _sfc_main$4 } from "./Field-8zRxzDHE.js";
|
|
5
5
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, normalizeStyle, openBlock, renderList, renderSlot, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useTemplateRef, watch, withCtx, withKeys } from "vue";
|
|
6
6
|
import "../styles/button.css";
|
|
7
7
|
import "../styles/slider.css";
|
package/dist/Stack/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as StackDirection, c as StackItemProps, d as StackProps, f as StackSizeValue, i as StackCrossAlignment, l as StackItemSize, m as VStackProps, n as SpacingStep, o as StackElement, p as StackWrap, r as StackAlignment, s as StackItemCrossAlignSelf, t as HStackProps, u as StackMainAlignment } from "../types-D7QNSqoN.js";
|
|
2
|
-
import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "../index-
|
|
2
|
+
import { i as _default, n as _default$2, r as _default$1, t as _default$3 } from "../index-BKr7yvVv.js";
|
|
3
3
|
export { _default as HStack, type HStackProps, type SpacingStep, _default$1 as Stack, type StackAlignment, type StackCrossAlignment, type StackDirection, type StackElement, _default$2 as StackItem, type StackItemCrossAlignSelf, type StackItemProps, type StackItemSize, type StackMainAlignment, type StackProps, type StackSizeValue, type StackWrap, _default$3 as VStack, type VStackProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as StepProps, c as StepperCollapsedVariant, d as StepperIndicatorPosition, f as StepperOrientation, i as StepProgress, l as StepperDensity, m as StepperSlots, n as _default, o as StepSlots, p as StepperProps, r as StepIndicator, s as StepStatus, t as _default$1, u as StepperHorizontalOptions } from "../index-CVn0GBdB.js";
|
|
2
|
+
export { _default as Step, type StepIndicator, type StepProgress, type StepProps, type StepSlots, type StepStatus, _default$1 as Stepper, type StepperCollapsedVariant, type StepperDensity, type StepperHorizontalOptions, type StepperIndicatorPosition, type StepperOrientation, type StepperProps, type StepperSlots };
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import { t as _sfc_main$3 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
2
|
+
import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
|
|
3
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, onMounted, onUnmounted, openBlock, provide, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useTemplateRef, watch, withCtx } from "vue";
|
|
4
|
+
import "../styles/stepper.css";
|
|
5
|
+
//#region src/Stepper/context.ts
|
|
6
|
+
const stepperContextKey = Symbol("stepper");
|
|
7
|
+
function shouldCollapseStepper(width, count, minimumStepWidth, orientation) {
|
|
8
|
+
if (orientation !== "horizontal" || count < 1) return false;
|
|
9
|
+
return width < count * (minimumStepWidth ?? 112);
|
|
10
|
+
}
|
|
11
|
+
function resolveStepGlyph(options) {
|
|
12
|
+
if (options.status === "warning") return "warning";
|
|
13
|
+
if (options.status === "error") return "error";
|
|
14
|
+
if (options.status === "success" || options.status == null && options.progress === "completed" && options.indicator === "auto") return "check";
|
|
15
|
+
if (options.indicator === "none") return "none";
|
|
16
|
+
if (options.indicator === "number" || options.indicator === "auto" && options.progress === "not-started") return "number";
|
|
17
|
+
if (options.indicator === "auto" && options.progress === "in-progress") return "ring";
|
|
18
|
+
return "none";
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/Stepper/StepMarker.vue
|
|
22
|
+
const _hoisted_1$2 = ["data-glyph"];
|
|
23
|
+
const _hoisted_2$2 = {
|
|
24
|
+
key: 0,
|
|
25
|
+
viewBox: "0 0 16 16"
|
|
26
|
+
};
|
|
27
|
+
const _hoisted_3$2 = {
|
|
28
|
+
key: 1,
|
|
29
|
+
viewBox: "0 0 16 16"
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_4$2 = {
|
|
32
|
+
key: 2,
|
|
33
|
+
viewBox: "0 0 16 16"
|
|
34
|
+
};
|
|
35
|
+
const _hoisted_5$2 = {
|
|
36
|
+
key: 3,
|
|
37
|
+
viewBox: "0 0 16 16"
|
|
38
|
+
};
|
|
39
|
+
const _hoisted_6$2 = { key: 4 };
|
|
40
|
+
const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
41
|
+
name: "AstryxStepMarker",
|
|
42
|
+
__name: "StepMarker",
|
|
43
|
+
props: {
|
|
44
|
+
glyph: {},
|
|
45
|
+
numberLabel: {}
|
|
46
|
+
},
|
|
47
|
+
setup(__props) {
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return __props.glyph !== "none" ? (openBlock(), createElementBlock("span", {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "astryx-step-indicator",
|
|
52
|
+
"data-glyph": __props.glyph,
|
|
53
|
+
"aria-hidden": "true"
|
|
54
|
+
}, [__props.glyph === "warning" ? (openBlock(), createElementBlock("svg", _hoisted_2$2, [..._cache[0] || (_cache[0] = [createElementVNode("path", {
|
|
55
|
+
d: "M8 1.8 14.5 14H1.5L8 1.8z",
|
|
56
|
+
fill: "none",
|
|
57
|
+
stroke: "currentColor",
|
|
58
|
+
"stroke-width": "1.5"
|
|
59
|
+
}, null, -1), createElementVNode("path", {
|
|
60
|
+
d: "M8 6.2v4.2",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
"stroke-linecap": "round"
|
|
63
|
+
}, null, -1)])])) : __props.glyph === "error" ? (openBlock(), createElementBlock("svg", _hoisted_3$2, [..._cache[1] || (_cache[1] = [createElementVNode("circle", {
|
|
64
|
+
cx: "8",
|
|
65
|
+
cy: "8",
|
|
66
|
+
r: "6",
|
|
67
|
+
fill: "none",
|
|
68
|
+
stroke: "currentColor",
|
|
69
|
+
"stroke-width": "1.5"
|
|
70
|
+
}, null, -1), createElementVNode("path", {
|
|
71
|
+
d: "M5.5 5.5l5 5M10.5 5.5l-5 5",
|
|
72
|
+
stroke: "currentColor",
|
|
73
|
+
"stroke-linecap": "round"
|
|
74
|
+
}, null, -1)])])) : __props.glyph === "check" ? (openBlock(), createElementBlock("svg", _hoisted_4$2, [..._cache[2] || (_cache[2] = [createElementVNode("circle", {
|
|
75
|
+
cx: "8",
|
|
76
|
+
cy: "8",
|
|
77
|
+
r: "8",
|
|
78
|
+
fill: "currentColor"
|
|
79
|
+
}, null, -1), createElementVNode("path", {
|
|
80
|
+
d: "M4.4 8.2 6.7 10.5 11.7 5.5",
|
|
81
|
+
fill: "none",
|
|
82
|
+
stroke: "var(--astryx-color-background-surface, #fff)",
|
|
83
|
+
"stroke-linecap": "round",
|
|
84
|
+
"stroke-linejoin": "round",
|
|
85
|
+
"stroke-width": "1.6"
|
|
86
|
+
}, null, -1)])])) : __props.glyph === "ring" ? (openBlock(), createElementBlock("svg", _hoisted_5$2, [..._cache[3] || (_cache[3] = [createElementVNode("circle", {
|
|
87
|
+
cx: "8",
|
|
88
|
+
cy: "8",
|
|
89
|
+
r: "5.25",
|
|
90
|
+
fill: "none",
|
|
91
|
+
stroke: "currentColor",
|
|
92
|
+
"stroke-width": "1.5"
|
|
93
|
+
}, null, -1), createElementVNode("circle", {
|
|
94
|
+
cx: "8",
|
|
95
|
+
cy: "8",
|
|
96
|
+
r: "2.25",
|
|
97
|
+
fill: "currentColor"
|
|
98
|
+
}, null, -1)])])) : (openBlock(), createElementBlock("span", _hoisted_6$2, toDisplayString(__props.numberLabel), 1))], 8, _hoisted_1$2)) : createCommentVNode("v-if", true);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/Stepper/Step.vue
|
|
104
|
+
const _hoisted_1$1 = [
|
|
105
|
+
"aria-current",
|
|
106
|
+
"data-density",
|
|
107
|
+
"data-indicator-position",
|
|
108
|
+
"data-orientation",
|
|
109
|
+
"data-progress",
|
|
110
|
+
"data-status"
|
|
111
|
+
];
|
|
112
|
+
const _hoisted_2$1 = ["data-filled"];
|
|
113
|
+
const _hoisted_3$1 = {
|
|
114
|
+
key: 1,
|
|
115
|
+
class: "astryx-step-rail"
|
|
116
|
+
};
|
|
117
|
+
const _hoisted_4$1 = ["data-filled"];
|
|
118
|
+
const _hoisted_5$1 = ["data-filled"];
|
|
119
|
+
const _hoisted_6$1 = ["data-glyph"];
|
|
120
|
+
const _hoisted_7$1 = { class: "astryx-step-copy" };
|
|
121
|
+
const _hoisted_8$1 = { class: "astryx-step-label-row" };
|
|
122
|
+
const _hoisted_9$1 = { class: "astryx-step-label" };
|
|
123
|
+
const _hoisted_10 = {
|
|
124
|
+
key: 1,
|
|
125
|
+
class: "astryx-step-optional"
|
|
126
|
+
};
|
|
127
|
+
const _hoisted_11 = {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: "astryx-step-description"
|
|
130
|
+
};
|
|
131
|
+
const _hoisted_12 = {
|
|
132
|
+
key: 2,
|
|
133
|
+
class: "astryx-step-content"
|
|
134
|
+
};
|
|
135
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
136
|
+
name: "AstryxStep",
|
|
137
|
+
__name: "Step",
|
|
138
|
+
props: {
|
|
139
|
+
step: {},
|
|
140
|
+
label: {},
|
|
141
|
+
description: {},
|
|
142
|
+
status: {},
|
|
143
|
+
isDisabled: {
|
|
144
|
+
type: Boolean,
|
|
145
|
+
default: false
|
|
146
|
+
},
|
|
147
|
+
isOptional: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: false
|
|
150
|
+
},
|
|
151
|
+
indicator: { default: "auto" },
|
|
152
|
+
density: {}
|
|
153
|
+
},
|
|
154
|
+
setup(__props) {
|
|
155
|
+
const props = __props;
|
|
156
|
+
const stepper = inject(stepperContextKey);
|
|
157
|
+
const messages = useAstryxMessages();
|
|
158
|
+
const progress = computed(() => {
|
|
159
|
+
const active = stepper?.activeStep.value ?? 0;
|
|
160
|
+
if (props.step === active) return "in-progress";
|
|
161
|
+
if (props.step < active) return "completed";
|
|
162
|
+
return "not-started";
|
|
163
|
+
});
|
|
164
|
+
const density = computed(() => props.density ?? stepper?.density.value ?? "balanced");
|
|
165
|
+
const orientation = computed(() => stepper?.orientation.value ?? "horizontal");
|
|
166
|
+
const indicatorPosition = computed(() => stepper?.indicatorPosition.value ?? "separated");
|
|
167
|
+
const isClickable = computed(() => stepper?.isNonLinear.value === true && !props.isDisabled);
|
|
168
|
+
const numberLabel = computed(() => String(props.step + 1));
|
|
169
|
+
const glyph = computed(() => resolveStepGlyph({
|
|
170
|
+
progress: progress.value,
|
|
171
|
+
indicator: props.indicator,
|
|
172
|
+
status: props.status
|
|
173
|
+
}));
|
|
174
|
+
const collapsed = computed(() => stepper?.collapsed.value === true);
|
|
175
|
+
const leadFilled = computed(() => props.step <= (stepper?.activeStep.value ?? 0));
|
|
176
|
+
const trailFilled = computed(() => props.step < (stepper?.activeStep.value ?? 0));
|
|
177
|
+
const accessibleName = computed(() => {
|
|
178
|
+
const stepNumber = props.step + 1;
|
|
179
|
+
const status = props.status === "error" ? messages.value.stepper.status.error : props.status === "warning" ? messages.value.stepper.status.warning : progress.value === "completed" ? messages.value.stepper.status.completed : null;
|
|
180
|
+
if (status == null) return messages.value.stepper.goToStep(stepNumber);
|
|
181
|
+
return messages.value.stepper.goToStepWithStatus(stepNumber, status);
|
|
182
|
+
});
|
|
183
|
+
const hiddenStatus = computed(() => {
|
|
184
|
+
if (progress.value === "in-progress") return null;
|
|
185
|
+
if (props.status === "error") return messages.value.stepper.status.error;
|
|
186
|
+
if (props.status === "warning") return messages.value.stepper.status.warning;
|
|
187
|
+
if (props.status === "success" || progress.value === "completed") return messages.value.stepper.status.completed;
|
|
188
|
+
return null;
|
|
189
|
+
});
|
|
190
|
+
function activate() {
|
|
191
|
+
if (!isClickable.value) return;
|
|
192
|
+
stepper?.select.value?.(props.step);
|
|
193
|
+
}
|
|
194
|
+
if (stepper) {
|
|
195
|
+
const context = stepper;
|
|
196
|
+
watch(() => ({
|
|
197
|
+
step: props.step,
|
|
198
|
+
label: props.label,
|
|
199
|
+
description: props.description,
|
|
200
|
+
indicator: props.indicator,
|
|
201
|
+
status: props.status,
|
|
202
|
+
isDisabled: props.isDisabled
|
|
203
|
+
}), (record) => context.register(record), { immediate: true });
|
|
204
|
+
onUnmounted(() => context.unregister(props.step));
|
|
205
|
+
}
|
|
206
|
+
return (_ctx, _cache) => {
|
|
207
|
+
return openBlock(), createElementBlock("li", {
|
|
208
|
+
class: "astryx-step",
|
|
209
|
+
"aria-current": progress.value === "in-progress" ? "step" : void 0,
|
|
210
|
+
"data-density": density.value,
|
|
211
|
+
"data-indicator-position": indicatorPosition.value,
|
|
212
|
+
"data-orientation": orientation.value,
|
|
213
|
+
"data-progress": progress.value,
|
|
214
|
+
"data-status": __props.status
|
|
215
|
+
}, [
|
|
216
|
+
indicatorPosition.value === "separated" || collapsed.value ? (openBlock(), createElementBlock("span", {
|
|
217
|
+
key: 0,
|
|
218
|
+
class: "astryx-step-bar",
|
|
219
|
+
"data-filled": leadFilled.value || void 0
|
|
220
|
+
}, null, 8, _hoisted_2$1)) : (openBlock(), createElementBlock("span", _hoisted_3$1, [createElementVNode("span", {
|
|
221
|
+
class: "astryx-step-connector astryx-step-connector-lead",
|
|
222
|
+
"data-filled": leadFilled.value || void 0
|
|
223
|
+
}, null, 8, _hoisted_4$1), createElementVNode("span", {
|
|
224
|
+
class: "astryx-step-connector astryx-step-connector-trail",
|
|
225
|
+
"data-filled": trailFilled.value || void 0
|
|
226
|
+
}, null, 8, _hoisted_5$1)])),
|
|
227
|
+
(openBlock(), createBlock(resolveDynamicComponent(isClickable.value ? "button" : "div"), {
|
|
228
|
+
class: "astryx-step-control",
|
|
229
|
+
"aria-label": isClickable.value ? accessibleName.value : void 0,
|
|
230
|
+
type: isClickable.value ? "button" : void 0,
|
|
231
|
+
onClick: activate
|
|
232
|
+
}, {
|
|
233
|
+
default: withCtx(() => [_ctx.$slots.icon ? (openBlock(), createElementBlock("span", {
|
|
234
|
+
key: 0,
|
|
235
|
+
class: "astryx-step-indicator",
|
|
236
|
+
"data-glyph": glyph.value,
|
|
237
|
+
"aria-hidden": "true"
|
|
238
|
+
}, [renderSlot(_ctx.$slots, "icon")], 8, _hoisted_6$1)) : (openBlock(), createBlock(_sfc_main$2, {
|
|
239
|
+
key: 1,
|
|
240
|
+
glyph: glyph.value,
|
|
241
|
+
"number-label": numberLabel.value
|
|
242
|
+
}, null, 8, ["glyph", "number-label"])), createElementVNode("span", _hoisted_7$1, [createElementVNode("span", _hoisted_8$1, [
|
|
243
|
+
createElementVNode("span", _hoisted_9$1, toDisplayString(__props.label), 1),
|
|
244
|
+
hiddenStatus.value ? (openBlock(), createBlock(_sfc_main$3, { key: 0 }, {
|
|
245
|
+
default: withCtx(() => [createTextVNode(toDisplayString(hiddenStatus.value), 1)]),
|
|
246
|
+
_: 1
|
|
247
|
+
})) : createCommentVNode("v-if", true),
|
|
248
|
+
__props.isOptional ? (openBlock(), createElementBlock("span", _hoisted_10, "• " + toDisplayString(unref(messages).stepper.optional), 1)) : createCommentVNode("v-if", true),
|
|
249
|
+
renderSlot(_ctx.$slots, "end")
|
|
250
|
+
]), __props.description ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(__props.description), 1)) : createCommentVNode("v-if", true)])]),
|
|
251
|
+
_: 3
|
|
252
|
+
}, 8, ["aria-label", "type"])),
|
|
253
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_12, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("v-if", true)
|
|
254
|
+
], 8, _hoisted_1$1);
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region src/Stepper/Stepper.vue
|
|
260
|
+
const _hoisted_1 = ["data-collapsed"];
|
|
261
|
+
const _hoisted_2 = [
|
|
262
|
+
"aria-label",
|
|
263
|
+
"data-collapsible",
|
|
264
|
+
"data-indicator-position",
|
|
265
|
+
"data-orientation"
|
|
266
|
+
];
|
|
267
|
+
const _hoisted_3 = {
|
|
268
|
+
key: 0,
|
|
269
|
+
class: "astryx-stepper-summary"
|
|
270
|
+
};
|
|
271
|
+
const _hoisted_4 = ["aria-label", "disabled"];
|
|
272
|
+
const _hoisted_5 = { class: "astryx-stepper-summary-body" };
|
|
273
|
+
const _hoisted_6 = { class: "astryx-stepper-summary-row" };
|
|
274
|
+
const _hoisted_7 = { class: "astryx-step-label" };
|
|
275
|
+
const _hoisted_8 = {
|
|
276
|
+
key: 0,
|
|
277
|
+
class: "astryx-step-description"
|
|
278
|
+
};
|
|
279
|
+
const _hoisted_9 = ["aria-label", "disabled"];
|
|
280
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
281
|
+
name: "AstryxStepper",
|
|
282
|
+
__name: "Stepper",
|
|
283
|
+
props: {
|
|
284
|
+
activeStep: {},
|
|
285
|
+
orientation: { default: "horizontal" },
|
|
286
|
+
onStepClick: {},
|
|
287
|
+
label: {},
|
|
288
|
+
density: { default: "balanced" },
|
|
289
|
+
indicatorPosition: { default: "separated" },
|
|
290
|
+
hasCollapsibleLabels: {
|
|
291
|
+
type: Boolean,
|
|
292
|
+
default: false
|
|
293
|
+
},
|
|
294
|
+
horizontalOptions: {}
|
|
295
|
+
},
|
|
296
|
+
setup(__props) {
|
|
297
|
+
const props = __props;
|
|
298
|
+
const messages = useAstryxMessages();
|
|
299
|
+
const root = useTemplateRef("root");
|
|
300
|
+
const width = ref(Number.POSITIVE_INFINITY);
|
|
301
|
+
const steps = ref([]);
|
|
302
|
+
const activeStep = computed(() => props.activeStep);
|
|
303
|
+
const orientation = computed(() => props.orientation);
|
|
304
|
+
const density = computed(() => props.density);
|
|
305
|
+
const indicatorPosition = computed(() => props.indicatorPosition);
|
|
306
|
+
const hasCollapsibleLabels = computed(() => props.hasCollapsibleLabels && props.orientation === "horizontal");
|
|
307
|
+
const select = computed(() => props.onStepClick ?? null);
|
|
308
|
+
const isNonLinear = computed(() => select.value != null);
|
|
309
|
+
const collapsed = computed(() => shouldCollapseStepper(width.value, steps.value.length, props.horizontalOptions?.minimumStepWidth, props.orientation));
|
|
310
|
+
const collapsedVariant = computed(() => props.horizontalOptions?.collapsedVariant ?? "withLabelAndControls");
|
|
311
|
+
const orderedSteps = computed(() => [...steps.value].sort((left, right) => left.step - right.step));
|
|
312
|
+
const current = computed(() => steps.value.find((step) => step.step === props.activeStep) ?? null);
|
|
313
|
+
const showSummary = computed(() => collapsed.value && current.value != null && collapsedVariant.value !== "hiddenLabel");
|
|
314
|
+
const showControls = computed(() => showSummary.value && collapsedVariant.value === "withLabelAndControls" && select.value != null);
|
|
315
|
+
const currentGlyph = computed(() => {
|
|
316
|
+
const step = current.value;
|
|
317
|
+
if (step == null) return "none";
|
|
318
|
+
return resolveStepGlyph({
|
|
319
|
+
progress: "in-progress",
|
|
320
|
+
indicator: step.indicator,
|
|
321
|
+
status: step.status
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
function register(record) {
|
|
325
|
+
if (steps.value.findIndex((step) => step.step === record.step) === -1) steps.value = [...steps.value, record];
|
|
326
|
+
else steps.value = steps.value.map((step) => step.step === record.step ? record : step);
|
|
327
|
+
}
|
|
328
|
+
function unregister(step) {
|
|
329
|
+
steps.value = steps.value.filter((item) => item.step !== step);
|
|
330
|
+
}
|
|
331
|
+
function neighbor(delta) {
|
|
332
|
+
const ordered = orderedSteps.value;
|
|
333
|
+
let cursor = ordered.findIndex((step) => step.step === props.activeStep) + delta;
|
|
334
|
+
while (cursor >= 0 && cursor < ordered.length && ordered[cursor]?.isDisabled) cursor += delta;
|
|
335
|
+
if (cursor < 0 || cursor >= ordered.length) return null;
|
|
336
|
+
return ordered[cursor]?.step ?? null;
|
|
337
|
+
}
|
|
338
|
+
function move(delta) {
|
|
339
|
+
const next = neighbor(delta);
|
|
340
|
+
if (next == null) return;
|
|
341
|
+
select.value?.(next);
|
|
342
|
+
}
|
|
343
|
+
let observer;
|
|
344
|
+
onMounted(() => {
|
|
345
|
+
const node = root.value;
|
|
346
|
+
if (node == null || typeof ResizeObserver === "undefined") return;
|
|
347
|
+
observer = new ResizeObserver((entries) => {
|
|
348
|
+
width.value = entries[0]?.contentRect.width ?? node.clientWidth;
|
|
349
|
+
});
|
|
350
|
+
observer.observe(node);
|
|
351
|
+
});
|
|
352
|
+
onUnmounted(() => observer?.disconnect());
|
|
353
|
+
provide(stepperContextKey, {
|
|
354
|
+
activeStep,
|
|
355
|
+
collapsed,
|
|
356
|
+
density,
|
|
357
|
+
hasCollapsibleLabels,
|
|
358
|
+
indicatorPosition,
|
|
359
|
+
isNonLinear,
|
|
360
|
+
orientation,
|
|
361
|
+
register,
|
|
362
|
+
select,
|
|
363
|
+
unregister
|
|
364
|
+
});
|
|
365
|
+
return (_ctx, _cache) => {
|
|
366
|
+
return openBlock(), createElementBlock("div", {
|
|
367
|
+
ref_key: "root",
|
|
368
|
+
ref: root,
|
|
369
|
+
class: "astryx-stepper-root",
|
|
370
|
+
"data-collapsed": collapsed.value || void 0
|
|
371
|
+
}, [createElementVNode("ol", {
|
|
372
|
+
class: "astryx-stepper",
|
|
373
|
+
"aria-label": __props.label || unref(messages).stepper.progress,
|
|
374
|
+
"data-collapsible": hasCollapsibleLabels.value || void 0,
|
|
375
|
+
"data-indicator-position": indicatorPosition.value,
|
|
376
|
+
"data-orientation": orientation.value
|
|
377
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_2), showSummary.value && current.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
378
|
+
showControls.value ? (openBlock(), createElementBlock("button", {
|
|
379
|
+
key: 0,
|
|
380
|
+
class: "astryx-stepper-nav",
|
|
381
|
+
type: "button",
|
|
382
|
+
"aria-label": unref(messages).stepper.previous,
|
|
383
|
+
disabled: neighbor(-1) == null,
|
|
384
|
+
onClick: _cache[0] || (_cache[0] = ($event) => move(-1))
|
|
385
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
|
|
386
|
+
viewBox: "0 0 16 16",
|
|
387
|
+
"aria-hidden": "true"
|
|
388
|
+
}, [createElementVNode("path", {
|
|
389
|
+
d: "M10 3.5 5.5 8 10 12.5",
|
|
390
|
+
fill: "none",
|
|
391
|
+
stroke: "currentColor",
|
|
392
|
+
"stroke-linecap": "round",
|
|
393
|
+
"stroke-linejoin": "round",
|
|
394
|
+
"stroke-width": "1.5"
|
|
395
|
+
})], -1)])], 8, _hoisted_4)) : createCommentVNode("v-if", true),
|
|
396
|
+
createElementVNode("span", _hoisted_5, [createElementVNode("span", _hoisted_6, [createVNode(_sfc_main$2, {
|
|
397
|
+
glyph: currentGlyph.value,
|
|
398
|
+
"number-label": String(activeStep.value + 1)
|
|
399
|
+
}, null, 8, ["glyph", "number-label"]), createElementVNode("span", _hoisted_7, toDisplayString(current.value.label), 1)]), current.value.description ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(current.value.description), 1)) : createCommentVNode("v-if", true)]),
|
|
400
|
+
showControls.value ? (openBlock(), createElementBlock("button", {
|
|
401
|
+
key: 1,
|
|
402
|
+
class: "astryx-stepper-nav",
|
|
403
|
+
type: "button",
|
|
404
|
+
"aria-label": unref(messages).stepper.next,
|
|
405
|
+
disabled: neighbor(1) == null,
|
|
406
|
+
onClick: _cache[1] || (_cache[1] = ($event) => move(1))
|
|
407
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
|
|
408
|
+
viewBox: "0 0 16 16",
|
|
409
|
+
"aria-hidden": "true"
|
|
410
|
+
}, [createElementVNode("path", {
|
|
411
|
+
d: "M6 3.5 10.5 8 6 12.5",
|
|
412
|
+
fill: "none",
|
|
413
|
+
stroke: "currentColor",
|
|
414
|
+
"stroke-linecap": "round",
|
|
415
|
+
"stroke-linejoin": "round",
|
|
416
|
+
"stroke-width": "1.5"
|
|
417
|
+
})], -1)])], 8, _hoisted_9)) : createCommentVNode("v-if", true)
|
|
418
|
+
])) : createCommentVNode("v-if", true)], 8, _hoisted_1);
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
//#endregion
|
|
423
|
+
export { _sfc_main$1 as n, _sfc_main as t };
|
package/dist/Switch/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as SwitchChangeEvent, Ft as SwitchStatus, It as SwitchStatusType, Mt as SwitchProps, Nt as SwitchSize, Ot as _default, Pt as SwitchSlots, jt as SwitchEmits, kt as SwitchChangeAction } from "../index-Df2YvC8o.js";
|
|
2
2
|
export { _default as Switch, type SwitchChangeAction, type SwitchChangeEvent, type SwitchEmits, type SwitchProps, type SwitchSize, type SwitchSlots, type SwitchStatus, type SwitchStatusType };
|
package/dist/Switch/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Switch-
|
|
1
|
+
import { t as _sfc_main } from "../Switch-SesQzPGZ.js";
|
|
2
2
|
export { _sfc_main as Switch };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as _sfc_main$1 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
2
2
|
import { n as useButtonTooltip } from "./Button-DrqeomlE.js";
|
|
3
3
|
import { t as _sfc_main$2 } from "./ButtonTooltip-nWWrth8j.js";
|
|
4
|
-
import {
|
|
4
|
+
import { i as useAriaRequired } from "./context-Cfjh8te1.js";
|
|
5
|
+
import { t as _sfc_main$3 } from "./FieldLabel-DmmJyX7w.js";
|
|
5
6
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, onUpdated, openBlock, renderSlot, shallowRef, toDisplayString, unref, useAttrs, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
6
7
|
import "../styles/switch.css";
|
|
7
8
|
//#region src/Switch/useSwitchAction.ts
|
|
@@ -128,6 +129,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
128
129
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
129
130
|
const props = __props;
|
|
130
131
|
const emit = __emit;
|
|
132
|
+
const ariaRequired = useAriaRequired(props);
|
|
131
133
|
const model = useModel(__props, "modelValue");
|
|
132
134
|
const attrs = useAttrs();
|
|
133
135
|
const input = useTemplateRef("input");
|
|
@@ -246,7 +248,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
246
248
|
"aria-disabled": showsDisabledMessage.value || void 0,
|
|
247
249
|
"aria-readonly": __props.isReadOnly || void 0,
|
|
248
250
|
"aria-busy": busy.value || void 0,
|
|
249
|
-
"aria-required":
|
|
251
|
+
"aria-required": unref(ariaRequired),
|
|
250
252
|
"aria-invalid": __props.status?.type === "error" ? true : inputAttrs()["aria-invalid"],
|
|
251
253
|
onClick: click,
|
|
252
254
|
onChange: change,
|
package/dist/TabList/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { _default as Tab, _default$1 as TabList, type TabListLayout, type TabListProps, type TabListSize, type TabListTab, type TabProps };
|
|
1
|
+
import { a as TabListProps, c as TabMenuOption, i as TabListLayout, l as TabMenuProps, n as _default$1, o as TabListSize, r as _default, s as TabListTab, t as _default$2, u as TabProps } from "../index-DT9S92sh.js";
|
|
2
|
+
export { _default as Tab, _default$1 as TabList, type TabListLayout, type TabListProps, type TabListSize, type TabListTab, _default$2 as TabMenu, type TabMenuOption, type TabMenuProps, type TabProps };
|
package/dist/TabList/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _sfc_main, t as _sfc_main$
|
|
2
|
-
export { _sfc_main as Tab, _sfc_main$1 as TabList };
|
|
1
|
+
import { n as _sfc_main$1, r as _sfc_main, t as _sfc_main$2 } from "../TabList-C411uNQU.js";
|
|
2
|
+
export { _sfc_main as Tab, _sfc_main$1 as TabList, _sfc_main$2 as TabMenu };
|