@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
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { a as supportsInternalContentWidth, i as spacingVariable, t as formatSize } from "./size-xcIqExkS.js";
|
|
2
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, mergeProps, normalizeStyle, openBlock, provide, renderSlot, unref, useAttrs, useSlots, useTemplateRef, withCtx } from "vue";
|
|
3
|
+
import "../styles/layout.css";
|
|
4
|
+
//#region src/Layout/context.ts
|
|
5
|
+
const layoutSlotsKey = Symbol("astryx-layout-slots");
|
|
6
|
+
const layoutAreaKey = Symbol("astryx-layout-area");
|
|
7
|
+
const layoutDividerKey = Symbol("astryx-layout-dividers");
|
|
8
|
+
const emptySlots = computed(() => ({
|
|
9
|
+
hasHeader: false,
|
|
10
|
+
hasFooter: false,
|
|
11
|
+
hasStart: false,
|
|
12
|
+
hasEnd: false
|
|
13
|
+
}));
|
|
14
|
+
function useLayoutSlots() {
|
|
15
|
+
return inject(layoutSlotsKey, emptySlots);
|
|
16
|
+
}
|
|
17
|
+
function useLayoutArea() {
|
|
18
|
+
return inject(layoutAreaKey, computed(() => null));
|
|
19
|
+
}
|
|
20
|
+
function useLayoutDividers() {
|
|
21
|
+
return inject(layoutDividerKey, computed(() => void 0));
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/Layout/LayoutRegion.vue
|
|
25
|
+
const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
26
|
+
__name: "LayoutRegion",
|
|
27
|
+
props: { area: {} },
|
|
28
|
+
setup(__props) {
|
|
29
|
+
const props = __props;
|
|
30
|
+
provide(layoutAreaKey, computed(() => props.area));
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return renderSlot(_ctx.$slots, "default");
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/Layout/Layout.vue
|
|
38
|
+
const _hoisted_1$3 = ["data-height"];
|
|
39
|
+
const _hoisted_2$1 = [
|
|
40
|
+
"data-full-bleed",
|
|
41
|
+
"data-panels",
|
|
42
|
+
"data-width-mode"
|
|
43
|
+
];
|
|
44
|
+
const _hoisted_3 = { class: "astryx-layout__middle" };
|
|
45
|
+
const _hoisted_4 = { class: "astryx-layout__content-slot" };
|
|
46
|
+
const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
47
|
+
name: "AstryxLayout",
|
|
48
|
+
inheritAttrs: false,
|
|
49
|
+
__name: "Layout",
|
|
50
|
+
props: {
|
|
51
|
+
contentWidth: {},
|
|
52
|
+
height: { default: "fill" },
|
|
53
|
+
padding: {},
|
|
54
|
+
defaultHasDividers: { type: Boolean }
|
|
55
|
+
},
|
|
56
|
+
setup(__props, { expose: __expose }) {
|
|
57
|
+
const props = __props;
|
|
58
|
+
const attrs = useAttrs();
|
|
59
|
+
const slots = useSlots();
|
|
60
|
+
const root = useTemplateRef("root");
|
|
61
|
+
const parentDividers = useLayoutDividers();
|
|
62
|
+
__expose({ element: root });
|
|
63
|
+
const slotsState = computed(() => ({
|
|
64
|
+
hasHeader: slots.header != null,
|
|
65
|
+
hasFooter: slots.footer != null,
|
|
66
|
+
hasStart: slots.start != null,
|
|
67
|
+
hasEnd: slots.end != null
|
|
68
|
+
}));
|
|
69
|
+
provide(layoutSlotsKey, slotsState);
|
|
70
|
+
provide(layoutDividerKey, computed(() => props.defaultHasDividers ?? parentDividers.value));
|
|
71
|
+
const panelCount = computed(() => {
|
|
72
|
+
if (slotsState.value.hasStart && slotsState.value.hasEnd) return "both";
|
|
73
|
+
if (slotsState.value.hasStart) return "start";
|
|
74
|
+
if (slotsState.value.hasEnd) return "end";
|
|
75
|
+
return "none";
|
|
76
|
+
});
|
|
77
|
+
const widthMode = computed(() => {
|
|
78
|
+
if (props.contentWidth == null) return void 0;
|
|
79
|
+
return supportsInternalContentWidth(props.contentWidth) && panelCount.value !== "both" ? "internal" : "constrained";
|
|
80
|
+
});
|
|
81
|
+
const forwardedAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "class" && key !== "style")));
|
|
82
|
+
const rootClass = computed(() => ["astryx-layout", attrs.class]);
|
|
83
|
+
const rootStyle = computed(() => attrs.style);
|
|
84
|
+
const innerStyle = computed(() => {
|
|
85
|
+
const width = formatSize(props.contentWidth);
|
|
86
|
+
const style = {};
|
|
87
|
+
if (props.padding != null) {
|
|
88
|
+
const step = spacingVariable(props.padding);
|
|
89
|
+
if (step != null) {
|
|
90
|
+
style["--layout-padding-own-outer-x"] = step;
|
|
91
|
+
style["--layout-padding-own-outer-y"] = step;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (width != null) {
|
|
95
|
+
style["--layout-content-width"] = width;
|
|
96
|
+
if (supportsInternalContentWidth(props.contentWidth)) style["--layout-alignment-width"] = width;
|
|
97
|
+
}
|
|
98
|
+
return style;
|
|
99
|
+
});
|
|
100
|
+
return (_ctx, _cache) => {
|
|
101
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
102
|
+
ref_key: "root",
|
|
103
|
+
ref: root
|
|
104
|
+
}, forwardedAttrs.value, {
|
|
105
|
+
class: rootClass.value,
|
|
106
|
+
"data-height": __props.height,
|
|
107
|
+
style: rootStyle.value
|
|
108
|
+
}), [createElementVNode("div", {
|
|
109
|
+
class: "astryx-layout__inner",
|
|
110
|
+
"data-full-bleed": __props.padding === 0 || void 0,
|
|
111
|
+
"data-panels": panelCount.value,
|
|
112
|
+
"data-width-mode": widthMode.value,
|
|
113
|
+
style: normalizeStyle(innerStyle.value)
|
|
114
|
+
}, [
|
|
115
|
+
unref(slots).header ? (openBlock(), createBlock(_sfc_main$4, {
|
|
116
|
+
key: 0,
|
|
117
|
+
area: "header"
|
|
118
|
+
}, {
|
|
119
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "header")]),
|
|
120
|
+
_: 3
|
|
121
|
+
})) : createCommentVNode("v-if", true),
|
|
122
|
+
createElementVNode("div", _hoisted_3, [
|
|
123
|
+
unref(slots).start ? (openBlock(), createBlock(_sfc_main$4, {
|
|
124
|
+
key: 0,
|
|
125
|
+
area: "start"
|
|
126
|
+
}, {
|
|
127
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "start")]),
|
|
128
|
+
_: 3
|
|
129
|
+
})) : createCommentVNode("v-if", true),
|
|
130
|
+
createElementVNode("div", _hoisted_4, [createVNode(_sfc_main$4, { area: "content" }, {
|
|
131
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
132
|
+
_: 3
|
|
133
|
+
})]),
|
|
134
|
+
unref(slots).end ? (openBlock(), createBlock(_sfc_main$4, {
|
|
135
|
+
key: 1,
|
|
136
|
+
area: "end"
|
|
137
|
+
}, {
|
|
138
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "end")]),
|
|
139
|
+
_: 3
|
|
140
|
+
})) : createCommentVNode("v-if", true)
|
|
141
|
+
]),
|
|
142
|
+
unref(slots).footer ? (openBlock(), createBlock(_sfc_main$4, {
|
|
143
|
+
key: 1,
|
|
144
|
+
area: "footer"
|
|
145
|
+
}, {
|
|
146
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
|
|
147
|
+
_: 3
|
|
148
|
+
})) : createCommentVNode("v-if", true)
|
|
149
|
+
], 12, _hoisted_2$1)], 16, _hoisted_1$3);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/Layout/regionPadding.ts
|
|
155
|
+
function regionPaddingStyle(prefix, padding, paddingBlockEnd) {
|
|
156
|
+
if (padding == null && paddingBlockEnd == null) return {};
|
|
157
|
+
const style = {};
|
|
158
|
+
const set = (edge, step) => {
|
|
159
|
+
const value = spacingVariable(step);
|
|
160
|
+
if (value != null) style[`${prefix}-${edge}`] = value;
|
|
161
|
+
};
|
|
162
|
+
if (padding != null) {
|
|
163
|
+
set("inline", padding);
|
|
164
|
+
set("inline-start", padding);
|
|
165
|
+
set("inline-end", padding);
|
|
166
|
+
set("block-start", padding);
|
|
167
|
+
set("block-end", padding);
|
|
168
|
+
}
|
|
169
|
+
set("block-end", paddingBlockEnd);
|
|
170
|
+
return style;
|
|
171
|
+
}
|
|
172
|
+
//#endregion
|
|
173
|
+
//#region src/Layout/LayoutContent.vue
|
|
174
|
+
const _hoisted_1$2 = [
|
|
175
|
+
"role",
|
|
176
|
+
"aria-label",
|
|
177
|
+
"data-panels",
|
|
178
|
+
"data-edge-start",
|
|
179
|
+
"data-edge-end",
|
|
180
|
+
"data-edge-header",
|
|
181
|
+
"data-edge-footer",
|
|
182
|
+
"data-scrollable",
|
|
183
|
+
"data-explicit-padding",
|
|
184
|
+
"data-bleed"
|
|
185
|
+
];
|
|
186
|
+
const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
187
|
+
name: "AstryxLayoutContent",
|
|
188
|
+
inheritAttrs: false,
|
|
189
|
+
__name: "LayoutContent",
|
|
190
|
+
props: {
|
|
191
|
+
padding: {},
|
|
192
|
+
isScrollable: {
|
|
193
|
+
type: Boolean,
|
|
194
|
+
default: true
|
|
195
|
+
},
|
|
196
|
+
label: {},
|
|
197
|
+
role: {}
|
|
198
|
+
},
|
|
199
|
+
setup(__props, { expose: __expose }) {
|
|
200
|
+
const props = __props;
|
|
201
|
+
const attrs = useAttrs();
|
|
202
|
+
const root = useTemplateRef("root");
|
|
203
|
+
const slots = useLayoutSlots();
|
|
204
|
+
__expose({ element: root });
|
|
205
|
+
const panels = computed(() => {
|
|
206
|
+
if (slots.value.hasStart && slots.value.hasEnd) return "both";
|
|
207
|
+
if (slots.value.hasStart) return "start";
|
|
208
|
+
if (slots.value.hasEnd) return "end";
|
|
209
|
+
return "none";
|
|
210
|
+
});
|
|
211
|
+
const forwardedAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "class" && key !== "style")));
|
|
212
|
+
const rootClass = computed(() => ["astryx-layout-content", attrs.class]);
|
|
213
|
+
const rootStyle = computed(() => [regionPaddingStyle("--_layout-content", props.padding), attrs.style]);
|
|
214
|
+
return (_ctx, _cache) => {
|
|
215
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
216
|
+
ref_key: "root",
|
|
217
|
+
ref: root
|
|
218
|
+
}, forwardedAttrs.value, {
|
|
219
|
+
class: rootClass.value,
|
|
220
|
+
style: rootStyle.value,
|
|
221
|
+
role: __props.role,
|
|
222
|
+
"aria-label": __props.label,
|
|
223
|
+
"data-panels": panels.value,
|
|
224
|
+
"data-edge-start": !unref(slots).hasStart || void 0,
|
|
225
|
+
"data-edge-end": !unref(slots).hasEnd || void 0,
|
|
226
|
+
"data-edge-header": !unref(slots).hasHeader || void 0,
|
|
227
|
+
"data-edge-footer": !unref(slots).hasFooter || void 0,
|
|
228
|
+
"data-scrollable": __props.isScrollable || void 0,
|
|
229
|
+
"data-explicit-padding": __props.padding != null || void 0,
|
|
230
|
+
"data-bleed": __props.padding === 0 || void 0
|
|
231
|
+
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1$2);
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/Layout/LayoutHeader.vue
|
|
237
|
+
const _hoisted_1$1 = [
|
|
238
|
+
"role",
|
|
239
|
+
"aria-label",
|
|
240
|
+
"data-divider"
|
|
241
|
+
];
|
|
242
|
+
const _hoisted_2 = ["data-bleed"];
|
|
243
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
244
|
+
name: "AstryxLayoutHeader",
|
|
245
|
+
inheritAttrs: false,
|
|
246
|
+
__name: "LayoutHeader",
|
|
247
|
+
props: {
|
|
248
|
+
hasDivider: {
|
|
249
|
+
type: Boolean,
|
|
250
|
+
default: void 0
|
|
251
|
+
},
|
|
252
|
+
height: {},
|
|
253
|
+
padding: {},
|
|
254
|
+
paddingBlockEnd: {},
|
|
255
|
+
label: {},
|
|
256
|
+
role: {}
|
|
257
|
+
},
|
|
258
|
+
setup(__props, { expose: __expose }) {
|
|
259
|
+
const props = __props;
|
|
260
|
+
const attrs = useAttrs();
|
|
261
|
+
const root = useTemplateRef("root");
|
|
262
|
+
const dividers = useLayoutDividers();
|
|
263
|
+
__expose({ element: root });
|
|
264
|
+
const hasDivider = computed(() => props.hasDivider ?? dividers.value ?? false);
|
|
265
|
+
const forwardedAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "class" && key !== "style")));
|
|
266
|
+
const rootClass = computed(() => ["astryx-layout-header", attrs.class]);
|
|
267
|
+
const rootStyle = computed(() => [{ height: formatSize(props.height) }, attrs.style]);
|
|
268
|
+
const innerStyle = computed(() => regionPaddingStyle("--_layout-header", props.padding, props.paddingBlockEnd));
|
|
269
|
+
return (_ctx, _cache) => {
|
|
270
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
271
|
+
ref_key: "root",
|
|
272
|
+
ref: root
|
|
273
|
+
}, forwardedAttrs.value, {
|
|
274
|
+
class: rootClass.value,
|
|
275
|
+
style: rootStyle.value,
|
|
276
|
+
role: __props.role,
|
|
277
|
+
"aria-label": __props.label,
|
|
278
|
+
"data-divider": hasDivider.value || void 0
|
|
279
|
+
}), [createElementVNode("div", {
|
|
280
|
+
class: "astryx-layout-header__inner",
|
|
281
|
+
"data-bleed": __props.padding === 0 || void 0,
|
|
282
|
+
style: normalizeStyle(innerStyle.value)
|
|
283
|
+
}, [renderSlot(_ctx.$slots, "default")], 12, _hoisted_2)], 16, _hoisted_1$1);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
//#endregion
|
|
288
|
+
//#region src/Layout/LayoutPanel.vue
|
|
289
|
+
const _hoisted_1 = [
|
|
290
|
+
"role",
|
|
291
|
+
"aria-label",
|
|
292
|
+
"data-area",
|
|
293
|
+
"data-divider",
|
|
294
|
+
"data-collapse",
|
|
295
|
+
"data-edge-header",
|
|
296
|
+
"data-edge-footer",
|
|
297
|
+
"data-scrollable",
|
|
298
|
+
"data-explicit-padding",
|
|
299
|
+
"data-bleed"
|
|
300
|
+
];
|
|
301
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
302
|
+
name: "AstryxLayoutPanel",
|
|
303
|
+
inheritAttrs: false,
|
|
304
|
+
__name: "LayoutPanel",
|
|
305
|
+
props: {
|
|
306
|
+
hasDivider: {
|
|
307
|
+
type: Boolean,
|
|
308
|
+
default: false
|
|
309
|
+
},
|
|
310
|
+
padding: {},
|
|
311
|
+
isScrollable: {
|
|
312
|
+
type: Boolean,
|
|
313
|
+
default: true
|
|
314
|
+
},
|
|
315
|
+
label: {},
|
|
316
|
+
role: {},
|
|
317
|
+
width: {},
|
|
318
|
+
resizable: {}
|
|
319
|
+
},
|
|
320
|
+
setup(__props, { expose: __expose }) {
|
|
321
|
+
const props = __props;
|
|
322
|
+
const attrs = useAttrs();
|
|
323
|
+
const root = useTemplateRef("root");
|
|
324
|
+
const area = useLayoutArea();
|
|
325
|
+
const slots = useLayoutSlots();
|
|
326
|
+
__expose({ element: root });
|
|
327
|
+
const width = computed(() => formatSize(props.resizable ? props.resizable._size : props.width));
|
|
328
|
+
const collapse = computed(() => !props.hasDivider && props.padding == null);
|
|
329
|
+
const forwardedAttrs = computed(() => Object.fromEntries(Object.entries(attrs).filter(([key]) => key !== "class" && key !== "style")));
|
|
330
|
+
const rootClass = computed(() => ["astryx-layout-panel", attrs.class]);
|
|
331
|
+
const rootStyle = computed(() => [
|
|
332
|
+
{ width: width.value },
|
|
333
|
+
regionPaddingStyle("--_layout-panel", props.padding),
|
|
334
|
+
attrs.style
|
|
335
|
+
]);
|
|
336
|
+
return (_ctx, _cache) => {
|
|
337
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
338
|
+
ref_key: "root",
|
|
339
|
+
ref: root
|
|
340
|
+
}, forwardedAttrs.value, {
|
|
341
|
+
class: rootClass.value,
|
|
342
|
+
style: rootStyle.value,
|
|
343
|
+
role: __props.role,
|
|
344
|
+
"aria-label": __props.label,
|
|
345
|
+
"data-area": unref(area),
|
|
346
|
+
"data-divider": __props.hasDivider || void 0,
|
|
347
|
+
"data-collapse": collapse.value || void 0,
|
|
348
|
+
"data-edge-header": !unref(slots).hasHeader || void 0,
|
|
349
|
+
"data-edge-footer": !unref(slots).hasFooter || void 0,
|
|
350
|
+
"data-scrollable": __props.isScrollable || void 0,
|
|
351
|
+
"data-explicit-padding": __props.padding != null || void 0,
|
|
352
|
+
"data-bleed": __props.padding === 0 || void 0
|
|
353
|
+
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
//#endregion
|
|
358
|
+
export { _sfc_main$3 as a, regionPaddingStyle as i, _sfc_main$1 as n, useLayoutDividers as o, _sfc_main$2 as r, _sfc_main as t };
|
package/dist/List/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as ItemLayout, c as ItemTarget, d as ListEdgeCompensation, f as ListItemProps, g as ListSlots, h as ListProps, i as ItemLabel, l as ItemText, m as ListMarkerStyle, n as ItemDensity, o as ItemProps, p as ListItemSlots, r as ItemElement, s as ItemSlots, t as ItemAlign, u as ListDensity } from "../types-CAZY4Xua.js";
|
|
2
|
-
import { a as useListContext, i as useItemDescriptionId, n as _default$1, r as _default, t as _default$2 } from "../index-
|
|
2
|
+
import { a as useListContext, i as useItemDescriptionId, n as _default$1, r as _default, t as _default$2 } from "../index-D-ZuubCK.js";
|
|
3
3
|
export { _default as Item, type ItemAlign, type ItemDensity, type ItemElement, type ItemLabel, type ItemLayout, type ItemProps, type ItemSlots, type ItemTarget, type ItemText, _default$1 as List, type ListDensity, type ListEdgeCompensation, _default$2 as ListItem, type ListItemProps, type ListItemSlots, type ListMarkerStyle, type ListProps, type ListSlots, useItemDescriptionId, useListContext };
|
package/dist/Markdown/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as MarkdownSlots, a as MarkdownAlign, c as MarkdownDensity, d as MarkdownHeadingProps, f as MarkdownImageProps, g as MarkdownProps, h as MarkdownListProps, i as _default, l as MarkdownDisplay, m as MarkdownLinkProps, n as uniqueSlug, o as MarkdownCodeProps, p as MarkdownInlineCodeProps, r as parseMarkdown, s as MarkdownComponents, t as slugify, u as MarkdownHeadingLevel } from "../index-
|
|
1
|
+
import { _ as MarkdownSlots, a as MarkdownAlign, c as MarkdownDensity, d as MarkdownHeadingProps, f as MarkdownImageProps, g as MarkdownProps, h as MarkdownListProps, i as _default, l as MarkdownDisplay, m as MarkdownLinkProps, n as uniqueSlug, o as MarkdownCodeProps, p as MarkdownInlineCodeProps, r as parseMarkdown, s as MarkdownComponents, t as slugify, u as MarkdownHeadingLevel } from "../index-DfgHJE7H.js";
|
|
2
2
|
export { _default as Markdown, type MarkdownAlign, type MarkdownCodeProps, type MarkdownComponents, type MarkdownDensity, type MarkdownDisplay, type MarkdownHeadingLevel, type MarkdownHeadingProps, type MarkdownImageProps, type MarkdownInlineCodeProps, type MarkdownLinkProps, type MarkdownListProps, type MarkdownProps, type MarkdownSlots, parseMarkdown, slugify, uniqueSlug };
|
package/dist/Markdown/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as parseMarkdown, n as slugify, r as uniqueSlug, t as _sfc_main } from "../Markdown-
|
|
1
|
+
import { i as parseMarkdown, n as slugify, r as uniqueSlug, t as _sfc_main } from "../Markdown-CwtLr3f_.js";
|
|
2
2
|
export { _sfc_main as Markdown, parseMarkdown, slugify, uniqueSlug };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as _sfc_main$1 } from "./VisuallyHidden-C7NN3VEP.js";
|
|
2
2
|
import { t as _sfc_main$2 } from "./Heading-Dugosn6j.js";
|
|
3
|
+
import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
|
|
3
4
|
import { t as _sfc_main$3 } from "./Blockquote-DFqBv_oJ.js";
|
|
4
|
-
import { a as useAstryxMessages } from "./locale-56lkR7OK.js";
|
|
5
5
|
import { t as _sfc_main$4 } from "./CheckboxIndicator-DdJmksHt.js";
|
|
6
|
-
import { c as _sfc_main$5, t as _sfc_main$6 } from "./CodeBlock-
|
|
6
|
+
import { c as _sfc_main$5, t as _sfc_main$6 } from "./CodeBlock-BQdooQy2.js";
|
|
7
7
|
import { t as _sfc_main$7 } from "./Link-CprjOuTI.js";
|
|
8
8
|
import { Fragment, computed, defineComponent, h, ref } from "vue";
|
|
9
9
|
import { fromMarkdown } from "mdast-util-from-markdown";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as MetadataListItemSlots, c as MetadataListOrientation, i as MetadataListItemProps, l as MetadataListProps, n as _default, o as MetadataListLabelConfig, r as MetadataListColumns, s as MetadataListLabelPosition, t as _default$1, u as MetadataListSlots } from "../index-utZGF4GR.js";
|
|
2
|
+
export { _default as MetadataList, type MetadataListColumns, _default$1 as MetadataListItem, type MetadataListItemProps, type MetadataListItemSlots, type MetadataListLabelConfig, type MetadataListLabelPosition, type MetadataListOrientation, type MetadataListProps, type MetadataListSlots };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
|
|
2
|
+
import { Comment, Fragment, computed, defineComponent, h, inject, provide, ref, useId, useSlots } from "vue";
|
|
3
|
+
import "../styles/metadata-list.css";
|
|
4
|
+
//#region src/MetadataList/context.ts
|
|
5
|
+
const metadataListKey = Symbol("astryx-metadata-list");
|
|
6
|
+
function useMetadataListContext() {
|
|
7
|
+
return inject(metadataListKey, null);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/MetadataList/MetadataList.vue
|
|
11
|
+
function itemNodes(nodes) {
|
|
12
|
+
const result = [];
|
|
13
|
+
for (const node of nodes) {
|
|
14
|
+
if (node.type === Comment) continue;
|
|
15
|
+
if (node.type === Fragment && Array.isArray(node.children)) result.push(...itemNodes(node.children));
|
|
16
|
+
else result.push(node);
|
|
17
|
+
}
|
|
18
|
+
return result;
|
|
19
|
+
}
|
|
20
|
+
const _sfc_main$1 = defineComponent({
|
|
21
|
+
name: "AstryxMetadataList",
|
|
22
|
+
inheritAttrs: false,
|
|
23
|
+
props: {
|
|
24
|
+
columns: {
|
|
25
|
+
type: [String, Number],
|
|
26
|
+
default: "single"
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
maxNumOfItems: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
36
|
+
orientation: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "vertical"
|
|
39
|
+
},
|
|
40
|
+
title: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: void 0
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
setup(props, { slots, attrs }) {
|
|
46
|
+
const messages = useAstryxMessages();
|
|
47
|
+
const expanded = ref(false);
|
|
48
|
+
const contentId = `astryx-metadata-list-${useId()}`;
|
|
49
|
+
const isMultiColumn = computed(() => props.columns === "multi" || typeof props.columns === "number" && props.columns > 1);
|
|
50
|
+
const labelPosition = computed(() => {
|
|
51
|
+
if (props.orientation === "horizontal") return "top";
|
|
52
|
+
return props.label?.position ?? (isMultiColumn.value ? "top" : "start");
|
|
53
|
+
});
|
|
54
|
+
provide(metadataListKey, {
|
|
55
|
+
get labelPosition() {
|
|
56
|
+
return labelPosition.value;
|
|
57
|
+
},
|
|
58
|
+
get orientation() {
|
|
59
|
+
return props.orientation ?? "vertical";
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return () => {
|
|
63
|
+
const orientation = props.orientation ?? "vertical";
|
|
64
|
+
const stacked = labelPosition.value === "top";
|
|
65
|
+
const horizontal = orientation === "horizontal";
|
|
66
|
+
const layout = horizontal ? "horizontal" : stacked ? props.columns === "single" || props.columns === 1 ? "stacked-single" : "stacked-multi" : props.columns === "single" || props.columns === 1 ? "single" : "multi";
|
|
67
|
+
let gridTemplateColumns;
|
|
68
|
+
if (!horizontal && typeof props.columns === "number" && props.columns > 1) gridTemplateColumns = stacked ? `repeat(${props.columns}, 1fr)` : `repeat(${props.columns}, auto minmax(0, 1fr))`;
|
|
69
|
+
else if (!horizontal && !stacked && props.label?.width != null) gridTemplateColumns = `${typeof props.label.width === "number" ? `${props.label.width}px` : props.label.width} minmax(0, 1fr)`;
|
|
70
|
+
const nodes = itemNodes(slots.default?.() ?? []);
|
|
71
|
+
const limit = horizontal ? void 0 : props.maxNumOfItems;
|
|
72
|
+
const visible = limit != null && nodes.length > limit && !expanded.value ? nodes.slice(0, limit) : nodes;
|
|
73
|
+
const title = slots.title || props.title ? h("div", { class: "astryx-metadata-list__title" }, slots.title ? slots.title() : props.title) : null;
|
|
74
|
+
const list = h("dl", {
|
|
75
|
+
"id": contentId,
|
|
76
|
+
"class": "astryx-metadata-list__dl",
|
|
77
|
+
"data-layout": layout,
|
|
78
|
+
"style": gridTemplateColumns ? { gridTemplateColumns } : void 0
|
|
79
|
+
}, visible);
|
|
80
|
+
const toggle = limit != null && nodes.length > limit ? h("button", {
|
|
81
|
+
"type": "button",
|
|
82
|
+
"class": "astryx-metadata-list__toggle",
|
|
83
|
+
"aria-controls": contentId,
|
|
84
|
+
"aria-expanded": expanded.value ? "true" : "false",
|
|
85
|
+
"onClick": () => {
|
|
86
|
+
expanded.value = !expanded.value;
|
|
87
|
+
}
|
|
88
|
+
}, expanded.value ? messages.value.metadataList.showLess : messages.value.metadataList.showMore) : null;
|
|
89
|
+
return h("div", {
|
|
90
|
+
...attrs,
|
|
91
|
+
"class": ["astryx-metadata-list", attrs.class],
|
|
92
|
+
"data-columns": String(props.columns),
|
|
93
|
+
"data-orientation": orientation
|
|
94
|
+
}, [
|
|
95
|
+
title,
|
|
96
|
+
list,
|
|
97
|
+
toggle
|
|
98
|
+
]);
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/MetadataList/MetadataListItem.vue
|
|
104
|
+
const _sfc_main = defineComponent({
|
|
105
|
+
name: "AstryxMetadataListItem",
|
|
106
|
+
props: { label: {
|
|
107
|
+
type: String,
|
|
108
|
+
required: true
|
|
109
|
+
} },
|
|
110
|
+
setup(props) {
|
|
111
|
+
const context = useMetadataListContext();
|
|
112
|
+
const slots = useSlots();
|
|
113
|
+
const stacked = computed(() => {
|
|
114
|
+
return (context?.labelPosition ?? "start") === "top" || context?.orientation === "horizontal";
|
|
115
|
+
});
|
|
116
|
+
return () => {
|
|
117
|
+
const icon = slots.icon ? h("span", { class: "astryx-metadata-list__icon" }, slots.icon()) : null;
|
|
118
|
+
if (stacked.value) return h("div", { class: "astryx-metadata-list__item" }, [h("dt", { class: "astryx-metadata-list__item-label" }, [icon, props.label]), h("dd", { class: "astryx-metadata-list__item-value" }, slots.default?.())]);
|
|
119
|
+
return [h("dt", { class: "astryx-metadata-list__label" }, [icon, props.label]), h("dd", { class: "astryx-metadata-list__value" }, slots.default?.())];
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
//#endregion
|
|
124
|
+
export { _sfc_main$1 as n, _sfc_main as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MobileNavSide, c as MobileNavToggleProps, i as MobileNavProps, l as mobileNavKey, n as _default, o as MobileNavSlots, r as MobileNavEmits, s as MobileNavToggleEmits, t as _default$1 } from "../index-
|
|
1
|
+
import { a as MobileNavSide, c as MobileNavToggleProps, i as MobileNavProps, l as mobileNavKey, n as _default, o as MobileNavSlots, r as MobileNavEmits, s as MobileNavToggleEmits, t as _default$1 } from "../index-BeR-1LgF.js";
|
|
2
2
|
export { _default as MobileNav, type MobileNavEmits, type MobileNavProps, type MobileNavSide, type MobileNavSlots, _default$1 as MobileNavToggle, type MobileNavToggleEmits, type MobileNavToggleProps, mobileNavKey };
|
package/dist/MobileNav/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as _sfc_main, r as mobileNavKey, t as _sfc_main$1 } from "../MobileNavToggle-
|
|
1
|
+
import { n as _sfc_main, r as mobileNavKey, t as _sfc_main$1 } from "../MobileNavToggle-CgQamG6E.js";
|
|
2
2
|
export { _sfc_main as MobileNav, _sfc_main$1 as MobileNavToggle, mobileNavKey };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useFocusTrap, t as useRestoreFocus } from "./useRestoreFocus-BvMdXVX9.js";
|
|
2
|
-
import { a as useAstryxMessages } from "./
|
|
2
|
+
import { a as useAstryxMessages } from "./context-D6ECRdc5.js";
|
|
3
3
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, mergeModels, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, provide, ref, renderSlot, toDisplayString, unref, useId, useModel, watch } from "vue";
|
|
4
4
|
import "../styles/mobile-nav.css";
|
|
5
5
|
//#region src/MobileNav/context.ts
|
|
@@ -7,10 +7,15 @@ import "../styles/mobile-nav.css";
|
|
|
7
7
|
const mobileNavKey = Symbol("astryx-mobile-nav");
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/MobileNav/MobileNav.vue
|
|
10
|
-
const _hoisted_1$1 = [
|
|
10
|
+
const _hoisted_1$1 = [
|
|
11
|
+
"id",
|
|
12
|
+
"aria-labelledby",
|
|
13
|
+
"aria-label"
|
|
14
|
+
];
|
|
11
15
|
const _hoisted_2 = { class: "astryx-mobile-nav__drawer" };
|
|
12
|
-
const _hoisted_3 = ["
|
|
13
|
-
const _hoisted_4 =
|
|
16
|
+
const _hoisted_3 = ["id"];
|
|
17
|
+
const _hoisted_4 = ["aria-label"];
|
|
18
|
+
const _hoisted_5 = { class: "astryx-mobile-nav__body" };
|
|
14
19
|
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
15
20
|
name: "AstryxMobileNav",
|
|
16
21
|
__name: "MobileNav",
|
|
@@ -18,7 +23,8 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
18
23
|
header: {},
|
|
19
24
|
width: { default: 320 },
|
|
20
25
|
side: { default: "auto" },
|
|
21
|
-
label: {}
|
|
26
|
+
label: {},
|
|
27
|
+
id: {}
|
|
22
28
|
}, {
|
|
23
29
|
"isOpen": {
|
|
24
30
|
type: Boolean,
|
|
@@ -34,8 +40,9 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
34
40
|
const isOpen = useModel(__props, "isOpen");
|
|
35
41
|
const dialogRef = ref(null);
|
|
36
42
|
const resolvedSide = ref(props.side === "end" ? "end" : "start");
|
|
37
|
-
const
|
|
38
|
-
const
|
|
43
|
+
const generatedId = `astryx-mobile-nav-${useId()}`;
|
|
44
|
+
const dialogId = computed(() => props.id || generatedId);
|
|
45
|
+
const labelId = computed(() => `${dialogId.value}-label`);
|
|
39
46
|
let previousOverflow = "";
|
|
40
47
|
const accessibleName = computed(() => props.label || props.header || messages.value.nav.mobileNav);
|
|
41
48
|
const trapEnabled = computed(() => isOpen.value);
|
|
@@ -101,21 +108,21 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
101
108
|
});
|
|
102
109
|
return (_ctx, _cache) => {
|
|
103
110
|
return openBlock(), createElementBlock(Fragment, null, [createCommentVNode(" eslint-disable-next-line vue-a11y/click-events-have-key-events, vue-a11y/no-static-element-interactions -- 点在 dialog 自身上等于点遮罩;键盘用户走原生 cancel。 "), createElementVNode("dialog", {
|
|
104
|
-
id: dialogId,
|
|
111
|
+
id: dialogId.value,
|
|
105
112
|
ref_key: "dialogRef",
|
|
106
113
|
ref: dialogRef,
|
|
107
114
|
class: normalizeClass(["astryx-mobile-nav", sideIsStart.value ? "astryx-mobile-nav--start" : "astryx-mobile-nav--end"]),
|
|
108
115
|
style: normalizeStyle({ "--astryx-mobile-nav-width": `${__props.width}px` }),
|
|
109
116
|
"aria-modal": "true",
|
|
110
|
-
"aria-labelledby": _ctx.$slots.header || __props.header ? labelId : void 0,
|
|
117
|
+
"aria-labelledby": _ctx.$slots.header || __props.header ? labelId.value : void 0,
|
|
111
118
|
"aria-label": _ctx.$slots.header || __props.header ? void 0 : accessibleName.value,
|
|
112
119
|
onCancel,
|
|
113
120
|
onClick: onDialogClick
|
|
114
121
|
}, [createElementVNode("div", _hoisted_2, [createElementVNode("div", { class: normalizeClass(["astryx-mobile-nav__header", { "astryx-mobile-nav__header--end": !_ctx.$slots.header && !__props.header }]) }, [_ctx.$slots.header || __props.header ? (openBlock(), createElementBlock("div", {
|
|
115
122
|
key: 0,
|
|
116
|
-
id: labelId,
|
|
123
|
+
id: labelId.value,
|
|
117
124
|
class: "astryx-mobile-nav__title"
|
|
118
|
-
}, [renderSlot(_ctx.$slots, "header", {}, () => [createTextVNode(toDisplayString(__props.header), 1)])])) : createCommentVNode("v-if", true), createElementVNode("button", {
|
|
125
|
+
}, [renderSlot(_ctx.$slots, "header", {}, () => [createTextVNode(toDisplayString(__props.header), 1)])], 8, _hoisted_3)) : createCommentVNode("v-if", true), createElementVNode("button", {
|
|
119
126
|
type: "button",
|
|
120
127
|
class: "astryx-mobile-nav__close",
|
|
121
128
|
"aria-label": unref(messages).nav.close,
|
|
@@ -123,7 +130,7 @@ const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
|
123
130
|
}, [..._cache[1] || (_cache[1] = [createElementVNode("span", {
|
|
124
131
|
class: "astryx-mobile-nav__close-glyph",
|
|
125
132
|
"aria-hidden": "true"
|
|
126
|
-
}, null, -1)])], 8,
|
|
133
|
+
}, null, -1)])], 8, _hoisted_4)], 2), createElementVNode("div", _hoisted_5, [renderSlot(_ctx.$slots, "default")])])], 46, _hoisted_1$1)], 2112);
|
|
127
134
|
};
|
|
128
135
|
}
|
|
129
136
|
});
|
package/dist/MoreMenu/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as MoreMenuIcon, Dn as _default, Fn as MoreMenuPresentation, In as MoreMenuProps, Ln as MoreMenuResolvedPresentation, Mn as MoreMenuItem, Nn as MoreMenuItemVariant, On as MoreMenuDivider, Pn as MoreMenuOption, Rn as MoreMenuSection, jn as MoreMenuInitialFocus, kn as MoreMenuEmits, zn as MoreMenuSlots } from "../index-Df2YvC8o.js";
|
|
2
2
|
export { _default as MoreMenu, type MoreMenuDivider, type MoreMenuEmits, type MoreMenuIcon, type MoreMenuInitialFocus, type MoreMenuItem, type MoreMenuItemVariant, type MoreMenuOption, type MoreMenuPresentation, type MoreMenuProps, type MoreMenuResolvedPresentation, type MoreMenuSection, type MoreMenuSlots };
|
package/dist/MoreMenu/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../MoreMenu-
|
|
1
|
+
import { t as _sfc_main } from "../MoreMenu-BXL6Dqsu.js";
|
|
2
2
|
export { _sfc_main as MoreMenu };
|
|
@@ -2,10 +2,10 @@ import { n as getFocusables, t as focusElement } from "./focus-CpficIgf.js";
|
|
|
2
2
|
import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
3
3
|
import { t as _sfc_main$5 } from "./Heading-Dugosn6j.js";
|
|
4
4
|
import { t as _sfc_main$6 } from "./IconButton-BNQuz9W_.js";
|
|
5
|
-
import { t as _sfc_main$7 } from "./Icon-
|
|
5
|
+
import { t as _sfc_main$7 } from "./Icon-5MdZQ18k.js";
|
|
6
6
|
import { t as _sfc_main$8 } from "./Divider-BtwnL18I.js";
|
|
7
|
-
import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
|
|
8
7
|
import { n as _sfc_main$10, t as _sfc_main$9 } from "./ListItem-pGxvn6QJ.js";
|
|
8
|
+
import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
|
|
9
9
|
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, inject, mergeModels, mergeProps, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, provide, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, unref, useId, useModel, useTemplateRef, watch, withCtx } from "vue";
|
|
10
10
|
import "../styles/more-menu.css";
|
|
11
11
|
//#region src/MoreMenu/context.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as MultiSelectorDivider, c as MultiSelectorOptionData, d as MultiSelectorSection, f as MultiSelectorSize, g as MultiSelectorVariant, h as MultiSelectorTriggerDisplay, i as MultiSelectorCheckboxPosition, l as MultiSelectorPresentation, m as MultiSelectorStatus, n as flattenOptions, o as MultiSelectorEmits, p as MultiSelectorSlots, r as _default, s as MultiSelectorOption, t as SELECT_ALL_VALUE, u as MultiSelectorProps } from "../index-
|
|
1
|
+
import { a as MultiSelectorDivider, c as MultiSelectorOptionData, d as MultiSelectorSection, f as MultiSelectorSize, g as MultiSelectorVariant, h as MultiSelectorTriggerDisplay, i as MultiSelectorCheckboxPosition, l as MultiSelectorPresentation, m as MultiSelectorStatus, n as flattenOptions, o as MultiSelectorEmits, p as MultiSelectorSlots, r as _default, s as MultiSelectorOption, t as SELECT_ALL_VALUE, u as MultiSelectorProps } from "../index-DGNqi2za.js";
|
|
2
2
|
export { _default as MultiSelector, type MultiSelectorCheckboxPosition, type MultiSelectorDivider, type MultiSelectorEmits, type MultiSelectorOption, type MultiSelectorOptionData, type MultiSelectorPresentation, type MultiSelectorProps, type MultiSelectorSection, type MultiSelectorSize, type MultiSelectorSlots, type MultiSelectorStatus, type MultiSelectorTriggerDisplay, type MultiSelectorVariant, SELECT_ALL_VALUE, flattenOptions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SELECT_ALL_VALUE, r as flattenOptions, t as _sfc_main } from "../MultiSelector-
|
|
1
|
+
import { n as SELECT_ALL_VALUE, r as flattenOptions, t as _sfc_main } from "../MultiSelector-DT8ZccMI.js";
|
|
2
2
|
export { _sfc_main as MultiSelector, SELECT_ALL_VALUE, flattenOptions };
|