@astryx-vue/core 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-EiGyPFbA.js → AppShell-Cb41gIAj.js} +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar-jmHInHwj.js +244 -0
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-CZcgAMjM.js → AvatarGroup-QyzSrpYA.js} +8 -7
- package/dist/Badge/index.d.ts +2 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge-CjDQPF5g.js +30 -0
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-C3YZFQ9w.js → Breadcrumbs-CTQ7fjDn.js} +45 -11
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +2 -2
- package/dist/Calendar/index.js +1 -1
- package/dist/Calendar-BFaI5AMv.js +352 -0
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BTtHkKea.js → Carousel-X0cuQkvg.js} +2 -2
- package/dist/Chat/index.d.ts +2 -2
- package/dist/Chat/index.js +2 -2
- package/dist/Chat-M0tiGrNT.js +3148 -0
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-DijdbUUu.js → Citation-C1veUk5p.js} +2 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-CxTb6j9_.js → CodeBlock-DesTJAkm.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-9MC08X39.js → Collapsible-BestK35V.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BD2iODF5.js → CommandPalette-BArt97V8.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-D9iXd5cH.js → ComplexSelector-CAoig1RK.js} +2 -2
- package/dist/ContextMenu/index.d.ts +2 -2
- package/dist/ContextMenu/index.js +1 -1
- package/dist/{ContextMenu-HS_WqYIg.js → ContextMenu-9Im6i43E.js} +101 -63
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/DateInput-BLocxqC3.js +376 -0
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-1bhPGG2s.js → DateRangeInput-DwDy3eRo.js} +2 -2
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-SnPdgk6P.js → DateTimeInput-BYiaC9bn.js} +5 -3
- package/dist/DropdownMenu/index.d.ts +3 -2
- package/dist/DropdownMenu/index.js +3 -2
- package/dist/DropdownMenu-Ddfr-aEC.js +164 -0
- package/dist/{DropdownMenu-UJGych6v.js → DropdownMenu-Dh-WAHKb.js} +63 -16
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BQiwE-GB.js → FileInput-DLO6V12n.js} +2 -2
- package/dist/Icon/index.d.ts +4 -3
- package/dist/Icon/index.js +3 -2
- package/dist/Icon/plugin.d.ts +45 -0
- package/dist/Icon/plugin.js +177 -0
- package/dist/Icon-CJKjdJy-.js +198 -0
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CshKoB0r.js → Lightbox-CdFCS_EA.js} +2 -2
- package/dist/Link/index.d.ts +1 -1
- package/dist/Link/index.js +1 -1
- package/dist/Link-DqdQZ37C.js +141 -0
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-D-Ua055V.js → Markdown-BqKloI3w.js} +3 -3
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-sYph_d8Q.js → MetadataList-CvZkmisf.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DD9D01aj.js → MobileNavToggle-Bwi0qXXM.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BVrK5kkk.js → MoreMenu-BwJaJrkB.js} +2 -2
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-DiYov9sF.js → MultiSelector-C-ETfFy_.js} +2 -2
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-DjetVB8O.js +210 -0
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-DQfEBxlc.js → Outline-Bz9c-u5y.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-BU5VCntl.js → OverflowList-ED-KN9Y5.js} +1 -1
- package/dist/Overlay/index.d.ts +1 -1
- package/dist/Pagination/index.d.ts +2 -2
- package/dist/Pagination/index.js +1 -1
- package/dist/{Pagination-HdhtykeF.js → Pagination-Cb66HMEf.js} +76 -22
- package/dist/PowerSearch/index.d.ts +2 -0
- package/dist/PowerSearch/index.js +2 -0
- package/dist/PowerSearch-CjU8y4mi.js +2386 -0
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-ChDp-7oe.js → ProgressBar-DO9Chic6.js} +31 -11
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/Resizable/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{Resizable-BhSMfO5B.js → Resizable-D-TBCg0Y.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +2 -2
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-DE2IEFML.js +468 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-B-Om6Bz3.js → SideNav-DonEfiAx.js} +17 -17
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-BZ_8SEZt.js → Stepper-D2ZIcUNx.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-Cnc2Hs1H.js → TabList-D3F-stq-.js} +10 -3
- package/dist/Table/index.d.ts +3 -3
- package/dist/Table/index.js +2 -2
- package/dist/Table-CrP2Uffq.js +1982 -0
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +1 -1
- package/dist/{TextArea-Cv9UVbzS.js → TextArea-CPwSytdO.js} +12 -6
- package/dist/TextInput/index.d.ts +1 -1
- package/dist/Thumbnail/index.js +1 -1
- package/dist/{Thumbnail-Dc1UpykG.js → Thumbnail-BC5JGPGZ.js} +11 -11
- package/dist/{TimeField-C7t9Knq9.js → TimeField-DpHFrNv0.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BXxCOY98.js → TimeInput-DJLV0_4z.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +2 -1
- package/dist/{Timestamp-DlZSmgCJ.js → Timestamp-GKNjjt5g.js} +4 -121
- package/dist/Toast/index.d.ts +2 -2
- package/dist/Toast/index.js +1 -1
- package/dist/{Toast-BKXPvEMp.js → Toast-C2ML-bmi.js} +37 -7
- package/dist/ToggleButton/index.d.ts +1 -1
- package/dist/Token/index.js +1 -1
- package/dist/{Token-wt4e80IM.js → Token-Chu_eCVs.js} +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-nmTqdS9n.js → Tokenizer-DRDpvQ_l.js} +3 -3
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-notp-mJx.js → TopNav-CEyWddtA.js} +3 -3
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-s1xBQ0qq.js → TreeList-COS8US8e.js} +3 -3
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-VAuiCurV.js → Typeahead-P7cCqtaQ.js} +3 -3
- package/dist/{useTypeaheadMenu-Ba7XpcZl.js → TypeaheadMenu-CGvo0Tud.js} +107 -107
- package/dist/composables/index.d.ts +3 -3
- package/dist/{context-Dbo22sck.js → context-CiKncNSH.js} +184 -6
- package/dist/formatInstant-BDWUIxS7.js +119 -0
- package/dist/{index-SMh42NI8.d.ts → index-B1TG2GPS.d.ts} +2 -2
- package/dist/{index-DRmb-oUa.d.ts → index-B9WzWqzk.d.ts} +3 -29
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-z4p2k9VR.d.ts → index-Bgv4ZmBl.d.ts} +20 -2
- package/dist/{index-BoRIw-bP.d.ts → index-Bt7ewoz2.d.ts} +32 -2
- package/dist/{index-uQrLBZfF.d.ts → index-Bu3oXIIS.d.ts} +24 -0
- package/dist/index-CJlBAXwj.d.ts +100 -0
- package/dist/{index-DT9S92sh.d.ts → index-CNjbOgty.d.ts} +15 -0
- package/dist/{index-DXSs3rwa.d.ts → index-CngORuiq.d.ts} +137 -2
- package/dist/index-Cs5pcwY3.d.ts +416 -0
- package/dist/{index-NzLDrOkk.d.ts → index-D4I_obqR.d.ts} +14 -1
- package/dist/{index-BtPZKO20.d.ts → index-DGXviOlp.d.ts} +49 -7
- package/dist/{index-CTolyeii.d.ts → index-DN7MXPHM.d.ts} +15 -1
- package/dist/{index-C6iJwTL0.d.ts → index-DNRBbwp_.d.ts} +165 -55
- package/dist/{index-C59PdX9L.d.ts → index-DWH_HzXi.d.ts} +1 -1
- package/dist/{index-BfOtLyNH.d.ts → index-D_nYxnNv.d.ts} +1 -1
- package/dist/{index-Bn_odHQ9.d.ts → index-Dg3ZmwEg.d.ts} +12 -1
- package/dist/{index-BiMGXtD-.d.ts → index-DimuSES0.d.ts} +14 -1
- package/dist/{index-DEeJowZf.d.ts → index-cGagYM1g.d.ts} +15 -2
- package/dist/{index-Ck8qy6Rf.d.ts → index-c_TaW8mM.d.ts} +24 -2
- package/dist/index-kVhSuA9t.d.ts +902 -0
- package/dist/{index-1uRMrk63.d.ts → index-nCEmW6wa.d.ts} +1 -1
- package/dist/{index-DoFCm2Q2.d.ts → index-qiZtHnGK.d.ts} +26 -0
- package/dist/{index-Bainr_3n.d.ts → index-u5ozu0G7.d.ts} +2 -2
- package/dist/index.d.ts +79 -76
- package/dist/index.js +111 -100
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/power-search-DrDfcoL1.d.ts +68 -0
- package/dist/registry-B1ObuP--.d.ts +45 -0
- package/dist/registry-C7OZb0PJ.js +135 -0
- package/dist/{types-JktRxujg.d.ts → types-Cp4liug-.d.ts} +66 -3
- package/dist/{index-B8MbfMwV.d.ts → types-DDAAT1Xd.d.ts} +36 -82
- package/dist/types-DIYwbkpe.d.ts +33 -0
- package/dist/{types-DZoEm_DG.d.ts → types-pnljWjEE.d.ts} +23 -6
- package/dist/{useResizable-CeESZS1v.d.ts → useResizable-CUoNPmUw.d.ts} +1 -1
- package/package.json +10 -1
- package/styles/avatar.css +14 -0
- package/styles/badge.css +8 -0
- package/styles/breadcrumbs.css +6 -1
- package/styles/button.css +13 -0
- package/styles/calendar.css +16 -0
- package/styles/card.css +2 -0
- package/styles/chat.css +474 -3
- package/styles/dropdown-menu.css +11 -0
- package/styles/icon.css +58 -8
- package/styles/link.css +5 -0
- package/styles/number-input.css +22 -0
- package/styles/pagination.css +45 -1
- package/styles/power-search.css +303 -0
- package/styles/progress-bar.css +4 -0
- package/styles/selector.css +58 -0
- package/styles/tab-list.css +15 -0
- package/styles/table.css +304 -1
- package/styles/text-area.css +17 -0
- package/styles/text-input.css +5 -0
- package/styles/toast.css +7 -0
- package/styles/toolbar.css +11 -0
- package/styles.css +1 -0
- package/dist/Avatar-5s3HSrtN.js +0 -136
- package/dist/Badge-Ba0EwsTj.js +0 -19
- package/dist/Calendar-BG7wEsro.js +0 -277
- package/dist/Chat-DjNxw5gv.js +0 -1051
- package/dist/DateInput-DE2TN1Rq.js +0 -250
- package/dist/Icon-Dfr4k6-S.js +0 -86
- package/dist/Link-CprjOuTI.js +0 -92
- package/dist/NumberInput-CTYiQxHq.js +0 -147
- package/dist/Selector-Da-2BO3q.js +0 -325
- package/dist/Table-D-LhAy_J.js +0 -967
- package/dist/index-DJo-BmXZ.d.ts +0 -431
- package/dist/index-DtjAdYEc.d.ts +0 -68
- package/dist/{CheckboxList-EsIEXjK_.js → CheckboxList-BbCPiend.js} +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ProgressBarVariant, n as ProgressBarProps, r as ProgressBarSize, t as _default } from "../index-
|
|
1
|
+
import { i as ProgressBarVariant, n as ProgressBarProps, r as ProgressBarSize, t as _default } from "../index-cGagYM1g.js";
|
|
2
2
|
export { _default as ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../ProgressBar-
|
|
1
|
+
import { t as _sfc_main } from "../ProgressBar-DO9Chic6.js";
|
|
2
2
|
export { _sfc_main as ProgressBar };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, normalizeClass, normalizeStyle, openBlock, toDisplayString, unref, useAttrs, useId } from "vue";
|
|
2
|
+
import "../styles/visually-hidden.css";
|
|
2
3
|
import "../styles/progress-bar.css";
|
|
3
4
|
//#region src/ProgressBar/ProgressBar.vue
|
|
4
5
|
const _hoisted_1 = [
|
|
@@ -6,14 +7,18 @@ const _hoisted_1 = [
|
|
|
6
7
|
"data-variant",
|
|
7
8
|
"data-indeterminate"
|
|
8
9
|
];
|
|
9
|
-
const _hoisted_2 = {
|
|
10
|
+
const _hoisted_2 = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "astryx-progress-bar-header"
|
|
13
|
+
};
|
|
10
14
|
const _hoisted_3 = ["id"];
|
|
11
15
|
const _hoisted_4 = {
|
|
12
16
|
key: 1,
|
|
13
17
|
class: "astryx-progress-bar-value",
|
|
14
18
|
"aria-hidden": "true"
|
|
15
19
|
};
|
|
16
|
-
const _hoisted_5 = [
|
|
20
|
+
const _hoisted_5 = ["id"];
|
|
21
|
+
const _hoisted_6 = [
|
|
17
22
|
"aria-labelledby",
|
|
18
23
|
"aria-describedby",
|
|
19
24
|
"aria-valuemin",
|
|
@@ -21,22 +26,28 @@ const _hoisted_5 = [
|
|
|
21
26
|
"aria-valuenow",
|
|
22
27
|
"aria-valuetext"
|
|
23
28
|
];
|
|
24
|
-
const
|
|
29
|
+
const _hoisted_7 = ["id"];
|
|
25
30
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
26
31
|
name: "AstryxProgressBar",
|
|
27
32
|
inheritAttrs: false,
|
|
28
33
|
__name: "ProgressBar",
|
|
29
34
|
props: {
|
|
30
|
-
value: {},
|
|
35
|
+
value: { default: 0 },
|
|
31
36
|
min: { default: 0 },
|
|
32
37
|
max: { default: 100 },
|
|
33
38
|
size: { default: "md" },
|
|
34
39
|
variant: { default: "neutral" },
|
|
35
40
|
label: {},
|
|
41
|
+
isLabelHidden: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false
|
|
44
|
+
},
|
|
36
45
|
description: {},
|
|
37
46
|
isIndeterminate: { type: Boolean },
|
|
38
47
|
showValue: { type: Boolean },
|
|
48
|
+
hasValueLabel: { type: Boolean },
|
|
39
49
|
valueText: {},
|
|
50
|
+
formatValueLabel: {},
|
|
40
51
|
width: {}
|
|
41
52
|
},
|
|
42
53
|
setup(__props) {
|
|
@@ -56,7 +67,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
56
67
|
});
|
|
57
68
|
const fillWidth = computed(() => ({ width: `${percentage.value}%` }));
|
|
58
69
|
const widthStyle = computed(() => ({ width: typeof props.width === "number" ? `${props.width}px` : props.width }));
|
|
59
|
-
const
|
|
70
|
+
const showsValue = computed(() => Boolean(props.showValue || props.hasValueLabel));
|
|
71
|
+
const displayValue = computed(() => {
|
|
72
|
+
if (props.valueText != null) return props.valueText;
|
|
73
|
+
if (props.formatValueLabel) return props.formatValueLabel(clamped.value, max.value);
|
|
74
|
+
return `${Math.round(percentage.value)}%`;
|
|
75
|
+
});
|
|
60
76
|
const labelledBy = computed(() => [labelId.value, attrs["aria-labelledby"]].filter(Boolean).join(" ") || void 0);
|
|
61
77
|
const describedBy = computed(() => [descriptionId.value, attrs["aria-describedby"]].filter(Boolean).join(" ") || void 0);
|
|
62
78
|
return (_ctx, _cache) => {
|
|
@@ -67,11 +83,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
67
83
|
"data-variant": __props.variant,
|
|
68
84
|
"data-indeterminate": __props.isIndeterminate || void 0
|
|
69
85
|
}, [
|
|
70
|
-
|
|
86
|
+
__props.label && (!__props.isLabelHidden || showsValue.value) ? (openBlock(), createElementBlock("div", _hoisted_2, [__props.label ? (openBlock(), createElementBlock("span", {
|
|
71
87
|
key: 0,
|
|
72
88
|
id: labelId.value,
|
|
73
|
-
class: "astryx-progress-bar-label"
|
|
74
|
-
}, toDisplayString(__props.label),
|
|
89
|
+
class: normalizeClass(["astryx-progress-bar-label", { "astryx-visually-hidden": __props.isLabelHidden }])
|
|
90
|
+
}, toDisplayString(__props.label), 11, _hoisted_3)) : createCommentVNode("v-if", true), showsValue.value && !__props.isIndeterminate ? (openBlock(), createElementBlock("span", _hoisted_4, toDisplayString(displayValue.value), 1)) : createCommentVNode("v-if", true)])) : __props.label ? (openBlock(), createElementBlock("span", {
|
|
91
|
+
key: 1,
|
|
92
|
+
id: labelId.value,
|
|
93
|
+
class: "astryx-visually-hidden"
|
|
94
|
+
}, toDisplayString(__props.label), 9, _hoisted_5)) : createCommentVNode("v-if", true),
|
|
75
95
|
createElementVNode("div", {
|
|
76
96
|
class: "astryx-progress-bar-track",
|
|
77
97
|
role: "progressbar",
|
|
@@ -84,12 +104,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
84
104
|
}, [createElementVNode("div", {
|
|
85
105
|
class: "astryx-progress-bar-fill",
|
|
86
106
|
style: normalizeStyle(__props.isIndeterminate ? void 0 : fillWidth.value)
|
|
87
|
-
}, null, 4)], 8,
|
|
107
|
+
}, null, 4)], 8, _hoisted_6),
|
|
88
108
|
__props.description ? (openBlock(), createElementBlock("span", {
|
|
89
|
-
key:
|
|
109
|
+
key: 2,
|
|
90
110
|
id: descriptionId.value,
|
|
91
111
|
class: "astryx-progress-bar-description"
|
|
92
|
-
}, toDisplayString(__props.description), 9,
|
|
112
|
+
}, toDisplayString(__props.description), 9, _hoisted_7)) : createCommentVNode("v-if", true)
|
|
93
113
|
], 14, _hoisted_1);
|
|
94
114
|
};
|
|
95
115
|
}
|
package/dist/Radio/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Sn as RadioValue, _n as RadioProps, bn as RadioStatus, cn as _default$1, dn as RadioGroupEmits, fn as RadioGroupProps, gn as RadioOrientation, hn as RadioOption, ln as _default, pn as RadioGroupSlots, un as RadioChangeEvent, vn as RadioSize, xn as RadioStatusType, yn as RadioSlots } from "../index-
|
|
1
|
+
import { Sn as RadioValue, _n as RadioProps, bn as RadioStatus, cn as _default$1, dn as RadioGroupEmits, fn as RadioGroupProps, gn as RadioOrientation, hn as RadioOption, ln as _default, pn as RadioGroupSlots, un as RadioChangeEvent, vn as RadioSize, xn as RadioStatusType, yn as RadioSlots } from "../index-DNRBbwp_.js";
|
|
2
2
|
export { _default as Radio, type RadioChangeEvent, _default$1 as RadioGroup, type RadioGroupEmits, type RadioGroupProps, type RadioGroupSlots, type RadioOption, type RadioOrientation, type RadioProps, type RadioSize, type RadioSlots, type RadioStatus, type RadioStatusType, type RadioValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { an as _default$1, mn as RadioListProps, on as RadioListItemProps, sn as _default } from "../index-
|
|
1
|
+
import { an as _default$1, mn as RadioListProps, on as RadioListItemProps, sn as _default } from "../index-DNRBbwp_.js";
|
|
2
2
|
export { _default as RadioList, _default$1 as RadioListItem, type RadioListItemProps, type RadioListProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ResizePillPlacement, i as ResizeHandleSlots, n as ResizeDirection, o as ResizePosition, r as ResizeHandleProps, t as _default } from "../index-
|
|
1
|
+
import { a as ResizePillPlacement, i as ResizeHandleSlots, n as ResizeDirection, o as ResizePosition, r as ResizeHandleProps, t as _default } from "../index-nCEmW6wa.js";
|
|
2
2
|
export { type ResizeDirection, _default as ResizeHandle, type ResizeHandleProps, type ResizeHandleSlots, type ResizePillPlacement, type ResizePosition };
|
package/dist/Resizable/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Resizable-
|
|
1
|
+
import { t as _sfc_main } from "../Resizable-D-TBCg0Y.js";
|
|
2
2
|
export { _sfc_main as ResizeHandle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as useAstryxMessages } from "./context-
|
|
1
|
+
import { a as useAstryxMessages } from "./context-CiKncNSH.js";
|
|
2
2
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeStyle, onBeforeUnmount, openBlock, ref, renderSlot, useAttrs, useTemplateRef } from "vue";
|
|
3
3
|
import "../styles/resize-handle.css";
|
|
4
4
|
//#region src/Resizable/ResizeHandle.vue
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { in as ScrollableAreaSlots, nn as _default, rn as ScrollableAreaProps } from "../index-
|
|
1
|
+
import { in as ScrollableAreaSlots, nn as _default, rn as ScrollableAreaProps } from "../index-DNRBbwp_.js";
|
|
2
2
|
export { _default as ScrollableArea, type ScrollableAreaProps, type ScrollableAreaSlots };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as SelectableCardEmits, Qt as _default, en as SelectableCardProps, tn as SelectableCardSlots } from "../index-
|
|
1
|
+
import { $t as SelectableCardEmits, Qt as _default, en as SelectableCardProps, tn as SelectableCardSlots } from "../index-DNRBbwp_.js";
|
|
2
2
|
export { _default as SelectableCard, _default as default, type SelectableCardEmits, type SelectableCardProps, type SelectableCardSlots };
|
package/dist/Selector/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { _default as Selector, type SelectorEmits, type SelectorOption, type SelectorProps, type SelectorSize, type SelectorSlots, type SelectorStatus };
|
|
1
|
+
import { a as SelectorOptionInput, c as SelectorSection, d as SelectorStatus, f as SelectorStatusInput, i as SelectorOption, l as SelectorSize, m as SelectorVariant, n as SelectorEmits, o as SelectorPresentation, p as SelectorStatusVariant, r as SelectorEntry, s as SelectorProps, t as _default, u as SelectorSlots } from "../index-DGXviOlp.js";
|
|
2
|
+
export { _default as Selector, type SelectorEmits, type SelectorEntry, type SelectorOption, type SelectorOptionInput, type SelectorPresentation, type SelectorProps, type SelectorSection, type SelectorSize, type SelectorSlots, type SelectorStatus, type SelectorStatusInput, type SelectorStatusVariant, type SelectorVariant };
|
package/dist/Selector/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Selector-
|
|
1
|
+
import { t as _sfc_main } from "../Selector-DE2IEFML.js";
|
|
2
2
|
export { _sfc_main as Selector };
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
import { t as useCombobox } from "./useCombobox-CTo5C-gc.js";
|
|
2
|
+
import { t as useDismiss } from "./useDismiss-CAiHU6QD.js";
|
|
3
|
+
import { a as useAstryxMessages } from "./context-CiKncNSH.js";
|
|
4
|
+
import { t as usePositionedLayer } from "./usePositionedLayer-C1NBOsVT.js";
|
|
5
|
+
import { t as _sfc_main$1 } from "./BottomSheet-Dg95HB1s.js";
|
|
6
|
+
import { t as _sfc_main$2 } from "./Field-8zRxzDHE.js";
|
|
7
|
+
import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useId, useSlots, useTemplateRef, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
8
|
+
import "../styles/visually-hidden-utility.css";
|
|
9
|
+
import "../styles/selector.css";
|
|
10
|
+
//#region src/Selector/Selector.vue
|
|
11
|
+
const _hoisted_1 = [
|
|
12
|
+
"disabled",
|
|
13
|
+
"aria-expanded",
|
|
14
|
+
"aria-label",
|
|
15
|
+
"aria-activedescendant",
|
|
16
|
+
"title"
|
|
17
|
+
];
|
|
18
|
+
const _hoisted_2 = ["aria-label"];
|
|
19
|
+
const _hoisted_3 = { class: "astryx-selector-sheet-title" };
|
|
20
|
+
const _hoisted_4 = ["data-placement"];
|
|
21
|
+
const _hoisted_5 = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "astryx-selector-search"
|
|
24
|
+
};
|
|
25
|
+
const _hoisted_6 = [
|
|
26
|
+
"id",
|
|
27
|
+
"aria-label",
|
|
28
|
+
"placeholder",
|
|
29
|
+
"value"
|
|
30
|
+
];
|
|
31
|
+
const _hoisted_7 = {
|
|
32
|
+
key: 1,
|
|
33
|
+
class: "astryx-selector-options"
|
|
34
|
+
};
|
|
35
|
+
const _hoisted_8 = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "astryx-selector-section",
|
|
38
|
+
role: "presentation"
|
|
39
|
+
};
|
|
40
|
+
const _hoisted_9 = [
|
|
41
|
+
"id",
|
|
42
|
+
"aria-selected",
|
|
43
|
+
"aria-disabled",
|
|
44
|
+
"onClick",
|
|
45
|
+
"onKeydown"
|
|
46
|
+
];
|
|
47
|
+
const _hoisted_10 = { class: "astryx-selector-option-label" };
|
|
48
|
+
const _hoisted_11 = {
|
|
49
|
+
key: 1,
|
|
50
|
+
class: "astryx-selector-option-description"
|
|
51
|
+
};
|
|
52
|
+
const _hoisted_12 = {
|
|
53
|
+
key: 2,
|
|
54
|
+
class: "astryx-selector-empty"
|
|
55
|
+
};
|
|
56
|
+
const _hoisted_13 = [
|
|
57
|
+
"id",
|
|
58
|
+
"name",
|
|
59
|
+
"value",
|
|
60
|
+
"aria-label"
|
|
61
|
+
];
|
|
62
|
+
const _hoisted_14 = ["value"];
|
|
63
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
64
|
+
name: "AstryxSelector",
|
|
65
|
+
inheritAttrs: false,
|
|
66
|
+
__name: "Selector",
|
|
67
|
+
props: {
|
|
68
|
+
modelValue: { default: null },
|
|
69
|
+
options: {},
|
|
70
|
+
placeholder: {},
|
|
71
|
+
disabled: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
default: false
|
|
74
|
+
},
|
|
75
|
+
disabledReason: {},
|
|
76
|
+
status: { default: "default" },
|
|
77
|
+
statusMessage: {},
|
|
78
|
+
statusVariant: { default: "attached" },
|
|
79
|
+
size: { default: "md" },
|
|
80
|
+
variant: { default: "default" },
|
|
81
|
+
presentation: { default: "popover" },
|
|
82
|
+
searchable: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
searchPlaceholder: {},
|
|
87
|
+
clearable: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false
|
|
90
|
+
},
|
|
91
|
+
clearLabel: {},
|
|
92
|
+
emptyText: {},
|
|
93
|
+
label: {},
|
|
94
|
+
isLabelHidden: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
default: false
|
|
97
|
+
},
|
|
98
|
+
description: {},
|
|
99
|
+
width: {},
|
|
100
|
+
name: {}
|
|
101
|
+
},
|
|
102
|
+
emits: [
|
|
103
|
+
"update:modelValue",
|
|
104
|
+
"change",
|
|
105
|
+
"search"
|
|
106
|
+
],
|
|
107
|
+
setup(__props, { emit: __emit }) {
|
|
108
|
+
const props = __props;
|
|
109
|
+
const emit = __emit;
|
|
110
|
+
const slots = useSlots();
|
|
111
|
+
const selectorId = `astryx-selector-${useId()}`;
|
|
112
|
+
const listboxId = `${selectorId}-listbox`;
|
|
113
|
+
const messages = useAstryxMessages();
|
|
114
|
+
const resolvedPlaceholder = computed(() => props.placeholder ?? messages.value.selector.placeholder);
|
|
115
|
+
const resolvedSearchPlaceholder = computed(() => props.searchPlaceholder ?? messages.value.selector.search);
|
|
116
|
+
const resolvedClearLabel = computed(() => props.clearLabel ?? messages.value.selector.clear);
|
|
117
|
+
const resolvedEmptyText = computed(() => props.emptyText ?? messages.value.selector.empty);
|
|
118
|
+
const fieldRef = useTemplateRef("fieldRef");
|
|
119
|
+
const listboxRef = useTemplateRef("listboxRef");
|
|
120
|
+
const searchInputRef = useTemplateRef("searchInputRef");
|
|
121
|
+
const sheetSlot = useTemplateRef("sheetSlot");
|
|
122
|
+
const isSheet = computed(() => props.presentation === "bottom-sheet");
|
|
123
|
+
const sheetLabel = computed(() => props.label || resolvedPlaceholder.value);
|
|
124
|
+
const isEnabled = computed(() => !props.disabled);
|
|
125
|
+
const isSearchable = computed(() => props.searchable);
|
|
126
|
+
function isSection(entry) {
|
|
127
|
+
return typeof entry === "object" && entry !== null && "type" in entry && entry.type === "section";
|
|
128
|
+
}
|
|
129
|
+
function asOption(entry) {
|
|
130
|
+
if (typeof entry === "string") return {
|
|
131
|
+
value: entry,
|
|
132
|
+
label: entry
|
|
133
|
+
};
|
|
134
|
+
return entry;
|
|
135
|
+
}
|
|
136
|
+
const normalizedEntries = computed(() => props.options.map((entry) => {
|
|
137
|
+
if (isSection(entry)) return {
|
|
138
|
+
...entry,
|
|
139
|
+
options: entry.options.map(asOption)
|
|
140
|
+
};
|
|
141
|
+
return asOption(entry);
|
|
142
|
+
}));
|
|
143
|
+
const flatOptions = computed(() => normalizedEntries.value.flatMap((entry) => isSection(entry) ? entry.options : [entry]));
|
|
144
|
+
const comboboxOptions = computed(() => flatOptions.value.map((opt) => ({
|
|
145
|
+
value: opt.value,
|
|
146
|
+
label: opt.label,
|
|
147
|
+
disabled: opt.disabled ?? false
|
|
148
|
+
})));
|
|
149
|
+
const modelValueRef = computed({
|
|
150
|
+
get: () => props.modelValue,
|
|
151
|
+
set: (value) => {
|
|
152
|
+
emit("update:modelValue", value);
|
|
153
|
+
emit("change", value);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
const combobox = useCombobox({
|
|
157
|
+
options: comboboxOptions,
|
|
158
|
+
modelValue: modelValueRef,
|
|
159
|
+
isEnabled,
|
|
160
|
+
isSearchable,
|
|
161
|
+
onChange: (value) => {
|
|
162
|
+
modelValueRef.value = value;
|
|
163
|
+
},
|
|
164
|
+
onOpenChange: (isOpen) => {
|
|
165
|
+
if (isOpen && props.searchable) nextTick(() => {
|
|
166
|
+
searchInputRef.value?.focus();
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
const sheetOpen = computed({
|
|
171
|
+
get: () => isSheet.value && combobox.isOpen.value,
|
|
172
|
+
set: (open) => {
|
|
173
|
+
if (!open && combobox.isOpen.value) combobox.close();
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
const popoverOpen = computed(() => combobox.isOpen.value && !isSheet.value);
|
|
177
|
+
const listboxTarget = computed(() => isSheet.value && sheetSlot.value ? sheetSlot.value : "body");
|
|
178
|
+
const { position } = usePositionedLayer({
|
|
179
|
+
anchor: fieldRef,
|
|
180
|
+
layer: listboxRef,
|
|
181
|
+
isOpen: popoverOpen,
|
|
182
|
+
placement: computed(() => "below"),
|
|
183
|
+
alignment: computed(() => "start"),
|
|
184
|
+
gap: 4
|
|
185
|
+
});
|
|
186
|
+
useDismiss({
|
|
187
|
+
container: listboxRef,
|
|
188
|
+
trigger: fieldRef,
|
|
189
|
+
isEnabled: popoverOpen,
|
|
190
|
+
enableEscape: ref(true),
|
|
191
|
+
onDismiss: () => {
|
|
192
|
+
combobox.close();
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
const selectedOption = computed(() => {
|
|
196
|
+
if (props.modelValue == null) return null;
|
|
197
|
+
return flatOptions.value.find((opt) => opt.value === props.modelValue) ?? null;
|
|
198
|
+
});
|
|
199
|
+
const fieldLabel = computed(() => props.label || resolvedPlaceholder.value);
|
|
200
|
+
const hideLabel = computed(() => props.isLabelHidden || !props.label);
|
|
201
|
+
const statusType = computed(() => {
|
|
202
|
+
const status = props.status;
|
|
203
|
+
if (status == null || status === "default") return "default";
|
|
204
|
+
if (typeof status === "string") return status;
|
|
205
|
+
return status.type;
|
|
206
|
+
});
|
|
207
|
+
const fieldStatus = computed(() => {
|
|
208
|
+
const status = props.status;
|
|
209
|
+
if (status && typeof status === "object") return status;
|
|
210
|
+
if (!props.statusMessage || statusType.value === "default") return void 0;
|
|
211
|
+
return {
|
|
212
|
+
type: statusType.value,
|
|
213
|
+
message: props.statusMessage
|
|
214
|
+
};
|
|
215
|
+
});
|
|
216
|
+
const displayRows = computed(() => {
|
|
217
|
+
const indexByValue = new Map(combobox.filteredOptions.value.map((option, index) => [option.value, index]));
|
|
218
|
+
const rows = [];
|
|
219
|
+
for (const entry of normalizedEntries.value) {
|
|
220
|
+
if (isSection(entry)) {
|
|
221
|
+
const children = entry.options.filter((option) => indexByValue.has(option.value));
|
|
222
|
+
if (children.length === 0) continue;
|
|
223
|
+
rows.push({
|
|
224
|
+
kind: "section",
|
|
225
|
+
title: entry.title
|
|
226
|
+
});
|
|
227
|
+
for (const option of children) rows.push({
|
|
228
|
+
kind: "option",
|
|
229
|
+
option,
|
|
230
|
+
index: indexByValue.get(option.value)
|
|
231
|
+
});
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
if (!indexByValue.has(entry.value)) continue;
|
|
235
|
+
rows.push({
|
|
236
|
+
kind: "option",
|
|
237
|
+
option: entry,
|
|
238
|
+
index: indexByValue.get(entry.value)
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
return rows;
|
|
242
|
+
});
|
|
243
|
+
const displayText = computed(() => {
|
|
244
|
+
return selectedOption.value?.label ?? resolvedPlaceholder.value;
|
|
245
|
+
});
|
|
246
|
+
const isEmpty = computed(() => {
|
|
247
|
+
return combobox.filteredOptions.value.length === 0;
|
|
248
|
+
});
|
|
249
|
+
function onTriggerClick() {
|
|
250
|
+
if (isEnabled.value) combobox.toggle();
|
|
251
|
+
}
|
|
252
|
+
function onTriggerKeyDown(event) {
|
|
253
|
+
combobox.onKeyDown(event);
|
|
254
|
+
}
|
|
255
|
+
function onOptionClick(option) {
|
|
256
|
+
if (!option.disabled) combobox.select(option.value);
|
|
257
|
+
}
|
|
258
|
+
function onClear(event) {
|
|
259
|
+
event.stopPropagation();
|
|
260
|
+
modelValueRef.value = null;
|
|
261
|
+
combobox.close();
|
|
262
|
+
}
|
|
263
|
+
function onSearchInput(event) {
|
|
264
|
+
const target = event.target;
|
|
265
|
+
combobox.setSearchQuery(target.value);
|
|
266
|
+
emit("search", target.value);
|
|
267
|
+
}
|
|
268
|
+
function getOptionId(index) {
|
|
269
|
+
return `${listboxId}-option-${index}`;
|
|
270
|
+
}
|
|
271
|
+
const anchorWidth = ref(0);
|
|
272
|
+
function syncAnchorWidth() {
|
|
273
|
+
anchorWidth.value = fieldRef.value?.getBoundingClientRect().width ?? 0;
|
|
274
|
+
}
|
|
275
|
+
const listboxStyle = computed(() => isSheet.value ? void 0 : {
|
|
276
|
+
top: `${position.value.top}px`,
|
|
277
|
+
left: `${position.value.left}px`,
|
|
278
|
+
minWidth: anchorWidth.value > 0 ? `${anchorWidth.value}px` : void 0
|
|
279
|
+
});
|
|
280
|
+
watch(combobox.isOpen, (open) => {
|
|
281
|
+
if (open) syncAnchorWidth();
|
|
282
|
+
}, { flush: "pre" });
|
|
283
|
+
onMounted(syncAnchorWidth);
|
|
284
|
+
watch(() => combobox.activeIndex.value, (index) => {
|
|
285
|
+
if (index >= 0 && combobox.isOpen.value) nextTick(() => {
|
|
286
|
+
const listbox = listboxRef.value;
|
|
287
|
+
const optionEl = listbox?.querySelector(`#${getOptionId(index)}`);
|
|
288
|
+
if (!listbox || !optionEl) return;
|
|
289
|
+
const listboxRect = listbox.getBoundingClientRect();
|
|
290
|
+
const optionRect = optionEl.getBoundingClientRect();
|
|
291
|
+
if (optionRect.top < listboxRect.top) listbox.scrollTop -= listboxRect.top - optionRect.top;
|
|
292
|
+
else if (optionRect.bottom > listboxRect.bottom) listbox.scrollTop += optionRect.bottom - listboxRect.bottom;
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
return (_ctx, _cache) => {
|
|
296
|
+
return openBlock(), createBlock(_sfc_main$2, {
|
|
297
|
+
class: normalizeClass(["astryx-selector", [
|
|
298
|
+
`size-${props.size}`,
|
|
299
|
+
`status-${statusType.value}`,
|
|
300
|
+
`variant-${props.variant}`
|
|
301
|
+
]]),
|
|
302
|
+
label: fieldLabel.value,
|
|
303
|
+
"input-id": selectorId,
|
|
304
|
+
description: props.description,
|
|
305
|
+
"is-label-hidden": hideLabel.value,
|
|
306
|
+
"is-disabled": props.disabled,
|
|
307
|
+
status: fieldStatus.value,
|
|
308
|
+
"status-variant": props.statusVariant,
|
|
309
|
+
width: props.width
|
|
310
|
+
}, {
|
|
311
|
+
default: withCtx(() => [
|
|
312
|
+
createElementVNode("div", {
|
|
313
|
+
ref_key: "fieldRef",
|
|
314
|
+
ref: fieldRef,
|
|
315
|
+
class: normalizeClass(["astryx-selector-field", {
|
|
316
|
+
"is-open": unref(combobox).isOpen.value,
|
|
317
|
+
"is-disabled": props.disabled,
|
|
318
|
+
"is-ghost": props.variant === "ghost"
|
|
319
|
+
}])
|
|
320
|
+
}, [createElementVNode("button", {
|
|
321
|
+
id: selectorId,
|
|
322
|
+
type: "button",
|
|
323
|
+
class: normalizeClass(["astryx-selector-trigger", {
|
|
324
|
+
"is-open": unref(combobox).isOpen.value,
|
|
325
|
+
"is-disabled": props.disabled
|
|
326
|
+
}]),
|
|
327
|
+
disabled: props.disabled,
|
|
328
|
+
"aria-haspopup": "listbox",
|
|
329
|
+
"aria-expanded": unref(combobox).isOpen.value,
|
|
330
|
+
"aria-controls": listboxId,
|
|
331
|
+
"aria-label": props.label,
|
|
332
|
+
"aria-activedescendant": unref(combobox).activeIndex.value >= 0 ? getOptionId(unref(combobox).activeIndex.value) : void 0,
|
|
333
|
+
title: props.disabledReason,
|
|
334
|
+
onClick: onTriggerClick,
|
|
335
|
+
onKeydown: onTriggerKeyDown
|
|
336
|
+
}, [createElementVNode("span", { class: normalizeClass(["astryx-selector-value", {
|
|
337
|
+
"is-placeholder": !selectedOption.value,
|
|
338
|
+
"is-rich": unref(slots).selected
|
|
339
|
+
}]) }, [unref(slots).selected ? renderSlot(_ctx.$slots, "selected", { option: selectedOption.value }, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(displayText.value), 1)], 64))], 2), _cache[1] || (_cache[1] = createElementVNode("span", {
|
|
340
|
+
class: "astryx-selector-icon",
|
|
341
|
+
"aria-hidden": "true"
|
|
342
|
+
}, [createElementVNode("svg", {
|
|
343
|
+
width: "16",
|
|
344
|
+
height: "16",
|
|
345
|
+
viewBox: "0 0 16 16",
|
|
346
|
+
fill: "none"
|
|
347
|
+
}, [createElementVNode("path", {
|
|
348
|
+
d: "M4 6L8 10L12 6",
|
|
349
|
+
stroke: "currentColor",
|
|
350
|
+
"stroke-width": "1.5",
|
|
351
|
+
"stroke-linecap": "round",
|
|
352
|
+
"stroke-linejoin": "round"
|
|
353
|
+
})])], -1))], 42, _hoisted_1), props.clearable && selectedOption.value ? (openBlock(), createElementBlock("button", {
|
|
354
|
+
key: 0,
|
|
355
|
+
type: "button",
|
|
356
|
+
class: "astryx-selector-clear",
|
|
357
|
+
"aria-label": resolvedClearLabel.value,
|
|
358
|
+
onClick: onClear
|
|
359
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
|
|
360
|
+
width: "16",
|
|
361
|
+
height: "16",
|
|
362
|
+
viewBox: "0 0 16 16",
|
|
363
|
+
fill: "none"
|
|
364
|
+
}, [createElementVNode("path", {
|
|
365
|
+
d: "M12 4L4 12M4 4L12 12",
|
|
366
|
+
stroke: "currentColor",
|
|
367
|
+
"stroke-width": "1.5",
|
|
368
|
+
"stroke-linecap": "round"
|
|
369
|
+
})], -1)])], 8, _hoisted_2)) : createCommentVNode("v-if", true)], 2),
|
|
370
|
+
isSheet.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
371
|
+
key: 0,
|
|
372
|
+
"is-open": sheetOpen.value,
|
|
373
|
+
"onUpdate:isOpen": _cache[0] || (_cache[0] = ($event) => sheetOpen.value = $event),
|
|
374
|
+
height: "hug",
|
|
375
|
+
label: sheetLabel.value,
|
|
376
|
+
padding: 2
|
|
377
|
+
}, {
|
|
378
|
+
default: withCtx(() => [createElementVNode("div", {
|
|
379
|
+
ref_key: "sheetSlot",
|
|
380
|
+
ref: sheetSlot,
|
|
381
|
+
class: "astryx-selector-sheet"
|
|
382
|
+
}, [createElementVNode("div", _hoisted_3, toDisplayString(sheetLabel.value), 1)], 512)]),
|
|
383
|
+
_: 1
|
|
384
|
+
}, 8, ["is-open", "label"])) : createCommentVNode("v-if", true),
|
|
385
|
+
(openBlock(), createBlock(Teleport, { to: listboxTarget.value }, [withDirectives(createElementVNode("div", {
|
|
386
|
+
id: listboxId,
|
|
387
|
+
ref_key: "listboxRef",
|
|
388
|
+
ref: listboxRef,
|
|
389
|
+
role: "listbox",
|
|
390
|
+
class: normalizeClass(["astryx-selector-listbox", { "is-sheet": isSheet.value }]),
|
|
391
|
+
"data-placement": isSheet.value ? void 0 : unref(position).placement,
|
|
392
|
+
style: normalizeStyle(listboxStyle.value),
|
|
393
|
+
tabindex: "-1"
|
|
394
|
+
}, [props.searchable ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("input", {
|
|
395
|
+
id: `${selectorId}-search`,
|
|
396
|
+
ref_key: "searchInputRef",
|
|
397
|
+
ref: searchInputRef,
|
|
398
|
+
type: "text",
|
|
399
|
+
class: "astryx-selector-search-input",
|
|
400
|
+
"aria-label": resolvedSearchPlaceholder.value,
|
|
401
|
+
placeholder: resolvedSearchPlaceholder.value,
|
|
402
|
+
value: unref(combobox).searchQuery.value,
|
|
403
|
+
onInput: onSearchInput
|
|
404
|
+
}, null, 40, _hoisted_6)])) : createCommentVNode("v-if", true), !isEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_7, [(openBlock(true), createElementBlock(Fragment, null, renderList(displayRows.value, (row, rowIndex) => {
|
|
405
|
+
return openBlock(), createElementBlock(Fragment, { key: row.kind === "section" ? `section-${rowIndex}` : row.option?.value }, [row.kind === "section" ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(row.title), 1)) : row.option && row.index != null ? (openBlock(), createElementBlock("div", {
|
|
406
|
+
key: 1,
|
|
407
|
+
id: getOptionId(row.index),
|
|
408
|
+
role: "option",
|
|
409
|
+
tabindex: "0",
|
|
410
|
+
class: normalizeClass(["astryx-selector-option", {
|
|
411
|
+
"is-active": row.index === unref(combobox).activeIndex.value,
|
|
412
|
+
"is-selected": row.option.value === props.modelValue,
|
|
413
|
+
"is-disabled": row.option.disabled
|
|
414
|
+
}]),
|
|
415
|
+
"aria-selected": row.option.value === props.modelValue,
|
|
416
|
+
"aria-disabled": row.option.disabled,
|
|
417
|
+
onClick: ($event) => onOptionClick(row.option),
|
|
418
|
+
onKeydown: [withKeys(($event) => onOptionClick(row.option), ["enter"]), withKeys(withModifiers(($event) => onOptionClick(row.option), ["prevent"]), ["space"])]
|
|
419
|
+
}, [unref(slots).option ? renderSlot(_ctx.$slots, "option", {
|
|
420
|
+
option: row.option,
|
|
421
|
+
isActive: row.index === unref(combobox).activeIndex.value,
|
|
422
|
+
isSelected: row.option.value === props.modelValue
|
|
423
|
+
}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
424
|
+
row.option.icon ? (openBlock(), createElementBlock("span", {
|
|
425
|
+
key: 0,
|
|
426
|
+
class: normalizeClass(["astryx-selector-option-icon", row.option.icon]),
|
|
427
|
+
"aria-hidden": "true"
|
|
428
|
+
}, null, 2)) : createCommentVNode("v-if", true),
|
|
429
|
+
createElementVNode("span", _hoisted_10, toDisplayString(row.option.label), 1),
|
|
430
|
+
row.option.description ? (openBlock(), createElementBlock("span", _hoisted_11, toDisplayString(row.option.description), 1)) : createCommentVNode("v-if", true)
|
|
431
|
+
], 64))], 42, _hoisted_9)) : createCommentVNode("v-if", true)], 64);
|
|
432
|
+
}), 128))])) : (openBlock(), createElementBlock("div", _hoisted_12, [unref(slots).empty ? renderSlot(_ctx.$slots, "empty", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(resolvedEmptyText.value), 1)], 64))]))], 14, _hoisted_4), [[vShow, unref(combobox).isOpen.value]])], 8, ["to"])),
|
|
433
|
+
props.name ? (openBlock(), createElementBlock("select", {
|
|
434
|
+
key: 1,
|
|
435
|
+
id: `${selectorId}-hidden-select`,
|
|
436
|
+
name: props.name,
|
|
437
|
+
value: props.modelValue ?? "",
|
|
438
|
+
"aria-label": props.label || resolvedPlaceholder.value,
|
|
439
|
+
tabindex: "-1",
|
|
440
|
+
style: {
|
|
441
|
+
"position": "absolute",
|
|
442
|
+
"left": "-9999px",
|
|
443
|
+
"width": "1px",
|
|
444
|
+
"height": "1px"
|
|
445
|
+
}
|
|
446
|
+
}, [_cache[3] || (_cache[3] = createElementVNode("option", { value: "" }, null, -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(flatOptions.value, (option) => {
|
|
447
|
+
return openBlock(), createElementBlock("option", {
|
|
448
|
+
key: option.value,
|
|
449
|
+
value: option.value
|
|
450
|
+
}, toDisplayString(option.label), 9, _hoisted_14);
|
|
451
|
+
}), 128))], 8, _hoisted_13)) : createCommentVNode("v-if", true)
|
|
452
|
+
]),
|
|
453
|
+
_: 3
|
|
454
|
+
}, 8, [
|
|
455
|
+
"class",
|
|
456
|
+
"label",
|
|
457
|
+
"description",
|
|
458
|
+
"is-label-hidden",
|
|
459
|
+
"is-disabled",
|
|
460
|
+
"status",
|
|
461
|
+
"status-variant",
|
|
462
|
+
"width"
|
|
463
|
+
]);
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
//#endregion
|
|
468
|
+
export { _sfc_main as t };
|
package/dist/SideNav/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bt as _default$1, Gt as SideNavHeadingProps, Ht as SideNavCollapseButtonProps, Jt as SideNavProps, Kt as SideNavItemEmits, Lt as _default$4, Rt as _default$3, Ut as SideNavCollapsible, Vt as _default, Wt as SideNavEmits, Xt as SideNavCollapseContext, Yt as SideNavSectionProps, Zt as useSideNavCollapse, qt as SideNavItemProps, zt as _default$2 } from "../index-
|
|
1
|
+
import { Bt as _default$1, Gt as SideNavHeadingProps, Ht as SideNavCollapseButtonProps, Jt as SideNavProps, Kt as SideNavItemEmits, Lt as _default$4, Rt as _default$3, Ut as SideNavCollapsible, Vt as _default, Wt as SideNavEmits, Xt as SideNavCollapseContext, Yt as SideNavSectionProps, Zt as useSideNavCollapse, qt as SideNavItemProps, zt as _default$2 } from "../index-DNRBbwp_.js";
|
|
2
2
|
export { _default as SideNav, _default$1 as SideNavCollapseButton, type SideNavCollapseButtonProps, type SideNavCollapseContext, type SideNavCollapsible, type SideNavEmits, _default$2 as SideNavHeading, type SideNavHeadingProps, _default$3 as SideNavItem, type SideNavItemEmits, type SideNavItemProps, type SideNavProps, _default$4 as SideNavSection, type SideNavSectionProps, useSideNavCollapse };
|
package/dist/SideNav/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as useSideNavCollapse } from "../context-BjNya0v8.js";
|
|
2
|
-
import { a as _sfc_main$1, i as _sfc_main, n as _sfc_main$3, r as _sfc_main$2, t as _sfc_main$4 } from "../SideNav-
|
|
2
|
+
import { a as _sfc_main$1, i as _sfc_main, n as _sfc_main$3, r as _sfc_main$2, t as _sfc_main$4 } from "../SideNav-DonEfiAx.js";
|
|
3
3
|
export { _sfc_main as SideNav, _sfc_main$1 as SideNavCollapseButton, _sfc_main$2 as SideNavHeading, _sfc_main$3 as SideNavItem, _sfc_main$4 as SideNavSection, useSideNavCollapse };
|