@astryx-vue/core 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AppShell/index.js +1 -1
- package/dist/{AppShell-EiGyPFbA.js → AppShell-1wNIEtK_.js} +2 -2
- package/dist/Avatar/index.d.ts +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar-jmHInHwj.js +244 -0
- package/dist/AvatarGroup/index.d.ts +1 -1
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/{AvatarGroup-CZcgAMjM.js → AvatarGroup-QyzSrpYA.js} +8 -7
- package/dist/Badge/index.d.ts +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge-CjDQPF5g.js +30 -0
- package/dist/Banner/index.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +2 -2
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/{Breadcrumbs-C3YZFQ9w.js → Breadcrumbs-C97HmjkC.js} +45 -11
- package/dist/Button/index.d.ts +1 -1
- package/dist/ButtonGroup/index.d.ts +1 -1
- package/dist/Calendar/index.d.ts +2 -2
- package/dist/Calendar/index.js +1 -1
- package/dist/Calendar-DqC3EDN1.js +352 -0
- package/dist/Card/index.d.ts +1 -1
- package/dist/Carousel/index.js +1 -1
- package/dist/{Carousel-BTtHkKea.js → Carousel-BGUnskjo.js} +2 -2
- package/dist/Chat/index.js +1 -1
- package/dist/{Chat-DjNxw5gv.js → Chat-DCjXRiOF.js} +8 -8
- package/dist/CheckboxInput/index.d.ts +1 -1
- package/dist/CheckboxList/index.d.ts +1 -1
- package/dist/CheckboxList/index.js +1 -1
- package/dist/Citation/index.js +1 -1
- package/dist/{Citation-DijdbUUu.js → Citation-DunoAqVH.js} +2 -2
- package/dist/ClickableCard/index.d.ts +1 -1
- package/dist/Code/index.js +1 -1
- package/dist/{CodeBlock-CxTb6j9_.js → CodeBlock-CAF-VJnh.js} +1 -1
- package/dist/Collapsible/index.js +1 -1
- package/dist/{Collapsible-9MC08X39.js → Collapsible-DvMiYJp7.js} +1 -1
- package/dist/CommandPalette/index.js +1 -1
- package/dist/{CommandPalette-BD2iODF5.js → CommandPalette-xfm9ldUI.js} +1 -1
- package/dist/ComplexSelector/index.d.ts +1 -1
- package/dist/ComplexSelector/index.js +1 -1
- package/dist/{ComplexSelector-D9iXd5cH.js → ComplexSelector-B6lBTRhP.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-DUkED3Z3.js} +101 -63
- package/dist/DateInput/index.d.ts +2 -2
- package/dist/DateInput/index.js +1 -1
- package/dist/DateInput-Crcg-CCj.js +376 -0
- package/dist/DateRangeInput/index.d.ts +1 -1
- package/dist/DateRangeInput/index.js +1 -1
- package/dist/{DateRangeInput-1bhPGG2s.js → DateRangeInput-e9KSxBBK.js} +2 -2
- package/dist/DateTimeInput/index.d.ts +1 -1
- package/dist/DateTimeInput/index.js +1 -1
- package/dist/{DateTimeInput-SnPdgk6P.js → DateTimeInput-fSOfuLex.js} +5 -3
- package/dist/Divider/index.d.ts +1 -1
- package/dist/DropdownMenu/index.d.ts +3 -2
- package/dist/DropdownMenu/index.js +3 -2
- package/dist/{DropdownMenu-UJGych6v.js → DropdownMenu-8G0B1UND.js} +63 -16
- package/dist/DropdownMenu-XvW4BJob.js +164 -0
- package/dist/FileInput/index.d.ts +1 -1
- package/dist/FileInput/index.js +1 -1
- package/dist/{FileInput-BQiwE-GB.js → FileInput-D-fchyQH.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-Bku25g_K.js +193 -0
- package/dist/Lightbox/index.js +1 -1
- package/dist/{Lightbox-CshKoB0r.js → Lightbox-uuVGgHxW.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/List/index.d.ts +1 -1
- package/dist/Markdown/index.js +1 -1
- package/dist/{Markdown-D-Ua055V.js → Markdown-DLICa3db.js} +3 -3
- package/dist/MetadataList/index.d.ts +1 -1
- package/dist/MetadataList/index.js +1 -1
- package/dist/{MetadataList-sYph_d8Q.js → MetadataList-h492rqEN.js} +1 -1
- package/dist/MobileNav/index.js +1 -1
- package/dist/{MobileNavToggle-DD9D01aj.js → MobileNavToggle-BMj3Wtuq.js} +1 -1
- package/dist/MoreMenu/index.d.ts +1 -1
- package/dist/MoreMenu/index.js +1 -1
- package/dist/{MoreMenu-BVrK5kkk.js → MoreMenu-DkYi5az5.js} +2 -2
- package/dist/MultiSelector/index.d.ts +1 -1
- package/dist/MultiSelector/index.js +1 -1
- package/dist/{MultiSelector-DiYov9sF.js → MultiSelector-C2IS-EaU.js} +2 -2
- package/dist/NavItem/index.d.ts +1 -1
- package/dist/NumberInput/index.d.ts +2 -2
- package/dist/NumberInput/index.js +1 -1
- package/dist/NumberInput-CjfAsFwj.js +210 -0
- package/dist/Outline/index.js +1 -1
- package/dist/{Outline-DQfEBxlc.js → Outline-BTmrtvXR.js} +1 -1
- package/dist/OverflowList/index.d.ts +1 -1
- package/dist/OverflowList/index.js +1 -1
- package/dist/{OverflowList-BU5VCntl.js → OverflowList-CRE8BE7V.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-BpGXPmc7.js} +76 -22
- package/dist/ProgressBar/index.d.ts +1 -1
- package/dist/ProgressBar/index.js +1 -1
- package/dist/{ProgressBar-ChDp-7oe.js → ProgressBar-DO9Chic6.js} +31 -11
- package/dist/Radio/index.d.ts +1 -1
- package/dist/RadioList/index.d.ts +1 -1
- package/dist/Resizable/index.js +1 -1
- package/dist/{Resizable-BhSMfO5B.js → Resizable-CE8XQDL2.js} +1 -1
- package/dist/ScrollableArea/index.d.ts +1 -1
- package/dist/SegmentedControl/index.d.ts +1 -1
- package/dist/SelectableCard/index.d.ts +1 -1
- package/dist/Selector/index.d.ts +2 -2
- package/dist/Selector/index.js +1 -1
- package/dist/Selector-DkJOLZSR.js +468 -0
- package/dist/SideNav/index.d.ts +1 -1
- package/dist/SideNav/index.js +1 -1
- package/dist/{SideNav-B-Om6Bz3.js → SideNav-DcDWBnXJ.js} +17 -17
- package/dist/Stepper/index.d.ts +1 -1
- package/dist/Stepper/index.js +1 -1
- package/dist/{Stepper-BZ_8SEZt.js → Stepper-DZKaqEoz.js} +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/TabList/index.d.ts +1 -1
- package/dist/TabList/index.js +1 -1
- package/dist/{TabList-Cnc2Hs1H.js → TabList-hm06QPiW.js} +10 -3
- package/dist/Table/index.js +1 -1
- package/dist/{Table-D-LhAy_J.js → Table-DwehtMap.js} +4 -4
- 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-CAOYds8t.js} +11 -11
- package/dist/{TimeField-C7t9Knq9.js → TimeField-BGbxCoKU.js} +2 -2
- package/dist/TimeInput/index.d.ts +1 -1
- package/dist/TimeInput/index.js +1 -1
- package/dist/{TimeInput-BXxCOY98.js → TimeInput-DJP3l4ZS.js} +1 -1
- package/dist/Timestamp/index.d.ts +1 -1
- package/dist/Timestamp/index.js +2 -1
- package/dist/{Timestamp-DlZSmgCJ.js → Timestamp-BzRp8uWc.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-CjocuhzE.js} +1 -1
- package/dist/Tokenizer/index.js +1 -1
- package/dist/{Tokenizer-nmTqdS9n.js → Tokenizer-mYES5SPM.js} +2 -2
- package/dist/Toolbar/index.d.ts +1 -1
- package/dist/TopNav/index.d.ts +1 -1
- package/dist/TopNav/index.js +1 -1
- package/dist/{TopNav-notp-mJx.js → TopNav-C2t6JkZb.js} +3 -3
- package/dist/TreeList/index.d.ts +1 -1
- package/dist/TreeList/index.js +1 -1
- package/dist/{TreeList-s1xBQ0qq.js → TreeList-THJ0KamE.js} +3 -3
- package/dist/Typeahead/index.js +1 -1
- package/dist/{Typeahead-VAuiCurV.js → Typeahead-D7VnvRpK.js} +2 -2
- package/dist/{context-Dbo22sck.js → context-DzcK4T_C.js} +4 -2
- package/dist/formatInstant-BDWUIxS7.js +119 -0
- package/dist/{index-Bainr_3n.d.ts → index-3p2BDVHq.d.ts} +1 -1
- package/dist/{index-BuubzuE8.d.ts → index-BDZCJ9ri.d.ts} +2 -2
- package/dist/{index-CTolyeii.d.ts → index-BLOEjvaM.d.ts} +16 -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-HV6W3xCx.d.ts → index-Byar3h1e.d.ts} +1 -1
- package/dist/{index-C59PdX9L.d.ts → index-CBym0hSq.d.ts} +1 -1
- package/dist/index-CJlBAXwj.d.ts +100 -0
- package/dist/{index-DT9S92sh.d.ts → index-CNjbOgty.d.ts} +15 -0
- package/dist/{index-gW0HW02U.d.ts → index-COxy6LEW.d.ts} +1 -1
- package/dist/{index-DoFCm2Q2.d.ts → index-Clmz00IK.d.ts} +2 -0
- package/dist/{index-DRmb-oUa.d.ts → index-CuFLztiI.d.ts} +6 -1
- package/dist/{index-fa72tWIU.d.ts → index-D2bSSSBP.d.ts} +1 -1
- package/dist/{index-NzLDrOkk.d.ts → index-DAiGhkNZ.d.ts} +15 -2
- package/dist/{index-DOUEn7V0.d.ts → index-DQAnGHu7.d.ts} +2 -2
- package/dist/{index-BfOtLyNH.d.ts → index-D_nYxnNv.d.ts} +1 -1
- package/dist/{index-C6iJwTL0.d.ts → index-DeOftUMq.d.ts} +181 -72
- 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-C_2Z65Rp.d.ts → index-DnEh-HA0.d.ts} +1 -1
- package/dist/{index-D-ZuubCK.d.ts → index-DnSrjbjP.d.ts} +1 -1
- package/dist/{index-BtPZKO20.d.ts → index-I4J7gwa1.d.ts} +49 -7
- package/dist/{index-utZGF4GR.d.ts → index-NOXYEdOI.d.ts} +1 -1
- package/dist/{index-C7mxUcDR.d.ts → index-Z_onS2lR.d.ts} +2 -2
- package/dist/{index-CVn0GBdB.d.ts → index-cG1E0U2s.d.ts} +1 -1
- package/dist/{index-DEeJowZf.d.ts → index-cGagYM1g.d.ts} +15 -2
- package/dist/{index-Ck8qy6Rf.d.ts → index-c_TaW8mM.d.ts} +24 -2
- package/dist/index.d.ts +68 -67
- package/dist/index.js +98 -95
- package/dist/locale/index.d.ts +1 -1
- package/dist/locale/index.js +1 -1
- package/dist/registry-B1ObuP--.d.ts +45 -0
- package/dist/registry-C7OZb0PJ.js +135 -0
- package/dist/{types-DZoEm_DG.d.ts → types-BKcxXW--.d.ts} +22 -5
- package/dist/{index-B8MbfMwV.d.ts → types-DDAAT1Xd.d.ts} +36 -82
- package/package.json +6 -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 +5 -2
- package/styles/dropdown-menu.css +11 -0
- package/styles/icon.css +38 -8
- package/styles/link.css +5 -0
- package/styles/number-input.css +22 -0
- package/styles/pagination.css +45 -1
- package/styles/progress-bar.css +4 -0
- package/styles/selector.css +58 -0
- package/styles/tab-list.css +15 -0
- package/styles/text-area.css +17 -0
- package/styles/text-input.css +5 -0
- package/styles/toast.css +7 -0
- package/styles/toolbar.css +11 -0
- package/dist/Avatar-5s3HSrtN.js +0 -136
- package/dist/Badge-Ba0EwsTj.js +0 -19
- package/dist/Calendar-BG7wEsro.js +0 -277
- 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/index-DtjAdYEc.d.ts +0 -68
- package/dist/{CheckboxList-EsIEXjK_.js → CheckboxList-BbCPiend.js} +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as NumberInputEmits, r as NumberInputProps, t as _default } from "../index-
|
|
2
|
-
export { _default as NumberInput, type NumberInputEmits, type NumberInputProps };
|
|
1
|
+
import { i as NumberInputStatus, n as NumberInputEmits, r as NumberInputProps, t as _default } from "../index-DAiGhkNZ.js";
|
|
2
|
+
export { _default as NumberInput, type NumberInputEmits, type NumberInputProps, type NumberInputStatus };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../NumberInput-
|
|
1
|
+
import { t as _sfc_main } from "../NumberInput-CjfAsFwj.js";
|
|
2
2
|
export { _sfc_main as NumberInput };
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { t as useNumberField } from "./useNumberField-DL-Radsp.js";
|
|
2
|
+
import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
|
|
3
|
+
import { t as _sfc_main$1 } from "./FieldIcon--NTgW5IU.js";
|
|
4
|
+
import { t as _sfc_main$2 } from "./Field-8zRxzDHE.js";
|
|
5
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, normalizeClass, normalizeProps, openBlock, ref, resolveDynamicComponent, toDisplayString, unref, useId, withCtx } from "vue";
|
|
6
|
+
import "../styles/number-input.css";
|
|
7
|
+
//#region src/NumberInput/NumberInput.vue
|
|
8
|
+
const _hoisted_1 = ["data-status"];
|
|
9
|
+
const _hoisted_2 = [
|
|
10
|
+
"value",
|
|
11
|
+
"placeholder",
|
|
12
|
+
"disabled",
|
|
13
|
+
"aria-label",
|
|
14
|
+
"aria-labelledby",
|
|
15
|
+
"aria-describedby",
|
|
16
|
+
"aria-invalid",
|
|
17
|
+
"title"
|
|
18
|
+
];
|
|
19
|
+
const _hoisted_3 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "astryx-number-input-units"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_4 = ["aria-label"];
|
|
24
|
+
const _hoisted_5 = { class: "astryx-number-input-buttons" };
|
|
25
|
+
const _hoisted_6 = ["disabled", "aria-label"];
|
|
26
|
+
const _hoisted_7 = ["disabled", "aria-label"];
|
|
27
|
+
const _hoisted_8 = ["name", "value"];
|
|
28
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
29
|
+
name: "AstryxNumberInput",
|
|
30
|
+
__name: "NumberInput",
|
|
31
|
+
props: {
|
|
32
|
+
modelValue: { default: null },
|
|
33
|
+
placeholder: { default: "" },
|
|
34
|
+
min: {},
|
|
35
|
+
max: {},
|
|
36
|
+
step: { default: 1 },
|
|
37
|
+
disabled: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: false
|
|
40
|
+
},
|
|
41
|
+
disabledReason: {},
|
|
42
|
+
size: { default: "md" },
|
|
43
|
+
label: {},
|
|
44
|
+
description: {},
|
|
45
|
+
isLabelHidden: { type: Boolean },
|
|
46
|
+
units: {},
|
|
47
|
+
clearable: { type: Boolean },
|
|
48
|
+
status: {},
|
|
49
|
+
name: {}
|
|
50
|
+
},
|
|
51
|
+
emits: ["update:modelValue", "change"],
|
|
52
|
+
setup(__props, { emit: __emit }) {
|
|
53
|
+
const props = __props;
|
|
54
|
+
const emit = __emit;
|
|
55
|
+
const PassThrough = defineComponent({
|
|
56
|
+
name: "NumberInputPassThrough",
|
|
57
|
+
setup(_, { slots }) {
|
|
58
|
+
return () => slots.default?.({});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const inputId = `astryx-number-input-${useId()}`;
|
|
62
|
+
const messages = useAstryxMessages();
|
|
63
|
+
const incrementLabel = computed(() => messages.value.numberInput.increment(props.label));
|
|
64
|
+
const decrementLabel = computed(() => messages.value.numberInput.decrement(props.label));
|
|
65
|
+
const inputValue = ref("");
|
|
66
|
+
const modelValueRef = computed({
|
|
67
|
+
get: () => props.modelValue,
|
|
68
|
+
set: (value) => {
|
|
69
|
+
emit("update:modelValue", value);
|
|
70
|
+
emit("change", value);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const numberField = useNumberField({
|
|
74
|
+
value: modelValueRef,
|
|
75
|
+
min: props.min,
|
|
76
|
+
max: props.max,
|
|
77
|
+
step: props.step,
|
|
78
|
+
disabled: computed(() => props.disabled),
|
|
79
|
+
onChange: (value) => {
|
|
80
|
+
modelValueRef.value = value;
|
|
81
|
+
inputValue.value = value === null ? "" : String(value);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
function onInput(event) {
|
|
85
|
+
const target = event.target;
|
|
86
|
+
const value = target.value.trim();
|
|
87
|
+
if (value === "") {
|
|
88
|
+
numberField.setValue(null);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
const parsed = Number.parseFloat(value);
|
|
92
|
+
if (!Number.isNaN(parsed)) numberField.setValue(parsed);
|
|
93
|
+
else target.value = inputValue.value;
|
|
94
|
+
}
|
|
95
|
+
function onKeyDown(event) {
|
|
96
|
+
numberField.onKeyDown(event);
|
|
97
|
+
}
|
|
98
|
+
function resolvedStatus(status) {
|
|
99
|
+
if (status == null || status === "default") return void 0;
|
|
100
|
+
if (typeof status === "string") return { type: status };
|
|
101
|
+
return status;
|
|
102
|
+
}
|
|
103
|
+
const statusValue = computed(() => resolvedStatus(props.status));
|
|
104
|
+
const statusType = computed(() => statusValue.value?.type);
|
|
105
|
+
const showsField = computed(() => {
|
|
106
|
+
if (props.isLabelHidden && !props.description && !statusValue.value?.message) return false;
|
|
107
|
+
return Boolean(props.label || props.description || statusValue.value?.message);
|
|
108
|
+
});
|
|
109
|
+
const shell = computed(() => showsField.value ? _sfc_main$2 : PassThrough);
|
|
110
|
+
const fieldBindings = computed(() => showsField.value ? {
|
|
111
|
+
label: props.label ?? "",
|
|
112
|
+
inputId,
|
|
113
|
+
description: props.description,
|
|
114
|
+
isLabelHidden: props.isLabelHidden || !props.label,
|
|
115
|
+
isDisabled: props.disabled,
|
|
116
|
+
status: statusValue.value
|
|
117
|
+
} : {});
|
|
118
|
+
function clearValue() {
|
|
119
|
+
numberField.setValue(null);
|
|
120
|
+
inputValue.value = "";
|
|
121
|
+
}
|
|
122
|
+
function syncDisplayValue() {
|
|
123
|
+
inputValue.value = props.modelValue === null ? "" : String(props.modelValue);
|
|
124
|
+
}
|
|
125
|
+
syncDisplayValue();
|
|
126
|
+
return (_ctx, _cache) => {
|
|
127
|
+
return openBlock(), createBlock(resolveDynamicComponent(shell.value), normalizeProps(guardReactiveProps(fieldBindings.value)), {
|
|
128
|
+
default: withCtx((field) => [createElementVNode("div", {
|
|
129
|
+
class: normalizeClass(["astryx-number-input", `size-${props.size}`]),
|
|
130
|
+
"data-status": statusType.value
|
|
131
|
+
}, [
|
|
132
|
+
createElementVNode("input", {
|
|
133
|
+
id: inputId,
|
|
134
|
+
type: "text",
|
|
135
|
+
inputmode: "decimal",
|
|
136
|
+
class: "astryx-number-input-field",
|
|
137
|
+
value: inputValue.value,
|
|
138
|
+
placeholder: props.placeholder,
|
|
139
|
+
disabled: props.disabled,
|
|
140
|
+
"aria-label": showsField.value ? void 0 : props.label,
|
|
141
|
+
"aria-labelledby": showsField.value ? field?.labelId : void 0,
|
|
142
|
+
"aria-describedby": field?.describedBy,
|
|
143
|
+
"aria-invalid": statusType.value === "error" ? "true" : void 0,
|
|
144
|
+
title: props.disabledReason,
|
|
145
|
+
onInput,
|
|
146
|
+
onKeydown: onKeyDown
|
|
147
|
+
}, null, 40, _hoisted_2),
|
|
148
|
+
props.units ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(props.units), 1)) : createCommentVNode("v-if", true),
|
|
149
|
+
props.clearable && props.modelValue != null && !props.disabled ? (openBlock(), createElementBlock("button", {
|
|
150
|
+
key: 1,
|
|
151
|
+
type: "button",
|
|
152
|
+
class: "astryx-number-input-clear",
|
|
153
|
+
"aria-label": props.label ? `Clear ${props.label}` : "Clear",
|
|
154
|
+
onClick: clearValue
|
|
155
|
+
}, [createVNode(_sfc_main$1, { type: "clear" })], 8, _hoisted_4)) : createCommentVNode("v-if", true),
|
|
156
|
+
createElementVNode("div", _hoisted_5, [createElementVNode("button", {
|
|
157
|
+
type: "button",
|
|
158
|
+
class: "astryx-number-input-button increment",
|
|
159
|
+
disabled: props.disabled,
|
|
160
|
+
"aria-label": incrementLabel.value,
|
|
161
|
+
tabindex: "-1",
|
|
162
|
+
onClick: _cache[0] || (_cache[0] = (...args) => unref(numberField).increment && unref(numberField).increment(...args))
|
|
163
|
+
}, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
|
|
164
|
+
class: "astryx-number-input-chevron",
|
|
165
|
+
viewBox: "0 0 12 8",
|
|
166
|
+
width: "12",
|
|
167
|
+
height: "8",
|
|
168
|
+
"aria-hidden": "true",
|
|
169
|
+
fill: "none"
|
|
170
|
+
}, [createElementVNode("path", {
|
|
171
|
+
d: "M1.5 1.75 6 6.25 10.5 1.75",
|
|
172
|
+
stroke: "currentColor",
|
|
173
|
+
"stroke-width": "1.5",
|
|
174
|
+
"stroke-linecap": "round",
|
|
175
|
+
"stroke-linejoin": "round"
|
|
176
|
+
})], -1)])], 8, _hoisted_6), createElementVNode("button", {
|
|
177
|
+
type: "button",
|
|
178
|
+
class: "astryx-number-input-button decrement",
|
|
179
|
+
disabled: props.disabled,
|
|
180
|
+
"aria-label": decrementLabel.value,
|
|
181
|
+
tabindex: "-1",
|
|
182
|
+
onClick: _cache[1] || (_cache[1] = (...args) => unref(numberField).decrement && unref(numberField).decrement(...args))
|
|
183
|
+
}, [..._cache[3] || (_cache[3] = [createElementVNode("svg", {
|
|
184
|
+
class: "astryx-number-input-chevron",
|
|
185
|
+
viewBox: "0 0 12 8",
|
|
186
|
+
width: "12",
|
|
187
|
+
height: "8",
|
|
188
|
+
"aria-hidden": "true",
|
|
189
|
+
fill: "none"
|
|
190
|
+
}, [createElementVNode("path", {
|
|
191
|
+
d: "M1.5 1.75 6 6.25 10.5 1.75",
|
|
192
|
+
stroke: "currentColor",
|
|
193
|
+
"stroke-width": "1.5",
|
|
194
|
+
"stroke-linecap": "round",
|
|
195
|
+
"stroke-linejoin": "round"
|
|
196
|
+
})], -1)])], 8, _hoisted_7)]),
|
|
197
|
+
props.name ? (openBlock(), createElementBlock("input", {
|
|
198
|
+
key: 2,
|
|
199
|
+
type: "hidden",
|
|
200
|
+
name: props.name,
|
|
201
|
+
value: props.modelValue ?? ""
|
|
202
|
+
}, null, 8, _hoisted_8)) : createCommentVNode("v-if", true)
|
|
203
|
+
], 10, _hoisted_1)]),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 16);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
//#endregion
|
|
210
|
+
export { _sfc_main as t };
|
package/dist/Outline/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Outline-
|
|
1
|
+
import { t as _sfc_main } from "../Outline-BTmrtvXR.js";
|
|
2
2
|
export { _sfc_main as Outline };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as useListFocus } from "./useListFocus-D0iOJl39.js";
|
|
2
|
-
import { a as useAstryxMessages } from "./context-
|
|
2
|
+
import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
|
|
3
3
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, nextTick, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, ref, renderList, toDisplayString, toRef, unref, watch } from "vue";
|
|
4
4
|
import "../styles/outline.css";
|
|
5
5
|
//#region src/Outline/scrollGeometry.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Cn as _default, En as OverflowListProps, Tn as OverflowListItem, wn as OverflowListEmits } from "../index-
|
|
1
|
+
import { Cn as _default, En as OverflowListProps, Tn as OverflowListItem, wn as OverflowListEmits } from "../index-DeOftUMq.js";
|
|
2
2
|
export { _default as OverflowList, type OverflowListEmits, type OverflowListItem, type OverflowListProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../OverflowList-
|
|
1
|
+
import { t as _sfc_main } from "../OverflowList-CRE8BE7V.js";
|
|
2
2
|
export { _sfc_main as OverflowList };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as useOverflow } from "./useOverflow-VrwF5oek.js";
|
|
2
|
-
import { a as useAstryxMessages } from "./context-
|
|
2
|
+
import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
|
|
3
3
|
import { n as resolveNavRoot } from "./link-CdcUSxAj.js";
|
|
4
4
|
import { t as _sfc_main$2 } from "./NavDisclosure-DHrSNRDR.js";
|
|
5
5
|
import { n as _sfc_main$3, t as _sfc_main$4 } from "./NavMenuItem-B-k7olt5.js";
|
package/dist/Overlay/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OverlayContainerProps, c as OverlayScrimMode, d as OverlayShowOn, f as OverlaySlots, i as OverlayAlign, l as OverlayScrimProps, m as UseOverlayResult, n as _default$1, o as OverlayPosition, p as UseOverlayOptions, r as _default, s as OverlayProps, t as useOverlay, u as OverlayScrimSlots } from "../index-
|
|
1
|
+
import { a as OverlayContainerProps, c as OverlayScrimMode, d as OverlayShowOn, f as OverlaySlots, i as OverlayAlign, l as OverlayScrimProps, m as UseOverlayResult, n as _default$1, o as OverlayPosition, p as UseOverlayOptions, r as _default, s as OverlayProps, t as useOverlay, u as OverlayScrimSlots } from "../index-BDZCJ9ri.js";
|
|
2
2
|
export { _default as Overlay, type OverlayAlign, type OverlayContainerProps, type OverlayPosition, type OverlayProps, _default$1 as OverlayScrim, type OverlayScrimMode, type OverlayScrimProps, type OverlayScrimSlots, type OverlayShowOn, type OverlaySlots, type UseOverlayOptions, type UseOverlayResult, useOverlay };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { _default as Pagination, type PaginationEmits, type PaginationProps, type PaginationSlots };
|
|
1
|
+
import { a as PaginationSlots, i as PaginationSize, n as PaginationEmits, o as PaginationVariant, r as PaginationProps, t as _default } from "../index-c_TaW8mM.js";
|
|
2
|
+
export { _default as Pagination, type PaginationEmits, type PaginationProps, type PaginationSize, type PaginationSlots, type PaginationVariant };
|
package/dist/Pagination/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Pagination-
|
|
1
|
+
import { t as _sfc_main } from "../Pagination-BpGXPmc7.js";
|
|
2
2
|
export { _sfc_main as Pagination };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as useAstryxMessages } from "./context-
|
|
2
|
-
import { t as _sfc_main$1 } from "./Selector-
|
|
1
|
+
import { a as useAstryxMessages } from "./context-DzcK4T_C.js";
|
|
2
|
+
import { t as _sfc_main$1 } from "./Selector-DkJOLZSR.js";
|
|
3
3
|
import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, toValue, unref, vShow, withDirectives } from "vue";
|
|
4
4
|
import "../styles/pagination.css";
|
|
5
5
|
/**
|
|
@@ -86,7 +86,12 @@ function usePagination(options) {
|
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region src/Pagination/Pagination.vue
|
|
89
|
-
const _hoisted_1 = [
|
|
89
|
+
const _hoisted_1 = [
|
|
90
|
+
"data-density",
|
|
91
|
+
"data-variant",
|
|
92
|
+
"data-size",
|
|
93
|
+
"aria-label"
|
|
94
|
+
];
|
|
90
95
|
const _hoisted_2 = {
|
|
91
96
|
key: 0,
|
|
92
97
|
class: "astryx-pagination-total"
|
|
@@ -97,24 +102,42 @@ const _hoisted_5 = {
|
|
|
97
102
|
class: "astryx-pagination-label",
|
|
98
103
|
"aria-hidden": "true"
|
|
99
104
|
};
|
|
100
|
-
const _hoisted_6 =
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
const _hoisted_6 = {
|
|
106
|
+
key: 0,
|
|
107
|
+
class: "astryx-pagination-count"
|
|
108
|
+
};
|
|
109
|
+
const _hoisted_7 = {
|
|
110
|
+
key: 1,
|
|
111
|
+
class: "astryx-pagination-count"
|
|
112
|
+
};
|
|
113
|
+
const _hoisted_8 = ["aria-label"];
|
|
114
|
+
const _hoisted_9 = [
|
|
115
|
+
"disabled",
|
|
116
|
+
"aria-current",
|
|
117
|
+
"aria-label",
|
|
118
|
+
"onClick"
|
|
119
|
+
];
|
|
120
|
+
const _hoisted_10 = ["aria-hidden"];
|
|
121
|
+
const _hoisted_11 = {
|
|
122
|
+
key: 4,
|
|
123
|
+
class: "astryx-pagination-pages"
|
|
124
|
+
};
|
|
125
|
+
const _hoisted_12 = [
|
|
103
126
|
"disabled",
|
|
104
127
|
"aria-label",
|
|
105
128
|
"aria-current",
|
|
106
129
|
"onClick"
|
|
107
130
|
];
|
|
108
|
-
const
|
|
109
|
-
const
|
|
131
|
+
const _hoisted_13 = ["disabled", "aria-label"];
|
|
132
|
+
const _hoisted_14 = {
|
|
110
133
|
class: "astryx-pagination-label",
|
|
111
134
|
"aria-hidden": "true"
|
|
112
135
|
};
|
|
113
|
-
const
|
|
114
|
-
key:
|
|
136
|
+
const _hoisted_15 = {
|
|
137
|
+
key: 5,
|
|
115
138
|
class: "astryx-pagination-size-changer"
|
|
116
139
|
};
|
|
117
|
-
const
|
|
140
|
+
const _hoisted_16 = { class: "astryx-pagination-size-label" };
|
|
118
141
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
119
142
|
name: "AstryxPagination",
|
|
120
143
|
__name: "Pagination",
|
|
@@ -122,6 +145,9 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
122
145
|
page: { default: 1 },
|
|
123
146
|
pageSize: { default: 10 },
|
|
124
147
|
total: { default: 0 },
|
|
148
|
+
totalPages: {},
|
|
149
|
+
variant: { default: "pages" },
|
|
150
|
+
size: { default: "md" },
|
|
125
151
|
showSizeChanger: {
|
|
126
152
|
type: Boolean,
|
|
127
153
|
default: false
|
|
@@ -156,9 +182,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
156
182
|
const resolvedPrevLabel = computed(() => props.prevLabel ?? messages.value.pagination.previous);
|
|
157
183
|
const resolvedNextLabel = computed(() => props.nextLabel ?? messages.value.pagination.next);
|
|
158
184
|
const resolvedPageSizeLabel = computed(() => props.pageSizeLabel ?? messages.value.pagination.perPage);
|
|
185
|
+
function resolvedItemTotal() {
|
|
186
|
+
if (props.total > 0) return props.total;
|
|
187
|
+
if (props.totalPages != null && props.totalPages > 0) return props.totalPages * props.pageSize;
|
|
188
|
+
return props.total;
|
|
189
|
+
}
|
|
159
190
|
const pageRef = ref(props.page);
|
|
160
191
|
const pageSizeRef = ref(props.pageSize);
|
|
161
|
-
const totalRef = ref(
|
|
192
|
+
const totalRef = ref(resolvedItemTotal());
|
|
193
|
+
const variant = computed(() => props.variant);
|
|
162
194
|
const root = ref(null);
|
|
163
195
|
const density = ref("full");
|
|
164
196
|
const siblingCount = computed(() => siblingCountForDensity(density.value));
|
|
@@ -197,7 +229,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
197
229
|
function syncFromProps() {
|
|
198
230
|
pageRef.value = props.page;
|
|
199
231
|
pageSizeRef.value = props.pageSize;
|
|
200
|
-
totalRef.value =
|
|
232
|
+
totalRef.value = resolvedItemTotal();
|
|
201
233
|
}
|
|
202
234
|
syncFromProps();
|
|
203
235
|
const pageSizeOptions = computed(() => {
|
|
@@ -222,8 +254,13 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
222
254
|
return openBlock(), createElementBlock("nav", {
|
|
223
255
|
ref_key: "root",
|
|
224
256
|
ref: root,
|
|
225
|
-
class: normalizeClass(["astryx-pagination", {
|
|
257
|
+
class: normalizeClass(["astryx-pagination", {
|
|
258
|
+
"is-disabled": props.disabled,
|
|
259
|
+
"astryx-pagination--sm": props.size === "sm"
|
|
260
|
+
}]),
|
|
226
261
|
"data-density": density.value,
|
|
262
|
+
"data-variant": variant.value,
|
|
263
|
+
"data-size": props.size,
|
|
227
264
|
role: "navigation",
|
|
228
265
|
"aria-label": unref(messages).pagination.nav
|
|
229
266
|
}, [props.showTotal ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "total", {
|
|
@@ -249,11 +286,28 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
249
286
|
"stroke-linecap": "round",
|
|
250
287
|
"stroke-linejoin": "round"
|
|
251
288
|
})], -1)), createElementVNode("span", _hoisted_5, toDisplayString(resolvedPrevLabel.value), 1)], 8, _hoisted_4),
|
|
252
|
-
|
|
289
|
+
variant.value === "count" ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(unref(messages).pagination.total(totalRef.value, fromIndex.value, toIndex.value)), 1)) : variant.value === "compact" ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(unref(messages).pagination.pageOf(pageRef.value, unref(pagination).totalPages.value)), 1)) : variant.value === "dots" ? (openBlock(), createElementBlock("div", {
|
|
290
|
+
key: 2,
|
|
291
|
+
class: "astryx-pagination-dots",
|
|
292
|
+
role: "group",
|
|
293
|
+
"aria-label": unref(messages).pagination.nav
|
|
294
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagination).totalPages.value, (dotPage) => {
|
|
295
|
+
return openBlock(), createElementBlock("button", {
|
|
296
|
+
key: dotPage,
|
|
297
|
+
type: "button",
|
|
298
|
+
class: normalizeClass(["astryx-pagination-dot", { "is-active": dotPage === pageRef.value }]),
|
|
299
|
+
disabled: props.disabled,
|
|
300
|
+
"aria-current": dotPage === pageRef.value ? "page" : void 0,
|
|
301
|
+
"aria-label": unref(messages).pagination.page(dotPage),
|
|
302
|
+
onClick: ($event) => onPageClick(dotPage)
|
|
303
|
+
}, null, 10, _hoisted_9);
|
|
304
|
+
}), 128))], 8, _hoisted_8)) : createCommentVNode("v-if", true),
|
|
305
|
+
variant.value === "pages" ? (openBlock(), createElementBlock("span", {
|
|
306
|
+
key: 3,
|
|
253
307
|
class: "astryx-pagination-compact",
|
|
254
308
|
"aria-hidden": density.value === "minimal" ? void 0 : true
|
|
255
|
-
}, toDisplayString(unref(messages).pagination.compact(pageRef.value, unref(pagination).totalPages.value)), 9,
|
|
256
|
-
withDirectives(
|
|
309
|
+
}, toDisplayString(unref(messages).pagination.compact(pageRef.value, unref(pagination).totalPages.value)), 9, _hoisted_10)) : createCommentVNode("v-if", true),
|
|
310
|
+
variant.value === "pages" ? withDirectives((openBlock(), createElementBlock("div", _hoisted_11, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(pagination).pageNumbers.value, (page, index) => {
|
|
257
311
|
return openBlock(), createElementBlock("button", {
|
|
258
312
|
key: index,
|
|
259
313
|
type: "button",
|
|
@@ -265,15 +319,15 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
265
319
|
"aria-label": isEllipsis(page) ? unref(messages).pagination.more : unref(messages).pagination.page(page),
|
|
266
320
|
"aria-current": page === pageRef.value ? "page" : void 0,
|
|
267
321
|
onClick: ($event) => onPageClick(page)
|
|
268
|
-
}, toDisplayString(isEllipsis(page) ? "..." : page), 11,
|
|
269
|
-
}), 128))], 512), [[vShow, density.value !== "minimal"]]),
|
|
322
|
+
}, toDisplayString(isEllipsis(page) ? "..." : page), 11, _hoisted_12);
|
|
323
|
+
}), 128))], 512)), [[vShow, density.value !== "minimal"]]) : createCommentVNode("v-if", true),
|
|
270
324
|
createElementVNode("button", {
|
|
271
325
|
type: "button",
|
|
272
326
|
class: "astryx-pagination-button astryx-pagination-next",
|
|
273
327
|
disabled: props.disabled || !unref(pagination).canNext.value,
|
|
274
328
|
"aria-label": resolvedNextLabel.value,
|
|
275
329
|
onClick: _cache[1] || (_cache[1] = (...args) => unref(pagination).next && unref(pagination).next(...args))
|
|
276
|
-
}, [createElementVNode("span",
|
|
330
|
+
}, [createElementVNode("span", _hoisted_14, toDisplayString(resolvedNextLabel.value), 1), _cache[4] || (_cache[4] = createElementVNode("svg", {
|
|
277
331
|
width: "16",
|
|
278
332
|
height: "16",
|
|
279
333
|
viewBox: "0 0 16 16",
|
|
@@ -284,8 +338,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
284
338
|
"stroke-width": "1.5",
|
|
285
339
|
"stroke-linecap": "round",
|
|
286
340
|
"stroke-linejoin": "round"
|
|
287
|
-
})], -1))], 8,
|
|
288
|
-
props.showSizeChanger ? (openBlock(), createElementBlock("div",
|
|
341
|
+
})], -1))], 8, _hoisted_13),
|
|
342
|
+
props.showSizeChanger ? (openBlock(), createElementBlock("div", _hoisted_15, [createElementVNode("span", _hoisted_16, toDisplayString(resolvedPageSizeLabel.value), 1), createVNode(_sfc_main$1, {
|
|
289
343
|
"model-value": pageSizeRef.value,
|
|
290
344
|
options: pageSizeOptions.value,
|
|
291
345
|
disabled: props.disabled,
|
|
@@ -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-DeOftUMq.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-DeOftUMq.js";
|
|
2
2
|
export { _default as RadioList, _default$1 as RadioListItem, type RadioListItemProps, type RadioListProps };
|
package/dist/Resizable/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as _sfc_main } from "../Resizable-
|
|
1
|
+
import { t as _sfc_main } from "../Resizable-CE8XQDL2.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-DzcK4T_C.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-DeOftUMq.js";
|
|
2
2
|
export { _default as ScrollableArea, type ScrollableAreaProps, type ScrollableAreaSlots };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SegmentedControlItemProps, c as SegmentedControlProps, i as SegmentedControlEmits, l as SegmentedControlSize, n as _default, o as SegmentedControlItemSlots, r as SegmentedControlContextValue, s as SegmentedControlLayout, t as _default$1, u as SegmentedControlSlots } from "../index-
|
|
1
|
+
import { a as SegmentedControlItemProps, c as SegmentedControlProps, i as SegmentedControlEmits, l as SegmentedControlSize, n as _default, o as SegmentedControlItemSlots, r as SegmentedControlContextValue, s as SegmentedControlLayout, t as _default$1, u as SegmentedControlSlots } from "../index-COxy6LEW.js";
|
|
2
2
|
export { _default as SegmentedControl, type SegmentedControlContextValue, type SegmentedControlEmits, _default$1 as SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlItemSlots, type SegmentedControlLayout, type SegmentedControlProps, type SegmentedControlSize, type SegmentedControlSlots };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $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-DeOftUMq.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-I4J7gwa1.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-DkJOLZSR.js";
|
|
2
2
|
export { _sfc_main as Selector };
|