@andyagent/ainorix-ui 0.1.0
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/CHANGELOG.md +7 -0
- package/README.md +219 -0
- package/dist/ainorix-ui.cjs +2 -0
- package/dist/ainorix-ui.cjs.map +1 -0
- package/dist/ainorix-ui.js +2065 -0
- package/dist/ainorix-ui.js.map +1 -0
- package/dist/components/AAccordion/AAccordion.types.d.ts +13 -0
- package/dist/components/AAccordion/AAccordion.types.d.ts.map +1 -0
- package/dist/components/AAccordion/AAccordion.vue.d.ts +20 -0
- package/dist/components/AAccordion/AAccordion.vue.d.ts.map +1 -0
- package/dist/components/AAccordion/index.d.ts +3 -0
- package/dist/components/AAccordion/index.d.ts.map +1 -0
- package/dist/components/AAlert/AAlert.types.d.ts +14 -0
- package/dist/components/AAlert/AAlert.types.d.ts.map +1 -0
- package/dist/components/AAlert/AAlert.vue.d.ts +27 -0
- package/dist/components/AAlert/AAlert.vue.d.ts.map +1 -0
- package/dist/components/AAlert/index.d.ts +3 -0
- package/dist/components/AAlert/index.d.ts.map +1 -0
- package/dist/components/AAvatar/AAvatar.types.d.ts +12 -0
- package/dist/components/AAvatar/AAvatar.types.d.ts.map +1 -0
- package/dist/components/AAvatar/AAvatar.vue.d.ts +9 -0
- package/dist/components/AAvatar/AAvatar.vue.d.ts.map +1 -0
- package/dist/components/AAvatar/index.d.ts +3 -0
- package/dist/components/AAvatar/index.d.ts.map +1 -0
- package/dist/components/AAvatarGroup/AAvatarGroup.types.d.ts +10 -0
- package/dist/components/AAvatarGroup/AAvatarGroup.types.d.ts.map +1 -0
- package/dist/components/AAvatarGroup/AAvatarGroup.vue.d.ts +7 -0
- package/dist/components/AAvatarGroup/AAvatarGroup.vue.d.ts.map +1 -0
- package/dist/components/AAvatarGroup/index.d.ts +3 -0
- package/dist/components/AAvatarGroup/index.d.ts.map +1 -0
- package/dist/components/ABadge/ABadge.types.d.ts +14 -0
- package/dist/components/ABadge/ABadge.types.d.ts.map +1 -0
- package/dist/components/ABadge/ABadge.vue.d.ts +23 -0
- package/dist/components/ABadge/ABadge.vue.d.ts.map +1 -0
- package/dist/components/ABadge/index.d.ts +3 -0
- package/dist/components/ABadge/index.d.ts.map +1 -0
- package/dist/components/ABanner/ABanner.types.d.ts +14 -0
- package/dist/components/ABanner/ABanner.types.d.ts.map +1 -0
- package/dist/components/ABanner/ABanner.vue.d.ts +28 -0
- package/dist/components/ABanner/ABanner.vue.d.ts.map +1 -0
- package/dist/components/ABanner/index.d.ts +3 -0
- package/dist/components/ABanner/index.d.ts.map +1 -0
- package/dist/components/ABreadcrumbs/ABreadcrumbs.types.d.ts +12 -0
- package/dist/components/ABreadcrumbs/ABreadcrumbs.types.d.ts.map +1 -0
- package/dist/components/ABreadcrumbs/ABreadcrumbs.vue.d.ts +6 -0
- package/dist/components/ABreadcrumbs/ABreadcrumbs.vue.d.ts.map +1 -0
- package/dist/components/ABreadcrumbs/index.d.ts +3 -0
- package/dist/components/ABreadcrumbs/index.d.ts.map +1 -0
- package/dist/components/AButton/AButton.types.d.ts +22 -0
- package/dist/components/AButton/AButton.types.d.ts.map +1 -0
- package/dist/components/AButton/AButton.vue.d.ts +32 -0
- package/dist/components/AButton/AButton.vue.d.ts.map +1 -0
- package/dist/components/AButton/index.d.ts +3 -0
- package/dist/components/AButton/index.d.ts.map +1 -0
- package/dist/components/ACard/ACard.types.d.ts +16 -0
- package/dist/components/ACard/ACard.types.d.ts.map +1 -0
- package/dist/components/ACard/ACard.vue.d.ts +23 -0
- package/dist/components/ACard/ACard.vue.d.ts.map +1 -0
- package/dist/components/ACard/index.d.ts +3 -0
- package/dist/components/ACard/index.d.ts.map +1 -0
- package/dist/components/AChartFrame/AChartFrame.types.d.ts +11 -0
- package/dist/components/AChartFrame/AChartFrame.types.d.ts.map +1 -0
- package/dist/components/AChartFrame/AChartFrame.vue.d.ts +19 -0
- package/dist/components/AChartFrame/AChartFrame.vue.d.ts.map +1 -0
- package/dist/components/AChartFrame/index.d.ts +3 -0
- package/dist/components/AChartFrame/index.d.ts.map +1 -0
- package/dist/components/ACheckbox/ACheckbox.types.d.ts +18 -0
- package/dist/components/ACheckbox/ACheckbox.types.d.ts.map +1 -0
- package/dist/components/ACheckbox/ACheckbox.vue.d.ts +33 -0
- package/dist/components/ACheckbox/ACheckbox.vue.d.ts.map +1 -0
- package/dist/components/ACheckbox/index.d.ts +3 -0
- package/dist/components/ACheckbox/index.d.ts.map +1 -0
- package/dist/components/ADrawer/ADrawer.types.d.ts +18 -0
- package/dist/components/ADrawer/ADrawer.types.d.ts.map +1 -0
- package/dist/components/ADrawer/ADrawer.vue.d.ts +31 -0
- package/dist/components/ADrawer/ADrawer.vue.d.ts.map +1 -0
- package/dist/components/ADrawer/index.d.ts +3 -0
- package/dist/components/ADrawer/index.d.ts.map +1 -0
- package/dist/components/AEmptyState/AEmptyState.types.d.ts +13 -0
- package/dist/components/AEmptyState/AEmptyState.types.d.ts.map +1 -0
- package/dist/components/AEmptyState/AEmptyState.vue.d.ts +23 -0
- package/dist/components/AEmptyState/AEmptyState.vue.d.ts.map +1 -0
- package/dist/components/AEmptyState/index.d.ts +3 -0
- package/dist/components/AEmptyState/index.d.ts.map +1 -0
- package/dist/components/AFileUpload/AFileUpload.types.d.ts +14 -0
- package/dist/components/AFileUpload/AFileUpload.types.d.ts.map +1 -0
- package/dist/components/AFileUpload/AFileUpload.vue.d.ts +12 -0
- package/dist/components/AFileUpload/AFileUpload.vue.d.ts.map +1 -0
- package/dist/components/AFileUpload/index.d.ts +3 -0
- package/dist/components/AFileUpload/index.d.ts.map +1 -0
- package/dist/components/AFormField/AFormField.types.d.ts +14 -0
- package/dist/components/AFormField/AFormField.types.d.ts.map +1 -0
- package/dist/components/AFormField/AFormField.vue.d.ts +21 -0
- package/dist/components/AFormField/AFormField.vue.d.ts.map +1 -0
- package/dist/components/AFormField/index.d.ts +3 -0
- package/dist/components/AFormField/index.d.ts.map +1 -0
- package/dist/components/AIcon/AIcon.types.d.ts +10 -0
- package/dist/components/AIcon/AIcon.types.d.ts.map +1 -0
- package/dist/components/AIcon/AIcon.vue.d.ts +6 -0
- package/dist/components/AIcon/AIcon.vue.d.ts.map +1 -0
- package/dist/components/AIcon/index.d.ts +3 -0
- package/dist/components/AIcon/index.d.ts.map +1 -0
- package/dist/components/AInput/AInput.types.d.ts +29 -0
- package/dist/components/AInput/AInput.types.d.ts.map +1 -0
- package/dist/components/AInput/AInput.vue.d.ts +32 -0
- package/dist/components/AInput/AInput.vue.d.ts.map +1 -0
- package/dist/components/AInput/index.d.ts +3 -0
- package/dist/components/AInput/index.d.ts.map +1 -0
- package/dist/components/AKpiCard/AKpiCard.types.d.ts +13 -0
- package/dist/components/AKpiCard/AKpiCard.types.d.ts.map +1 -0
- package/dist/components/AKpiCard/AKpiCard.vue.d.ts +21 -0
- package/dist/components/AKpiCard/AKpiCard.vue.d.ts.map +1 -0
- package/dist/components/AKpiCard/index.d.ts +3 -0
- package/dist/components/AKpiCard/index.d.ts.map +1 -0
- package/dist/components/AModal/AModal.types.d.ts +23 -0
- package/dist/components/AModal/AModal.types.d.ts.map +1 -0
- package/dist/components/AModal/AModal.vue.d.ts +38 -0
- package/dist/components/AModal/AModal.vue.d.ts.map +1 -0
- package/dist/components/AModal/index.d.ts +3 -0
- package/dist/components/AModal/index.d.ts.map +1 -0
- package/dist/components/ANumberInput/ANumberInput.types.d.ts +14 -0
- package/dist/components/ANumberInput/ANumberInput.types.d.ts.map +1 -0
- package/dist/components/ANumberInput/ANumberInput.vue.d.ts +12 -0
- package/dist/components/ANumberInput/ANumberInput.vue.d.ts.map +1 -0
- package/dist/components/ANumberInput/index.d.ts +3 -0
- package/dist/components/ANumberInput/index.d.ts.map +1 -0
- package/dist/components/APagination/APagination.types.d.ts +15 -0
- package/dist/components/APagination/APagination.types.d.ts.map +1 -0
- package/dist/components/APagination/APagination.vue.d.ts +16 -0
- package/dist/components/APagination/APagination.vue.d.ts.map +1 -0
- package/dist/components/APagination/index.d.ts +3 -0
- package/dist/components/APagination/index.d.ts.map +1 -0
- package/dist/components/APopover/APopover.types.d.ts +13 -0
- package/dist/components/APopover/APopover.types.d.ts.map +1 -0
- package/dist/components/APopover/APopover.vue.d.ts +26 -0
- package/dist/components/APopover/APopover.vue.d.ts.map +1 -0
- package/dist/components/APopover/index.d.ts +3 -0
- package/dist/components/APopover/index.d.ts.map +1 -0
- package/dist/components/AProgress/AProgress.types.d.ts +9 -0
- package/dist/components/AProgress/AProgress.types.d.ts.map +1 -0
- package/dist/components/AProgress/AProgress.vue.d.ts +6 -0
- package/dist/components/AProgress/AProgress.vue.d.ts.map +1 -0
- package/dist/components/AProgress/index.d.ts +3 -0
- package/dist/components/AProgress/index.d.ts.map +1 -0
- package/dist/components/ARadio/ARadio.types.d.ts +17 -0
- package/dist/components/ARadio/ARadio.types.d.ts.map +1 -0
- package/dist/components/ARadio/ARadio.vue.d.ts +11 -0
- package/dist/components/ARadio/ARadio.vue.d.ts.map +1 -0
- package/dist/components/ARadio/index.d.ts +3 -0
- package/dist/components/ARadio/index.d.ts.map +1 -0
- package/dist/components/ASegmented/ASegmented.types.d.ts +14 -0
- package/dist/components/ASegmented/ASegmented.types.d.ts.map +1 -0
- package/dist/components/ASegmented/ASegmented.vue.d.ts +10 -0
- package/dist/components/ASegmented/ASegmented.vue.d.ts.map +1 -0
- package/dist/components/ASegmented/index.d.ts +3 -0
- package/dist/components/ASegmented/index.d.ts.map +1 -0
- package/dist/components/ASelect/ASelect.types.d.ts +29 -0
- package/dist/components/ASelect/ASelect.types.d.ts.map +1 -0
- package/dist/components/ASelect/ASelect.vue.d.ts +24 -0
- package/dist/components/ASelect/ASelect.vue.d.ts.map +1 -0
- package/dist/components/ASelect/index.d.ts +3 -0
- package/dist/components/ASelect/index.d.ts.map +1 -0
- package/dist/components/ASidebarNav/ASidebarNav.types.d.ts +21 -0
- package/dist/components/ASidebarNav/ASidebarNav.types.d.ts.map +1 -0
- package/dist/components/ASidebarNav/ASidebarNav.vue.d.ts +10 -0
- package/dist/components/ASidebarNav/ASidebarNav.vue.d.ts.map +1 -0
- package/dist/components/ASidebarNav/index.d.ts +3 -0
- package/dist/components/ASidebarNav/index.d.ts.map +1 -0
- package/dist/components/ASkeleton/ASkeleton.types.d.ts +10 -0
- package/dist/components/ASkeleton/ASkeleton.types.d.ts.map +1 -0
- package/dist/components/ASkeleton/ASkeleton.vue.d.ts +8 -0
- package/dist/components/ASkeleton/ASkeleton.vue.d.ts.map +1 -0
- package/dist/components/ASkeleton/index.d.ts +3 -0
- package/dist/components/ASkeleton/index.d.ts.map +1 -0
- package/dist/components/ASlider/ASlider.types.d.ts +13 -0
- package/dist/components/ASlider/ASlider.types.d.ts.map +1 -0
- package/dist/components/ASlider/ASlider.vue.d.ts +14 -0
- package/dist/components/ASlider/ASlider.vue.d.ts.map +1 -0
- package/dist/components/ASlider/index.d.ts +3 -0
- package/dist/components/ASlider/index.d.ts.map +1 -0
- package/dist/components/ASpinner/ASpinner.types.d.ts +11 -0
- package/dist/components/ASpinner/ASpinner.types.d.ts.map +1 -0
- package/dist/components/ASpinner/ASpinner.vue.d.ts +8 -0
- package/dist/components/ASpinner/ASpinner.vue.d.ts.map +1 -0
- package/dist/components/ASpinner/index.d.ts +3 -0
- package/dist/components/ASpinner/index.d.ts.map +1 -0
- package/dist/components/AStatusPill/AStatusPill.types.d.ts +10 -0
- package/dist/components/AStatusPill/AStatusPill.types.d.ts.map +1 -0
- package/dist/components/AStatusPill/AStatusPill.vue.d.ts +21 -0
- package/dist/components/AStatusPill/AStatusPill.vue.d.ts.map +1 -0
- package/dist/components/AStatusPill/index.d.ts +3 -0
- package/dist/components/AStatusPill/index.d.ts.map +1 -0
- package/dist/components/AStepper/AStepper.types.d.ts +14 -0
- package/dist/components/AStepper/AStepper.types.d.ts.map +1 -0
- package/dist/components/AStepper/AStepper.vue.d.ts +8 -0
- package/dist/components/AStepper/AStepper.vue.d.ts.map +1 -0
- package/dist/components/AStepper/index.d.ts +3 -0
- package/dist/components/AStepper/index.d.ts.map +1 -0
- package/dist/components/ASwitch/ASwitch.types.d.ts +13 -0
- package/dist/components/ASwitch/ASwitch.types.d.ts.map +1 -0
- package/dist/components/ASwitch/ASwitch.vue.d.ts +26 -0
- package/dist/components/ASwitch/ASwitch.vue.d.ts.map +1 -0
- package/dist/components/ASwitch/index.d.ts +3 -0
- package/dist/components/ASwitch/index.d.ts.map +1 -0
- package/dist/components/ATable/ATable.types.d.ts +52 -0
- package/dist/components/ATable/ATable.types.d.ts.map +1 -0
- package/dist/components/ATable/ATable.vue.d.ts +59 -0
- package/dist/components/ATable/ATable.vue.d.ts.map +1 -0
- package/dist/components/ATable/index.d.ts +3 -0
- package/dist/components/ATable/index.d.ts.map +1 -0
- package/dist/components/ATabs/ATabs.types.d.ts +16 -0
- package/dist/components/ATabs/ATabs.types.d.ts.map +1 -0
- package/dist/components/ATabs/ATabs.vue.d.ts +11 -0
- package/dist/components/ATabs/ATabs.vue.d.ts.map +1 -0
- package/dist/components/ATabs/index.d.ts +3 -0
- package/dist/components/ATabs/index.d.ts.map +1 -0
- package/dist/components/ATag/ATag.types.d.ts +12 -0
- package/dist/components/ATag/ATag.types.d.ts.map +1 -0
- package/dist/components/ATag/ATag.vue.d.ts +26 -0
- package/dist/components/ATag/ATag.vue.d.ts.map +1 -0
- package/dist/components/ATag/index.d.ts +3 -0
- package/dist/components/ATag/index.d.ts.map +1 -0
- package/dist/components/ATimeline/ATimeline.types.d.ts +14 -0
- package/dist/components/ATimeline/ATimeline.types.d.ts.map +1 -0
- package/dist/components/ATimeline/ATimeline.vue.d.ts +6 -0
- package/dist/components/ATimeline/ATimeline.vue.d.ts.map +1 -0
- package/dist/components/ATimeline/index.d.ts +3 -0
- package/dist/components/ATimeline/index.d.ts.map +1 -0
- package/dist/components/AToast/AToast.types.d.ts +20 -0
- package/dist/components/AToast/AToast.types.d.ts.map +1 -0
- package/dist/components/AToast/AToast.vue.d.ts +13 -0
- package/dist/components/AToast/AToast.vue.d.ts.map +1 -0
- package/dist/components/AToast/AToastHost.vue.d.ts +10 -0
- package/dist/components/AToast/AToastHost.vue.d.ts.map +1 -0
- package/dist/components/AToast/index.d.ts +4 -0
- package/dist/components/AToast/index.d.ts.map +1 -0
- package/dist/components/ATooltip/ATooltip.types.d.ts +11 -0
- package/dist/components/ATooltip/ATooltip.types.d.ts.map +1 -0
- package/dist/components/ATooltip/ATooltip.vue.d.ts +21 -0
- package/dist/components/ATooltip/ATooltip.vue.d.ts.map +1 -0
- package/dist/components/ATooltip/index.d.ts +3 -0
- package/dist/components/ATooltip/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +40 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/index.d.ts.map +1 -0
- package/dist/composables/useDensity.d.ts +6 -0
- package/dist/composables/useDensity.d.ts.map +1 -0
- package/dist/composables/useDisclosure.d.ts +7 -0
- package/dist/composables/useDisclosure.d.ts.map +1 -0
- package/dist/composables/useTheme.d.ts +8 -0
- package/dist/composables/useTheme.d.ts.map +1 -0
- package/dist/composables/useToast.d.ts +34 -0
- package/dist/composables/useToast.d.ts.map +1 -0
- package/dist/directives/focus.d.ts +3 -0
- package/dist/directives/focus.d.ts.map +1 -0
- package/dist/directives/index.d.ts +2 -0
- package/dist/directives/index.d.ts.map +1 -0
- package/dist/icons/CheckIcon.d.ts +7 -0
- package/dist/icons/CheckIcon.d.ts.map +1 -0
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/plugin.d.ts +877 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/styles/entry.d.ts +1 -0
- package/dist/styles/entry.d.ts.map +1 -0
- package/dist/styles.cjs +2 -0
- package/dist/styles.cjs.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/styles.d.ts +1 -0
- package/dist/styles.js +2 -0
- package/dist/styles.js.map +1 -0
- package/dist/tokens/index.d.ts +3 -0
- package/dist/tokens/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/chartTheme.d.ts +9 -0
- package/dist/utils/chartTheme.d.ts.map +1 -0
- package/dist/utils/id.d.ts +2 -0
- package/dist/utils/id.d.ts.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,2065 @@
|
|
|
1
|
+
import { defineComponent as b, openBlock as a, createElementBlock as n, createElementVNode as i, toDisplayString as u, createCommentVNode as c, useSlots as ke, computed as k, createBlock as E, renderSlot as g, unref as W, createTextVNode as T, ref as x, watch as X, onBeforeUnmount as de, Teleport as ie, normalizeStyle as j, withDirectives as Fe, withModifiers as F, vModelText as Ze, Fragment as C, renderList as L, nextTick as Ae, onMounted as we, readonly as Ne, createVNode as R, withCtx as O, withKeys as ae, mergeProps as He, h as _e } from "vue";
|
|
2
|
+
const Ue = {
|
|
3
|
+
mounted(e, l) {
|
|
4
|
+
l.value !== !1 && e.focus();
|
|
5
|
+
}
|
|
6
|
+
}, Oe = ["data-size", "data-tone", "aria-label"], qe = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "spinner__label"
|
|
9
|
+
}, je = /* @__PURE__ */ b({
|
|
10
|
+
name: "ASpinner",
|
|
11
|
+
__name: "ASpinner",
|
|
12
|
+
props: {
|
|
13
|
+
size: { default: "md" },
|
|
14
|
+
tone: { default: "accent" },
|
|
15
|
+
label: { default: "Loading" }
|
|
16
|
+
},
|
|
17
|
+
setup(e) {
|
|
18
|
+
return (l, t) => (a(), n("span", {
|
|
19
|
+
class: "spinner",
|
|
20
|
+
"data-size": e.size,
|
|
21
|
+
"data-tone": e.tone,
|
|
22
|
+
role: "status",
|
|
23
|
+
"aria-label": e.label
|
|
24
|
+
}, [
|
|
25
|
+
t[0] || (t[0] = i("span", {
|
|
26
|
+
class: "spinner__track",
|
|
27
|
+
"aria-hidden": "true"
|
|
28
|
+
}, null, -1)),
|
|
29
|
+
e.label ? (a(), n("span", qe, u(e.label), 1)) : c("", !0)
|
|
30
|
+
], 8, Oe));
|
|
31
|
+
}
|
|
32
|
+
}), p = (e, l) => {
|
|
33
|
+
const t = e.__vccOpts || e;
|
|
34
|
+
for (const [s, o] of l)
|
|
35
|
+
t[s] = o;
|
|
36
|
+
return t;
|
|
37
|
+
}, xe = /* @__PURE__ */ p(je, [["__scopeId", "data-v-13d7a269"]]), Ge = ["type", "data-variant", "data-size", "data-block", "data-icon-only", "aria-label", "disabled"], We = /* @__PURE__ */ b({
|
|
38
|
+
name: "AButton",
|
|
39
|
+
__name: "AButton",
|
|
40
|
+
props: {
|
|
41
|
+
variant: { default: "primary" },
|
|
42
|
+
size: { default: "md" },
|
|
43
|
+
type: { default: "button" },
|
|
44
|
+
disabled: { type: Boolean, default: !1 },
|
|
45
|
+
loading: { type: Boolean, default: !1 },
|
|
46
|
+
block: { type: Boolean, default: !1 },
|
|
47
|
+
ariaLabel: {}
|
|
48
|
+
},
|
|
49
|
+
emits: ["click"],
|
|
50
|
+
setup(e, { emit: l }) {
|
|
51
|
+
const t = e, s = l, o = ke(), d = k(() => !!(t.ariaLabel && !o.default && (o["icon-left"] || o["icon-right"])));
|
|
52
|
+
return (f, r) => (a(), n("button", {
|
|
53
|
+
class: "btn",
|
|
54
|
+
type: e.type,
|
|
55
|
+
"data-variant": e.variant,
|
|
56
|
+
"data-size": e.size,
|
|
57
|
+
"data-block": e.block || null,
|
|
58
|
+
"data-icon-only": d.value || null,
|
|
59
|
+
"aria-label": e.ariaLabel,
|
|
60
|
+
disabled: e.disabled || e.loading,
|
|
61
|
+
onClick: r[0] || (r[0] = (m) => s("click", m))
|
|
62
|
+
}, [
|
|
63
|
+
e.loading ? (a(), E(xe, {
|
|
64
|
+
key: 0,
|
|
65
|
+
size: e.size === "sm" ? "sm" : "md",
|
|
66
|
+
tone: "onaccent"
|
|
67
|
+
}, null, 8, ["size"])) : c("", !0),
|
|
68
|
+
g(f.$slots, "icon-left", {}, void 0, !0),
|
|
69
|
+
g(f.$slots, "default", {}, void 0, !0),
|
|
70
|
+
g(f.$slots, "icon-right", {}, void 0, !0)
|
|
71
|
+
], 8, Ge));
|
|
72
|
+
}
|
|
73
|
+
}), le = /* @__PURE__ */ p(We, [["__scopeId", "data-v-75aa3c53"]]), Je = ["data-size", "data-disabled", "data-error"], Qe = ["for"], Xe = { class: "field__control" }, Ye = {
|
|
74
|
+
key: 0,
|
|
75
|
+
class: "field__icon"
|
|
76
|
+
}, et = ["id", "value", "type", "name", "placeholder", "disabled", "readonly", "autocomplete", "aria-invalid"], tt = {
|
|
77
|
+
key: 1,
|
|
78
|
+
class: "field__msg field__msg--error"
|
|
79
|
+
}, at = {
|
|
80
|
+
key: 2,
|
|
81
|
+
class: "field__msg"
|
|
82
|
+
}, lt = /* @__PURE__ */ b({
|
|
83
|
+
name: "AInput",
|
|
84
|
+
__name: "AInput",
|
|
85
|
+
props: {
|
|
86
|
+
id: {},
|
|
87
|
+
modelValue: { default: "" },
|
|
88
|
+
type: { default: "text" },
|
|
89
|
+
label: {},
|
|
90
|
+
helper: {},
|
|
91
|
+
error: { type: [Boolean, String], default: !1 },
|
|
92
|
+
placeholder: {},
|
|
93
|
+
disabled: { type: Boolean, default: !1 },
|
|
94
|
+
readonly: { type: Boolean, default: !1 },
|
|
95
|
+
size: { default: "md" },
|
|
96
|
+
name: {},
|
|
97
|
+
autocomplete: {}
|
|
98
|
+
},
|
|
99
|
+
emits: ["update:modelValue"],
|
|
100
|
+
setup(e, { emit: l }) {
|
|
101
|
+
const t = e, s = l, o = ke(), d = k(() => t.error !== !1 && t.error != null && t.error !== ""), f = k(() => typeof t.error == "string" ? t.error : "");
|
|
102
|
+
return (r, m) => (a(), n("div", {
|
|
103
|
+
class: "field",
|
|
104
|
+
"data-size": e.size,
|
|
105
|
+
"data-disabled": e.disabled || null,
|
|
106
|
+
"data-error": d.value || null
|
|
107
|
+
}, [
|
|
108
|
+
e.label ? (a(), n("label", {
|
|
109
|
+
key: 0,
|
|
110
|
+
class: "field__label",
|
|
111
|
+
for: e.id
|
|
112
|
+
}, u(e.label), 9, Qe)) : c("", !0),
|
|
113
|
+
i("div", Xe, [
|
|
114
|
+
W(o)["icon-left"] ? (a(), n("span", Ye, [
|
|
115
|
+
g(r.$slots, "icon-left", {}, void 0, !0)
|
|
116
|
+
])) : c("", !0),
|
|
117
|
+
g(r.$slots, "addon-before", {}, void 0, !0),
|
|
118
|
+
i("input", {
|
|
119
|
+
id: e.id,
|
|
120
|
+
class: "field__input",
|
|
121
|
+
value: e.modelValue,
|
|
122
|
+
type: e.type,
|
|
123
|
+
name: e.name,
|
|
124
|
+
placeholder: e.placeholder,
|
|
125
|
+
disabled: e.disabled,
|
|
126
|
+
readonly: e.readonly,
|
|
127
|
+
autocomplete: e.autocomplete,
|
|
128
|
+
"aria-invalid": d.value || void 0,
|
|
129
|
+
onInput: m[0] || (m[0] = ($) => s("update:modelValue", $.target.value))
|
|
130
|
+
}, null, 40, et),
|
|
131
|
+
g(r.$slots, "addon-after", {}, void 0, !0)
|
|
132
|
+
]),
|
|
133
|
+
f.value ? (a(), n("p", tt, u(f.value), 1)) : e.helper ? (a(), n("p", at, u(e.helper), 1)) : c("", !0)
|
|
134
|
+
], 8, Je));
|
|
135
|
+
}
|
|
136
|
+
}), Ve = /* @__PURE__ */ p(lt, [["__scopeId", "data-v-9b5286f3"]]), nt = { class: "a-form-field" }, st = ["for"], ot = {
|
|
137
|
+
key: 0,
|
|
138
|
+
"aria-hidden": "true"
|
|
139
|
+
}, dt = {
|
|
140
|
+
key: 1,
|
|
141
|
+
class: "a-form-field__message a-form-field__message--error"
|
|
142
|
+
}, it = {
|
|
143
|
+
key: 2,
|
|
144
|
+
class: "a-form-field__message"
|
|
145
|
+
}, ut = /* @__PURE__ */ b({
|
|
146
|
+
name: "AFormField",
|
|
147
|
+
__name: "AFormField",
|
|
148
|
+
props: {
|
|
149
|
+
id: {},
|
|
150
|
+
label: {},
|
|
151
|
+
hint: {},
|
|
152
|
+
error: {},
|
|
153
|
+
required: { type: Boolean, default: !1 }
|
|
154
|
+
},
|
|
155
|
+
setup(e) {
|
|
156
|
+
return (l, t) => (a(), n("div", nt, [
|
|
157
|
+
e.label ? (a(), n("label", {
|
|
158
|
+
key: 0,
|
|
159
|
+
class: "a-form-field__label",
|
|
160
|
+
for: e.id
|
|
161
|
+
}, [
|
|
162
|
+
T(u(e.label) + " ", 1),
|
|
163
|
+
e.required ? (a(), n("span", ot, "*")) : c("", !0)
|
|
164
|
+
], 8, st)) : c("", !0),
|
|
165
|
+
g(l.$slots, "default"),
|
|
166
|
+
e.error ? (a(), n("p", dt, u(e.error), 1)) : e.hint ? (a(), n("p", it, u(e.hint), 1)) : c("", !0)
|
|
167
|
+
]));
|
|
168
|
+
}
|
|
169
|
+
}), rt = ["data-size", "data-disabled", "data-error"], ct = ["for"], ft = ["id", "aria-labelledby", "aria-expanded", "aria-invalid", "disabled"], mt = ["data-placeholder"], vt = ["placeholder"], ht = ["aria-activedescendant"], bt = ["id", "data-active", "data-selected", "data-disabled", "aria-selected", "onMouseenter", "onMousedown"], _t = {
|
|
170
|
+
key: 0,
|
|
171
|
+
"aria-hidden": "true"
|
|
172
|
+
}, pt = {
|
|
173
|
+
key: 0,
|
|
174
|
+
class: "select-menu__empty"
|
|
175
|
+
}, yt = ["name", "value"], $t = {
|
|
176
|
+
key: 2,
|
|
177
|
+
class: "select-field__msg select-field__msg--error"
|
|
178
|
+
}, gt = {
|
|
179
|
+
key: 3,
|
|
180
|
+
class: "select-field__msg"
|
|
181
|
+
}, kt = /* @__PURE__ */ b({
|
|
182
|
+
name: "ASelect",
|
|
183
|
+
__name: "ASelect",
|
|
184
|
+
props: {
|
|
185
|
+
id: {},
|
|
186
|
+
modelValue: {},
|
|
187
|
+
options: { default: () => [] },
|
|
188
|
+
placeholder: {},
|
|
189
|
+
disabled: { type: Boolean, default: !1 },
|
|
190
|
+
error: { type: [Boolean, String], default: !1 },
|
|
191
|
+
label: {},
|
|
192
|
+
helper: {},
|
|
193
|
+
size: { default: "md" },
|
|
194
|
+
name: {},
|
|
195
|
+
searchable: { type: Boolean, default: void 0 },
|
|
196
|
+
searchPlaceholder: { default: "Search" },
|
|
197
|
+
emptyText: { default: "No options" },
|
|
198
|
+
defaultLabel: { default: "Select option" }
|
|
199
|
+
},
|
|
200
|
+
emits: ["update:modelValue", "change"],
|
|
201
|
+
setup(e, { emit: l }) {
|
|
202
|
+
const t = e, s = l, o = Math.random().toString(36).slice(2), d = k(() => t.id || `a-select-${o}`), f = `a-select-label-${o}`, r = `a-select-listbox-${o}`, m = x(), $ = x(), I = x(), P = x(), _ = x(!1), S = x(""), M = x(0), K = x({}), Z = k(() => t.error !== !1 && t.error != null && t.error !== ""), A = k(() => typeof t.error == "string" ? t.error : ""), y = k(() => t.searchable ?? t.options.length > 7), h = k(() => t.options.find((v) => v.value === t.modelValue)), V = k(() => {
|
|
203
|
+
const v = S.value.trim().toLowerCase();
|
|
204
|
+
return v ? t.options.filter((w) => w.label.toLowerCase().includes(v)) : t.options;
|
|
205
|
+
}), B = k(() => _.value && V.value[M.value] ? ee(M.value) : void 0);
|
|
206
|
+
function ee(v) {
|
|
207
|
+
return `a-select-option-${o}-${v}`;
|
|
208
|
+
}
|
|
209
|
+
function me() {
|
|
210
|
+
var w;
|
|
211
|
+
const v = (w = $.value) == null ? void 0 : w.getBoundingClientRect();
|
|
212
|
+
v && (K.value = {
|
|
213
|
+
position: "fixed",
|
|
214
|
+
top: `${v.bottom + 6}px`,
|
|
215
|
+
left: `${v.left}px`,
|
|
216
|
+
width: `${v.width}px`
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
async function ve() {
|
|
220
|
+
var v;
|
|
221
|
+
t.disabled || (_.value = !0, S.value = "", M.value = Math.max(0, t.options.findIndex((w) => w.value === t.modelValue)), await Ae(), me(), y.value && ((v = P.value) == null || v.focus()));
|
|
222
|
+
}
|
|
223
|
+
function G({ focusTrigger: v = !1 } = {}) {
|
|
224
|
+
var w;
|
|
225
|
+
_.value = !1, v && ((w = $.value) == null || w.focus());
|
|
226
|
+
}
|
|
227
|
+
function Ee() {
|
|
228
|
+
_.value ? G() : ve();
|
|
229
|
+
}
|
|
230
|
+
function he(v) {
|
|
231
|
+
v.disabled || (s("update:modelValue", v.value), s("change", v.value), G({ focusTrigger: !0 }));
|
|
232
|
+
}
|
|
233
|
+
function J(v) {
|
|
234
|
+
var z;
|
|
235
|
+
const w = V.value;
|
|
236
|
+
if (w.length === 0) return;
|
|
237
|
+
let D = M.value;
|
|
238
|
+
for (let H = 0; H < w.length && (D = (D + v + w.length) % w.length, !!((z = w[D]) != null && z.disabled)); H += 1)
|
|
239
|
+
;
|
|
240
|
+
M.value = D;
|
|
241
|
+
}
|
|
242
|
+
function be() {
|
|
243
|
+
const v = V.value[M.value];
|
|
244
|
+
v && he(v);
|
|
245
|
+
}
|
|
246
|
+
function De(v) {
|
|
247
|
+
["ArrowDown", "ArrowUp", "Enter", " "].includes(v.key) && (v.preventDefault(), _.value ? v.key === "ArrowDown" ? J(1) : v.key === "ArrowUp" ? J(-1) : be() : ve());
|
|
248
|
+
}
|
|
249
|
+
function Ke(v) {
|
|
250
|
+
v.key === "Escape" && (v.preventDefault(), G({ focusTrigger: !0 }));
|
|
251
|
+
}
|
|
252
|
+
function Pe(v) {
|
|
253
|
+
v.key === "ArrowDown" ? (v.preventDefault(), J(1)) : v.key === "ArrowUp" ? (v.preventDefault(), J(-1)) : v.key === "Enter" ? (v.preventDefault(), be()) : v.key === "Escape" && G({ focusTrigger: !0 });
|
|
254
|
+
}
|
|
255
|
+
function te(v) {
|
|
256
|
+
var D, z;
|
|
257
|
+
const w = v.target;
|
|
258
|
+
(D = m.value) != null && D.contains(w) || (z = I.value) != null && z.contains(w) || G();
|
|
259
|
+
}
|
|
260
|
+
function N() {
|
|
261
|
+
_.value && me();
|
|
262
|
+
}
|
|
263
|
+
return X(_, (v) => {
|
|
264
|
+
typeof document > "u" || typeof window > "u" || (v ? (document.addEventListener("pointerdown", te), window.addEventListener("resize", N), window.addEventListener("scroll", N, !0)) : (document.removeEventListener("pointerdown", te), window.removeEventListener("resize", N), window.removeEventListener("scroll", N, !0)));
|
|
265
|
+
}), X(V, () => {
|
|
266
|
+
M.value = Math.min(M.value, Math.max(0, V.value.length - 1));
|
|
267
|
+
}), de(() => {
|
|
268
|
+
typeof document > "u" || typeof window > "u" || (document.removeEventListener("pointerdown", te), window.removeEventListener("resize", N), window.removeEventListener("scroll", N, !0));
|
|
269
|
+
}), (v, w) => {
|
|
270
|
+
var D;
|
|
271
|
+
return a(), n("div", {
|
|
272
|
+
ref_key: "rootRef",
|
|
273
|
+
ref: m,
|
|
274
|
+
class: "select-field",
|
|
275
|
+
"data-size": e.size,
|
|
276
|
+
"data-disabled": e.disabled || null,
|
|
277
|
+
"data-error": Z.value || null
|
|
278
|
+
}, [
|
|
279
|
+
e.label ? (a(), n("label", {
|
|
280
|
+
key: 0,
|
|
281
|
+
class: "select-field__label",
|
|
282
|
+
id: f,
|
|
283
|
+
for: d.value
|
|
284
|
+
}, u(e.label), 9, ct)) : c("", !0),
|
|
285
|
+
i("button", {
|
|
286
|
+
id: d.value,
|
|
287
|
+
ref_key: "triggerRef",
|
|
288
|
+
ref: $,
|
|
289
|
+
class: "select-field__trigger",
|
|
290
|
+
type: "button",
|
|
291
|
+
role: "combobox",
|
|
292
|
+
"aria-labelledby": e.label ? f : void 0,
|
|
293
|
+
"aria-controls": r,
|
|
294
|
+
"aria-expanded": _.value,
|
|
295
|
+
"aria-haspopup": "listbox",
|
|
296
|
+
"aria-invalid": Z.value || void 0,
|
|
297
|
+
disabled: e.disabled,
|
|
298
|
+
onClick: Ee,
|
|
299
|
+
onKeydown: De
|
|
300
|
+
}, [
|
|
301
|
+
i("span", {
|
|
302
|
+
class: "select-field__value",
|
|
303
|
+
"data-placeholder": !h.value || null
|
|
304
|
+
}, u(((D = h.value) == null ? void 0 : D.label) || e.placeholder || e.defaultLabel), 9, mt),
|
|
305
|
+
w[1] || (w[1] = i("span", {
|
|
306
|
+
class: "select-field__chevron",
|
|
307
|
+
"aria-hidden": "true"
|
|
308
|
+
}, "v", -1))
|
|
309
|
+
], 40, ft),
|
|
310
|
+
(a(), E(ie, { to: "body" }, [
|
|
311
|
+
_.value ? (a(), n("div", {
|
|
312
|
+
key: 0,
|
|
313
|
+
ref_key: "panelRef",
|
|
314
|
+
ref: I,
|
|
315
|
+
class: "select-menu",
|
|
316
|
+
style: j(K.value),
|
|
317
|
+
onKeydown: Ke
|
|
318
|
+
}, [
|
|
319
|
+
y.value ? Fe((a(), n("input", {
|
|
320
|
+
key: 0,
|
|
321
|
+
ref_key: "searchRef",
|
|
322
|
+
ref: P,
|
|
323
|
+
"onUpdate:modelValue": w[0] || (w[0] = (z) => S.value = z),
|
|
324
|
+
class: "select-menu__search",
|
|
325
|
+
type: "search",
|
|
326
|
+
placeholder: e.searchPlaceholder,
|
|
327
|
+
onKeydown: F(Pe, ["stop"])
|
|
328
|
+
}, null, 40, vt)), [
|
|
329
|
+
[Ze, S.value]
|
|
330
|
+
]) : c("", !0),
|
|
331
|
+
i("ul", {
|
|
332
|
+
id: r,
|
|
333
|
+
class: "select-menu__list",
|
|
334
|
+
role: "listbox",
|
|
335
|
+
"aria-activedescendant": B.value
|
|
336
|
+
}, [
|
|
337
|
+
(a(!0), n(C, null, L(V.value, (z, H) => (a(), n("li", {
|
|
338
|
+
id: ee(H),
|
|
339
|
+
key: z.value,
|
|
340
|
+
class: "select-menu__item",
|
|
341
|
+
"data-active": H === M.value || null,
|
|
342
|
+
"data-selected": z.value === e.modelValue || null,
|
|
343
|
+
"data-disabled": z.disabled || null,
|
|
344
|
+
role: "option",
|
|
345
|
+
"aria-selected": z.value === e.modelValue,
|
|
346
|
+
onMouseenter: (Re) => M.value = H,
|
|
347
|
+
onMousedown: F((Re) => he(z), ["prevent"])
|
|
348
|
+
}, [
|
|
349
|
+
i("span", null, u(z.label), 1),
|
|
350
|
+
z.value === e.modelValue ? (a(), n("span", _t, "✓")) : c("", !0)
|
|
351
|
+
], 40, bt))), 128)),
|
|
352
|
+
V.value.length === 0 ? (a(), n("li", pt, u(e.emptyText), 1)) : c("", !0)
|
|
353
|
+
], 8, ht)
|
|
354
|
+
], 36)) : c("", !0)
|
|
355
|
+
])),
|
|
356
|
+
e.name ? (a(), n("input", {
|
|
357
|
+
key: 1,
|
|
358
|
+
type: "hidden",
|
|
359
|
+
name: e.name,
|
|
360
|
+
value: e.modelValue
|
|
361
|
+
}, null, 8, yt)) : c("", !0),
|
|
362
|
+
A.value ? (a(), n("p", $t, u(A.value), 1)) : e.helper ? (a(), n("p", gt, u(e.helper), 1)) : c("", !0)
|
|
363
|
+
], 8, rt);
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
}), At = /* @__PURE__ */ p(kt, [["__scopeId", "data-v-79407171"]]), wt = ["data-disabled", "data-error"], xt = ["id", "checked", "disabled", "name", "aria-label", "aria-invalid"], Vt = {
|
|
367
|
+
key: 0,
|
|
368
|
+
class: "checkbox__label"
|
|
369
|
+
}, St = /* @__PURE__ */ b({
|
|
370
|
+
name: "ACheckbox",
|
|
371
|
+
__name: "ACheckbox",
|
|
372
|
+
props: {
|
|
373
|
+
id: {},
|
|
374
|
+
modelValue: { type: Boolean, default: !1 },
|
|
375
|
+
indeterminate: { type: Boolean, default: !1 },
|
|
376
|
+
label: {},
|
|
377
|
+
ariaLabel: { default: void 0 },
|
|
378
|
+
disabled: { type: Boolean, default: !1 },
|
|
379
|
+
error: { type: Boolean, default: !1 },
|
|
380
|
+
name: {}
|
|
381
|
+
},
|
|
382
|
+
emits: ["update:modelValue"],
|
|
383
|
+
setup(e, { emit: l }) {
|
|
384
|
+
const t = e, s = l, o = x();
|
|
385
|
+
function d() {
|
|
386
|
+
o.value && (o.value.indeterminate = t.indeterminate);
|
|
387
|
+
}
|
|
388
|
+
return we(d), X(() => t.indeterminate, d), (f, r) => (a(), n("label", {
|
|
389
|
+
class: "checkbox",
|
|
390
|
+
"data-disabled": e.disabled || null,
|
|
391
|
+
"data-error": e.error || null
|
|
392
|
+
}, [
|
|
393
|
+
i("input", {
|
|
394
|
+
id: e.id,
|
|
395
|
+
ref_key: "inputRef",
|
|
396
|
+
ref: o,
|
|
397
|
+
class: "checkbox__input",
|
|
398
|
+
type: "checkbox",
|
|
399
|
+
checked: e.modelValue,
|
|
400
|
+
disabled: e.disabled,
|
|
401
|
+
name: e.name,
|
|
402
|
+
"aria-label": e.ariaLabel,
|
|
403
|
+
"aria-invalid": e.error || void 0,
|
|
404
|
+
onChange: r[0] || (r[0] = (m) => s("update:modelValue", m.target.checked))
|
|
405
|
+
}, null, 40, xt),
|
|
406
|
+
r[1] || (r[1] = i("span", {
|
|
407
|
+
class: "checkbox__box",
|
|
408
|
+
"aria-hidden": "true"
|
|
409
|
+
}, null, -1)),
|
|
410
|
+
e.label || f.$slots.default ? (a(), n("span", Vt, [
|
|
411
|
+
g(f.$slots, "default", {}, () => [
|
|
412
|
+
T(u(e.label), 1)
|
|
413
|
+
], !0)
|
|
414
|
+
])) : c("", !0)
|
|
415
|
+
], 8, wt));
|
|
416
|
+
}
|
|
417
|
+
}), ne = /* @__PURE__ */ p(St, [["__scopeId", "data-v-d7670f70"]]), Mt = ["data-disabled"], It = ["name", "value", "checked", "disabled", "onChange"], Ct = /* @__PURE__ */ b({
|
|
418
|
+
name: "ARadio",
|
|
419
|
+
__name: "ARadio",
|
|
420
|
+
props: {
|
|
421
|
+
modelValue: {},
|
|
422
|
+
options: { default: () => [] },
|
|
423
|
+
name: {},
|
|
424
|
+
disabled: { type: Boolean, default: !1 }
|
|
425
|
+
},
|
|
426
|
+
emits: ["update:modelValue"],
|
|
427
|
+
setup(e, { emit: l }) {
|
|
428
|
+
const t = l;
|
|
429
|
+
return (s, o) => (a(), n("div", {
|
|
430
|
+
class: "radio-group",
|
|
431
|
+
role: "radiogroup",
|
|
432
|
+
"data-disabled": e.disabled || null
|
|
433
|
+
}, [
|
|
434
|
+
(a(!0), n(C, null, L(e.options, (d) => (a(), n("label", {
|
|
435
|
+
key: d.value,
|
|
436
|
+
class: "radio"
|
|
437
|
+
}, [
|
|
438
|
+
i("input", {
|
|
439
|
+
class: "radio__input",
|
|
440
|
+
type: "radio",
|
|
441
|
+
name: e.name,
|
|
442
|
+
value: d.value,
|
|
443
|
+
checked: e.modelValue === d.value,
|
|
444
|
+
disabled: e.disabled || d.disabled,
|
|
445
|
+
onChange: (f) => t("update:modelValue", d.value)
|
|
446
|
+
}, null, 40, It),
|
|
447
|
+
o[0] || (o[0] = i("span", {
|
|
448
|
+
class: "radio__mark",
|
|
449
|
+
"aria-hidden": "true"
|
|
450
|
+
}, null, -1)),
|
|
451
|
+
i("span", null, u(d.label), 1)
|
|
452
|
+
]))), 128))
|
|
453
|
+
], 8, Mt));
|
|
454
|
+
}
|
|
455
|
+
}), Lt = /* @__PURE__ */ p(Ct, [["__scopeId", "data-v-4fe0cf76"]]), Bt = ["data-disabled"], zt = ["checked", "disabled"], Tt = { key: 0 }, Et = /* @__PURE__ */ b({
|
|
456
|
+
name: "ASwitch",
|
|
457
|
+
__name: "ASwitch",
|
|
458
|
+
props: {
|
|
459
|
+
modelValue: { type: Boolean, default: !1 },
|
|
460
|
+
disabled: { type: Boolean, default: !1 },
|
|
461
|
+
label: {}
|
|
462
|
+
},
|
|
463
|
+
emits: ["update:modelValue"],
|
|
464
|
+
setup(e, { emit: l }) {
|
|
465
|
+
const t = l;
|
|
466
|
+
return (s, o) => (a(), n("label", {
|
|
467
|
+
class: "switch",
|
|
468
|
+
"data-disabled": e.disabled || null
|
|
469
|
+
}, [
|
|
470
|
+
i("input", {
|
|
471
|
+
class: "switch__input",
|
|
472
|
+
type: "checkbox",
|
|
473
|
+
checked: e.modelValue,
|
|
474
|
+
disabled: e.disabled,
|
|
475
|
+
onChange: o[0] || (o[0] = (d) => t("update:modelValue", d.target.checked))
|
|
476
|
+
}, null, 40, zt),
|
|
477
|
+
o[1] || (o[1] = i("span", {
|
|
478
|
+
class: "switch__track",
|
|
479
|
+
"aria-hidden": "true"
|
|
480
|
+
}, [
|
|
481
|
+
i("span", { class: "switch__knob" })
|
|
482
|
+
], -1)),
|
|
483
|
+
e.label || s.$slots.default ? (a(), n("span", Tt, [
|
|
484
|
+
g(s.$slots, "default", {}, () => [
|
|
485
|
+
T(u(e.label), 1)
|
|
486
|
+
], !0)
|
|
487
|
+
])) : c("", !0)
|
|
488
|
+
], 8, Bt));
|
|
489
|
+
}
|
|
490
|
+
}), Dt = /* @__PURE__ */ p(Et, [["__scopeId", "data-v-a2c1b137"]]), Kt = {
|
|
491
|
+
class: "segmented",
|
|
492
|
+
role: "group"
|
|
493
|
+
}, Pt = ["data-active", "onClick"], Rt = /* @__PURE__ */ b({
|
|
494
|
+
name: "ASegmented",
|
|
495
|
+
__name: "ASegmented",
|
|
496
|
+
props: {
|
|
497
|
+
modelValue: {},
|
|
498
|
+
options: { default: () => [] }
|
|
499
|
+
},
|
|
500
|
+
emits: ["update:modelValue"],
|
|
501
|
+
setup(e, { emit: l }) {
|
|
502
|
+
const t = l;
|
|
503
|
+
return (s, o) => (a(), n("div", Kt, [
|
|
504
|
+
(a(!0), n(C, null, L(e.options, (d) => (a(), n("button", {
|
|
505
|
+
key: d.value,
|
|
506
|
+
class: "segmented__item",
|
|
507
|
+
type: "button",
|
|
508
|
+
"data-active": e.modelValue === d.value || null,
|
|
509
|
+
onClick: (f) => t("update:modelValue", d.value)
|
|
510
|
+
}, u(d.label), 9, Pt))), 128))
|
|
511
|
+
]));
|
|
512
|
+
}
|
|
513
|
+
}), Ft = /* @__PURE__ */ p(Rt, [["__scopeId", "data-v-7ce1d517"]]), Zt = ["value", "min", "max", "step", "disabled"], Nt = /* @__PURE__ */ b({
|
|
514
|
+
name: "ASlider",
|
|
515
|
+
__name: "ASlider",
|
|
516
|
+
props: {
|
|
517
|
+
modelValue: { default: 0 },
|
|
518
|
+
min: { default: 0 },
|
|
519
|
+
max: { default: 100 },
|
|
520
|
+
step: { default: 1 },
|
|
521
|
+
disabled: { type: Boolean, default: !1 }
|
|
522
|
+
},
|
|
523
|
+
emits: ["update:modelValue"],
|
|
524
|
+
setup(e, { emit: l }) {
|
|
525
|
+
const t = l;
|
|
526
|
+
return (s, o) => (a(), n("input", {
|
|
527
|
+
class: "slider",
|
|
528
|
+
type: "range",
|
|
529
|
+
value: e.modelValue,
|
|
530
|
+
min: e.min,
|
|
531
|
+
max: e.max,
|
|
532
|
+
step: e.step,
|
|
533
|
+
disabled: e.disabled,
|
|
534
|
+
onInput: o[0] || (o[0] = (d) => t("update:modelValue", Number(d.target.value)))
|
|
535
|
+
}, null, 40, Zt));
|
|
536
|
+
}
|
|
537
|
+
}), Ht = /* @__PURE__ */ p(Nt, [["__scopeId", "data-v-ef3d52a8"]]), Ut = ["data-size", "data-tone", "aria-label"], Ot = {
|
|
538
|
+
key: 0,
|
|
539
|
+
class: "modal__header"
|
|
540
|
+
}, qt = {
|
|
541
|
+
key: 0,
|
|
542
|
+
class: "modal__tone",
|
|
543
|
+
"aria-hidden": "true"
|
|
544
|
+
}, jt = { class: "modal__title" }, Gt = ["aria-label"], Wt = { class: "modal__body" }, Jt = {
|
|
545
|
+
key: 1,
|
|
546
|
+
class: "modal__footer"
|
|
547
|
+
}, Qt = /* @__PURE__ */ b({
|
|
548
|
+
name: "AModal",
|
|
549
|
+
__name: "AModal",
|
|
550
|
+
props: {
|
|
551
|
+
modelValue: { type: Boolean, default: !1 },
|
|
552
|
+
title: {},
|
|
553
|
+
size: { default: "md" },
|
|
554
|
+
tone: { default: "neutral" },
|
|
555
|
+
closeOnBackdrop: { type: Boolean, default: !0 },
|
|
556
|
+
closeOnEsc: { type: Boolean, default: !0 },
|
|
557
|
+
initialFocus: {},
|
|
558
|
+
closeLabel: { default: "Close" }
|
|
559
|
+
},
|
|
560
|
+
emits: ["update:modelValue", "close"],
|
|
561
|
+
setup(e, { emit: l }) {
|
|
562
|
+
const t = e, s = l, o = x();
|
|
563
|
+
let d = null;
|
|
564
|
+
const f = [
|
|
565
|
+
"a[href]",
|
|
566
|
+
"button:not([disabled])",
|
|
567
|
+
"textarea:not([disabled])",
|
|
568
|
+
"input:not([disabled])",
|
|
569
|
+
"select:not([disabled])",
|
|
570
|
+
'[tabindex]:not([tabindex="-1"])'
|
|
571
|
+
].join(",");
|
|
572
|
+
function r() {
|
|
573
|
+
var _;
|
|
574
|
+
return Array.from(((_ = o.value) == null ? void 0 : _.querySelectorAll(f)) || []).filter(
|
|
575
|
+
(S) => !S.hasAttribute("disabled") && S.tabIndex !== -1
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
async function m() {
|
|
579
|
+
var M;
|
|
580
|
+
await Ae();
|
|
581
|
+
const S = (t.initialFocus ? (M = o.value) == null ? void 0 : M.querySelector(t.initialFocus) : void 0) || r()[0] || o.value;
|
|
582
|
+
S == null || S.focus();
|
|
583
|
+
}
|
|
584
|
+
function $() {
|
|
585
|
+
s("update:modelValue", !1), s("close");
|
|
586
|
+
}
|
|
587
|
+
function I(_) {
|
|
588
|
+
t.closeOnBackdrop && _.target === _.currentTarget && $();
|
|
589
|
+
}
|
|
590
|
+
function P(_) {
|
|
591
|
+
var Z;
|
|
592
|
+
if (typeof document > "u") return;
|
|
593
|
+
if (_.key === "Escape" && t.closeOnEsc) {
|
|
594
|
+
_.preventDefault(), $();
|
|
595
|
+
return;
|
|
596
|
+
}
|
|
597
|
+
if (_.key !== "Tab") return;
|
|
598
|
+
const S = r();
|
|
599
|
+
if (S.length === 0) {
|
|
600
|
+
_.preventDefault(), (Z = o.value) == null || Z.focus();
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
const M = S[0], K = S[S.length - 1];
|
|
604
|
+
_.shiftKey && document.activeElement === M ? (_.preventDefault(), K == null || K.focus()) : !_.shiftKey && document.activeElement === K && (_.preventDefault(), M == null || M.focus());
|
|
605
|
+
}
|
|
606
|
+
return X(
|
|
607
|
+
() => t.modelValue,
|
|
608
|
+
(_) => {
|
|
609
|
+
typeof document > "u" || (_ ? (d = document.activeElement, m(), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", d instanceof HTMLElement && d.focus()));
|
|
610
|
+
},
|
|
611
|
+
{ immediate: !0 }
|
|
612
|
+
), de(() => {
|
|
613
|
+
typeof document > "u" || (document.body.style.overflow = "");
|
|
614
|
+
}), (_, S) => (a(), E(ie, { to: "body" }, [
|
|
615
|
+
e.modelValue ? (a(), n("div", {
|
|
616
|
+
key: 0,
|
|
617
|
+
class: "modal",
|
|
618
|
+
role: "presentation",
|
|
619
|
+
onClick: I,
|
|
620
|
+
onKeydown: P
|
|
621
|
+
}, [
|
|
622
|
+
i("section", {
|
|
623
|
+
ref_key: "panelRef",
|
|
624
|
+
ref: o,
|
|
625
|
+
class: "modal__panel",
|
|
626
|
+
"data-size": e.size,
|
|
627
|
+
"data-tone": e.tone,
|
|
628
|
+
role: "dialog",
|
|
629
|
+
"aria-modal": "true",
|
|
630
|
+
"aria-label": e.title,
|
|
631
|
+
tabindex: "-1"
|
|
632
|
+
}, [
|
|
633
|
+
e.title || _.$slots.header ? (a(), n("header", Ot, [
|
|
634
|
+
g(_.$slots, "header", {}, () => [
|
|
635
|
+
e.tone !== "neutral" ? (a(), n("span", qt)) : c("", !0),
|
|
636
|
+
i("h2", jt, u(e.title), 1)
|
|
637
|
+
], !0),
|
|
638
|
+
i("button", {
|
|
639
|
+
class: "modal__close",
|
|
640
|
+
type: "button",
|
|
641
|
+
"aria-label": e.closeLabel,
|
|
642
|
+
onClick: $
|
|
643
|
+
}, "x", 8, Gt)
|
|
644
|
+
])) : c("", !0),
|
|
645
|
+
i("div", Wt, [
|
|
646
|
+
g(_.$slots, "default", {}, void 0, !0)
|
|
647
|
+
]),
|
|
648
|
+
_.$slots.footer ? (a(), n("footer", Jt, [
|
|
649
|
+
g(_.$slots, "footer", {}, void 0, !0)
|
|
650
|
+
])) : c("", !0)
|
|
651
|
+
], 8, Ut)
|
|
652
|
+
], 32)) : c("", !0)
|
|
653
|
+
]));
|
|
654
|
+
}
|
|
655
|
+
}), Xt = /* @__PURE__ */ p(Qt, [["__scopeId", "data-v-1f7d9097"]]), Yt = ["data-position"], ea = ["data-tone"], ta = { class: "toast__content" }, aa = {
|
|
656
|
+
key: 0,
|
|
657
|
+
class: "toast__title"
|
|
658
|
+
}, la = { class: "toast__message" }, na = ["aria-label", "onClick"], sa = /* @__PURE__ */ b({
|
|
659
|
+
name: "AToast",
|
|
660
|
+
__name: "AToast",
|
|
661
|
+
props: {
|
|
662
|
+
items: { default: () => [] },
|
|
663
|
+
position: { default: "top-right" },
|
|
664
|
+
closable: { type: Boolean, default: !1 },
|
|
665
|
+
closeLabel: { default: "Close toast" }
|
|
666
|
+
},
|
|
667
|
+
emits: ["close"],
|
|
668
|
+
setup(e, { emit: l }) {
|
|
669
|
+
const t = l;
|
|
670
|
+
return (s, o) => (a(), n("div", {
|
|
671
|
+
class: "toast-host",
|
|
672
|
+
"data-position": e.position,
|
|
673
|
+
"aria-live": "polite"
|
|
674
|
+
}, [
|
|
675
|
+
(a(!0), n(C, null, L(e.items, (d) => (a(), n("article", {
|
|
676
|
+
key: d.id,
|
|
677
|
+
class: "toast",
|
|
678
|
+
"data-tone": d.status || "neutral"
|
|
679
|
+
}, [
|
|
680
|
+
o[0] || (o[0] = i("span", {
|
|
681
|
+
class: "toast__icon",
|
|
682
|
+
"aria-hidden": "true"
|
|
683
|
+
}, null, -1)),
|
|
684
|
+
i("div", ta, [
|
|
685
|
+
d.title ? (a(), n("strong", aa, u(d.title), 1)) : c("", !0),
|
|
686
|
+
i("p", la, u(d.message), 1)
|
|
687
|
+
]),
|
|
688
|
+
e.closable ? (a(), n("button", {
|
|
689
|
+
key: 0,
|
|
690
|
+
class: "toast__close",
|
|
691
|
+
type: "button",
|
|
692
|
+
"aria-label": e.closeLabel,
|
|
693
|
+
onClick: (f) => t("close", d.id)
|
|
694
|
+
}, "x", 8, na)) : c("", !0)
|
|
695
|
+
], 8, ea))), 128))
|
|
696
|
+
], 8, Yt));
|
|
697
|
+
}
|
|
698
|
+
}), oa = /* @__PURE__ */ p(sa, [["__scopeId", "data-v-1ed0f498"]]), q = x([]), se = /* @__PURE__ */ new Map();
|
|
699
|
+
let pe = 0;
|
|
700
|
+
function Se(e, l = 5e3) {
|
|
701
|
+
typeof window > "u" || l <= 0 || (ue(e), se.set(
|
|
702
|
+
e,
|
|
703
|
+
window.setTimeout(() => {
|
|
704
|
+
Me(e);
|
|
705
|
+
}, l)
|
|
706
|
+
));
|
|
707
|
+
}
|
|
708
|
+
function ue(e) {
|
|
709
|
+
const l = se.get(e);
|
|
710
|
+
l && window.clearTimeout(l), se.delete(e);
|
|
711
|
+
}
|
|
712
|
+
function Q(e, l, t = {}) {
|
|
713
|
+
pe += 1;
|
|
714
|
+
const s = `toast-${pe}`, o = {
|
|
715
|
+
id: s,
|
|
716
|
+
title: l,
|
|
717
|
+
message: t.message || l,
|
|
718
|
+
status: e,
|
|
719
|
+
duration: t.duration ?? 5e3
|
|
720
|
+
};
|
|
721
|
+
return q.value = [o, ...q.value].slice(0, 5), Se(s, o.duration), s;
|
|
722
|
+
}
|
|
723
|
+
function Me(e) {
|
|
724
|
+
ue(e), q.value = q.value.filter((l) => l.id !== e);
|
|
725
|
+
}
|
|
726
|
+
function da(e) {
|
|
727
|
+
ue(e);
|
|
728
|
+
}
|
|
729
|
+
function ia(e) {
|
|
730
|
+
const l = q.value.find((t) => t.id === e);
|
|
731
|
+
l && Se(e, l.duration);
|
|
732
|
+
}
|
|
733
|
+
function ua() {
|
|
734
|
+
return {
|
|
735
|
+
toasts: Ne(q),
|
|
736
|
+
dismiss: Me,
|
|
737
|
+
pause: da,
|
|
738
|
+
resume: ia,
|
|
739
|
+
toast: {
|
|
740
|
+
success: (e, l) => Q("success", e, l),
|
|
741
|
+
info: (e, l) => Q("info", e, l),
|
|
742
|
+
warning: (e, l) => Q("warning", e, l),
|
|
743
|
+
error: (e, l) => Q("danger", e, l)
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
const ra = ["data-position"], ca = ["data-tone", "onMouseenter", "onMouseleave"], fa = { class: "toast__content" }, ma = {
|
|
748
|
+
key: 0,
|
|
749
|
+
class: "toast__title"
|
|
750
|
+
}, va = { class: "toast__message" }, ha = ["aria-label", "onClick"], ba = /* @__PURE__ */ b({
|
|
751
|
+
name: "AToastHost",
|
|
752
|
+
__name: "AToastHost",
|
|
753
|
+
props: {
|
|
754
|
+
position: { default: "top-right" },
|
|
755
|
+
closeLabel: { default: "Close toast" }
|
|
756
|
+
},
|
|
757
|
+
setup(e) {
|
|
758
|
+
const { toasts: l, dismiss: t, pause: s, resume: o } = ua();
|
|
759
|
+
return (d, f) => (a(), n("div", {
|
|
760
|
+
class: "toast-host",
|
|
761
|
+
"data-position": e.position,
|
|
762
|
+
"aria-live": "polite"
|
|
763
|
+
}, [
|
|
764
|
+
(a(!0), n(C, null, L(W(l), (r) => (a(), n("article", {
|
|
765
|
+
key: r.id,
|
|
766
|
+
class: "toast",
|
|
767
|
+
"data-tone": r.status || "neutral",
|
|
768
|
+
onMouseenter: (m) => W(s)(r.id),
|
|
769
|
+
onMouseleave: (m) => W(o)(r.id)
|
|
770
|
+
}, [
|
|
771
|
+
f[0] || (f[0] = i("span", {
|
|
772
|
+
class: "toast__icon",
|
|
773
|
+
"aria-hidden": "true"
|
|
774
|
+
}, null, -1)),
|
|
775
|
+
i("div", fa, [
|
|
776
|
+
r.title ? (a(), n("strong", ma, u(r.title), 1)) : c("", !0),
|
|
777
|
+
i("p", va, u(r.message), 1)
|
|
778
|
+
]),
|
|
779
|
+
i("button", {
|
|
780
|
+
class: "toast__close",
|
|
781
|
+
type: "button",
|
|
782
|
+
"aria-label": e.closeLabel,
|
|
783
|
+
onClick: (m) => W(t)(r.id)
|
|
784
|
+
}, "x", 8, ha)
|
|
785
|
+
], 40, ca))), 128))
|
|
786
|
+
], 8, ra));
|
|
787
|
+
}
|
|
788
|
+
}), _a = /* @__PURE__ */ p(ba, [["__scopeId", "data-v-1bdb152f"]]), pa = ["aria-label"], ya = { class: "pagination__range" }, $a = ["disabled"], ga = { class: "pagination__page" }, ka = ["disabled"], Aa = /* @__PURE__ */ b({
|
|
789
|
+
name: "APagination",
|
|
790
|
+
__name: "APagination",
|
|
791
|
+
props: {
|
|
792
|
+
modelValue: { default: 1 },
|
|
793
|
+
total: { default: 0 },
|
|
794
|
+
pageSize: { default: 20 },
|
|
795
|
+
previousLabel: { default: "Prev" },
|
|
796
|
+
nextLabel: { default: "Next" },
|
|
797
|
+
ariaLabel: { default: "Pagination" },
|
|
798
|
+
ofLabel: { default: "of" }
|
|
799
|
+
},
|
|
800
|
+
emits: ["update:modelValue"],
|
|
801
|
+
setup(e, { emit: l }) {
|
|
802
|
+
const t = e, s = l, o = k(() => Math.max(1, Math.ceil(t.total / t.pageSize))), d = k(() => t.total === 0 ? 0 : (t.modelValue - 1) * t.pageSize + 1), f = k(() => Math.min(t.total, t.modelValue * t.pageSize));
|
|
803
|
+
return (r, m) => (a(), n("nav", {
|
|
804
|
+
class: "pagination",
|
|
805
|
+
"aria-label": e.ariaLabel
|
|
806
|
+
}, [
|
|
807
|
+
i("span", ya, u(d.value) + "-" + u(f.value) + " " + u(e.ofLabel) + " " + u(e.total), 1),
|
|
808
|
+
i("button", {
|
|
809
|
+
class: "pagination__btn",
|
|
810
|
+
type: "button",
|
|
811
|
+
disabled: e.modelValue <= 1,
|
|
812
|
+
onClick: m[0] || (m[0] = ($) => s("update:modelValue", e.modelValue - 1))
|
|
813
|
+
}, u(e.previousLabel), 9, $a),
|
|
814
|
+
i("span", ga, u(e.modelValue) + " / " + u(o.value), 1),
|
|
815
|
+
i("button", {
|
|
816
|
+
class: "pagination__btn",
|
|
817
|
+
type: "button",
|
|
818
|
+
disabled: e.modelValue >= o.value,
|
|
819
|
+
onClick: m[1] || (m[1] = ($) => s("update:modelValue", e.modelValue + 1))
|
|
820
|
+
}, u(e.nextLabel), 9, ka)
|
|
821
|
+
], 8, pa));
|
|
822
|
+
}
|
|
823
|
+
}), Ie = /* @__PURE__ */ p(Aa, [["__scopeId", "data-v-f95b2866"]]), wa = ["data-rounded"], xa = /* @__PURE__ */ b({
|
|
824
|
+
name: "ASkeleton",
|
|
825
|
+
__name: "ASkeleton",
|
|
826
|
+
props: {
|
|
827
|
+
w: { default: "100%" },
|
|
828
|
+
h: { default: "16px" },
|
|
829
|
+
rounded: { type: Boolean, default: !1 }
|
|
830
|
+
},
|
|
831
|
+
setup(e) {
|
|
832
|
+
return (l, t) => (a(), n("span", {
|
|
833
|
+
class: "skeleton",
|
|
834
|
+
"data-rounded": e.rounded || null,
|
|
835
|
+
style: j({ width: e.w, height: e.h })
|
|
836
|
+
}, null, 12, wa));
|
|
837
|
+
}
|
|
838
|
+
}), oe = /* @__PURE__ */ p(xa, [["__scopeId", "data-v-91b24ef9"]]), Va = ["data-striped", "data-loading"], Sa = {
|
|
839
|
+
key: 0,
|
|
840
|
+
class: "data-table__toolbar"
|
|
841
|
+
}, Ma = { class: "data-table__scroll" }, Ia = { class: "data-table__table" }, Ca = {
|
|
842
|
+
key: 0,
|
|
843
|
+
class: "data-table__select-cell"
|
|
844
|
+
}, La = ["data-align"], Ba = ["onClick"], za = ["data-active"], Ta = { key: 1 }, Ea = {
|
|
845
|
+
key: 0,
|
|
846
|
+
class: "data-table__select-cell"
|
|
847
|
+
}, Da = { key: 1 }, Ka = ["colspan"], Pa = ["data-selected"], Ra = {
|
|
848
|
+
key: 0,
|
|
849
|
+
class: "data-table__select-cell"
|
|
850
|
+
}, Fa = ["data-align", "data-numeric"], Za = {
|
|
851
|
+
key: 1,
|
|
852
|
+
class: "data-table__footer"
|
|
853
|
+
}, Na = { class: "data-table__range" }, Ha = /* @__PURE__ */ b({
|
|
854
|
+
name: "ATable",
|
|
855
|
+
__name: "ATable",
|
|
856
|
+
props: {
|
|
857
|
+
columns: { default: () => [] },
|
|
858
|
+
rows: { default: () => [] },
|
|
859
|
+
rowKey: { type: [String, Function], default: "id" },
|
|
860
|
+
emptyText: { default: "No data" },
|
|
861
|
+
striped: { type: Boolean, default: !1 },
|
|
862
|
+
selectable: { type: Boolean, default: !1 },
|
|
863
|
+
loading: { type: Boolean, default: !1 },
|
|
864
|
+
sort: { default: null },
|
|
865
|
+
modelSelected: { default: () => [] },
|
|
866
|
+
page: { default: 1 },
|
|
867
|
+
pageSize: { default: 20 },
|
|
868
|
+
total: { default: 0 },
|
|
869
|
+
toolbar: { type: Boolean, default: !1 },
|
|
870
|
+
searchPlaceholder: { default: "Search" },
|
|
871
|
+
exportLabel: { default: "Export" },
|
|
872
|
+
addLabel: { default: "Add" },
|
|
873
|
+
selectedLabel: { default: "selected" },
|
|
874
|
+
ofLabel: { default: "of" },
|
|
875
|
+
selectAllLabel: { default: "Select all" }
|
|
876
|
+
},
|
|
877
|
+
emits: ["update:sort", "update:modelSelected", "update:page", "search", "export", "add"],
|
|
878
|
+
setup(e, { emit: l }) {
|
|
879
|
+
const t = e, s = l, o = x(""), d = k(() => t.total || t.rows.length), f = k(() => t.selectable || d.value > t.pageSize), r = k(() => new Set(t.modelSelected)), m = k(() => t.rows.map((A, y) => _(A, y))), $ = k(() => m.value.length > 0 && m.value.every((A) => r.value.has(A))), I = k(() => !$.value && m.value.some((A) => r.value.has(A))), P = k(() => {
|
|
880
|
+
const A = d.value === 0 ? 0 : (t.page - 1) * t.pageSize + 1, y = Math.min(d.value, t.page * t.pageSize);
|
|
881
|
+
return `${t.modelSelected.length ? `${t.modelSelected.length} ${t.selectedLabel} · ` : ""}${A}-${y} ${t.ofLabel} ${d.value}`;
|
|
882
|
+
});
|
|
883
|
+
function _(A, y) {
|
|
884
|
+
return typeof t.rowKey == "function" ? t.rowKey(A, y) : A[t.rowKey] ?? y;
|
|
885
|
+
}
|
|
886
|
+
function S(A, y) {
|
|
887
|
+
return r.value.has(_(A, y));
|
|
888
|
+
}
|
|
889
|
+
function M(A, y) {
|
|
890
|
+
const h = new Set(r.value), V = _(A, y);
|
|
891
|
+
h.has(V) ? h.delete(V) : h.add(V), s("update:modelSelected", Array.from(h));
|
|
892
|
+
}
|
|
893
|
+
function K(A) {
|
|
894
|
+
const y = new Set(r.value);
|
|
895
|
+
m.value.forEach((h) => {
|
|
896
|
+
A ? y.add(h) : y.delete(h);
|
|
897
|
+
}), s("update:modelSelected", Array.from(y));
|
|
898
|
+
}
|
|
899
|
+
function Z(A) {
|
|
900
|
+
const y = String(A.key);
|
|
901
|
+
!t.sort || t.sort.key !== y ? s("update:sort", { key: y, dir: "asc" }) : t.sort.dir === "asc" ? s("update:sort", { key: y, dir: "desc" }) : s("update:sort", null);
|
|
902
|
+
}
|
|
903
|
+
return (A, y) => (a(), n("div", {
|
|
904
|
+
class: "data-table",
|
|
905
|
+
"data-striped": e.striped || null,
|
|
906
|
+
"data-loading": e.loading || null
|
|
907
|
+
}, [
|
|
908
|
+
e.toolbar || A.$slots.toolbar ? (a(), n("div", Sa, [
|
|
909
|
+
g(A.$slots, "toolbar", {}, () => [
|
|
910
|
+
R(Ve, {
|
|
911
|
+
modelValue: o.value,
|
|
912
|
+
"onUpdate:modelValue": [
|
|
913
|
+
y[0] || (y[0] = (h) => o.value = h),
|
|
914
|
+
y[1] || (y[1] = (h) => s("search", h))
|
|
915
|
+
],
|
|
916
|
+
size: "sm",
|
|
917
|
+
placeholder: e.searchPlaceholder
|
|
918
|
+
}, null, 8, ["modelValue", "placeholder"]),
|
|
919
|
+
y[5] || (y[5] = i("div", { class: "data-table__toolbar-spacer" }, null, -1)),
|
|
920
|
+
R(le, {
|
|
921
|
+
variant: "secondary",
|
|
922
|
+
size: "sm",
|
|
923
|
+
onClick: y[2] || (y[2] = (h) => s("export"))
|
|
924
|
+
}, {
|
|
925
|
+
default: O(() => [
|
|
926
|
+
T(u(e.exportLabel), 1)
|
|
927
|
+
]),
|
|
928
|
+
_: 1
|
|
929
|
+
}),
|
|
930
|
+
R(le, {
|
|
931
|
+
size: "sm",
|
|
932
|
+
onClick: y[3] || (y[3] = (h) => s("add"))
|
|
933
|
+
}, {
|
|
934
|
+
default: O(() => [
|
|
935
|
+
T(u(e.addLabel), 1)
|
|
936
|
+
]),
|
|
937
|
+
_: 1
|
|
938
|
+
})
|
|
939
|
+
], !0)
|
|
940
|
+
])) : c("", !0),
|
|
941
|
+
i("div", Ma, [
|
|
942
|
+
i("table", Ia, [
|
|
943
|
+
i("thead", null, [
|
|
944
|
+
i("tr", null, [
|
|
945
|
+
e.selectable ? (a(), n("th", Ca, [
|
|
946
|
+
R(ne, {
|
|
947
|
+
"model-value": $.value,
|
|
948
|
+
indeterminate: I.value,
|
|
949
|
+
"aria-label": e.selectAllLabel,
|
|
950
|
+
"onUpdate:modelValue": K
|
|
951
|
+
}, null, 8, ["model-value", "indeterminate", "aria-label"])
|
|
952
|
+
])) : c("", !0),
|
|
953
|
+
(a(!0), n(C, null, L(e.columns, (h) => {
|
|
954
|
+
var V, B;
|
|
955
|
+
return a(), n("th", {
|
|
956
|
+
key: h.key,
|
|
957
|
+
"data-align": h.align || (h.numeric ? "right" : "left"),
|
|
958
|
+
style: j({ width: h.width })
|
|
959
|
+
}, [
|
|
960
|
+
h.sortable ? (a(), n("button", {
|
|
961
|
+
key: 0,
|
|
962
|
+
class: "data-table__sort",
|
|
963
|
+
type: "button",
|
|
964
|
+
onClick: (ee) => Z(h)
|
|
965
|
+
}, [
|
|
966
|
+
i("span", null, u(h.label), 1),
|
|
967
|
+
i("span", {
|
|
968
|
+
class: "data-table__sort-icon",
|
|
969
|
+
"data-active": ((V = e.sort) == null ? void 0 : V.key) === String(h.key) || null
|
|
970
|
+
}, u(((B = e.sort) == null ? void 0 : B.key) === String(h.key) ? e.sort.dir === "asc" ? "up" : "down" : "sort"), 9, za)
|
|
971
|
+
], 8, Ba)) : (a(), n("span", Ta, u(h.label), 1))
|
|
972
|
+
], 12, La);
|
|
973
|
+
}), 128))
|
|
974
|
+
])
|
|
975
|
+
]),
|
|
976
|
+
i("tbody", null, [
|
|
977
|
+
e.loading ? (a(), n(C, { key: 0 }, L(5, (h) => i("tr", {
|
|
978
|
+
key: `loading-${h}`
|
|
979
|
+
}, [
|
|
980
|
+
e.selectable ? (a(), n("td", Ea, [
|
|
981
|
+
R(oe, {
|
|
982
|
+
w: "18px",
|
|
983
|
+
h: "18px",
|
|
984
|
+
rounded: ""
|
|
985
|
+
})
|
|
986
|
+
])) : c("", !0),
|
|
987
|
+
(a(!0), n(C, null, L(e.columns, (V) => (a(), n("td", {
|
|
988
|
+
key: V.key
|
|
989
|
+
}, [
|
|
990
|
+
R(oe, { h: "14px" })
|
|
991
|
+
]))), 128))
|
|
992
|
+
])), 64)) : e.rows.length === 0 ? (a(), n("tr", Da, [
|
|
993
|
+
i("td", {
|
|
994
|
+
class: "data-table__empty",
|
|
995
|
+
colspan: e.columns.length + (e.selectable ? 1 : 0)
|
|
996
|
+
}, [
|
|
997
|
+
g(A.$slots, "empty", {}, () => [
|
|
998
|
+
T(u(e.emptyText), 1)
|
|
999
|
+
], !0)
|
|
1000
|
+
], 8, Ka)
|
|
1001
|
+
])) : (a(!0), n(C, { key: 2 }, L(e.rows, (h, V) => (a(), n("tr", {
|
|
1002
|
+
key: _(h, V),
|
|
1003
|
+
"data-selected": S(h, V) || null
|
|
1004
|
+
}, [
|
|
1005
|
+
e.selectable ? (a(), n("td", Ra, [
|
|
1006
|
+
R(ne, {
|
|
1007
|
+
"model-value": S(h, V),
|
|
1008
|
+
"onUpdate:modelValue": (B) => M(h, V)
|
|
1009
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])
|
|
1010
|
+
])) : c("", !0),
|
|
1011
|
+
(a(!0), n(C, null, L(e.columns, (B) => (a(), n("td", {
|
|
1012
|
+
key: B.key,
|
|
1013
|
+
"data-align": B.align || (B.numeric ? "right" : "left"),
|
|
1014
|
+
"data-numeric": B.numeric || B.align === "right" || null
|
|
1015
|
+
}, [
|
|
1016
|
+
g(A.$slots, `cell-${String(B.key)}`, {
|
|
1017
|
+
row: h,
|
|
1018
|
+
value: h[B.key],
|
|
1019
|
+
column: B
|
|
1020
|
+
}, () => [
|
|
1021
|
+
T(u(h[B.key]), 1)
|
|
1022
|
+
], !0)
|
|
1023
|
+
], 8, Fa))), 128))
|
|
1024
|
+
], 8, Pa))), 128))
|
|
1025
|
+
])
|
|
1026
|
+
])
|
|
1027
|
+
]),
|
|
1028
|
+
f.value ? (a(), n("footer", Za, [
|
|
1029
|
+
i("span", Na, u(P.value), 1),
|
|
1030
|
+
e.total > e.pageSize ? (a(), E(Ie, {
|
|
1031
|
+
key: 0,
|
|
1032
|
+
"model-value": e.page,
|
|
1033
|
+
total: e.total,
|
|
1034
|
+
"page-size": e.pageSize,
|
|
1035
|
+
"onUpdate:modelValue": y[4] || (y[4] = (h) => s("update:page", h))
|
|
1036
|
+
}, null, 8, ["model-value", "total", "page-size"])) : c("", !0)
|
|
1037
|
+
])) : c("", !0)
|
|
1038
|
+
], 8, Va));
|
|
1039
|
+
}
|
|
1040
|
+
}), Ua = /* @__PURE__ */ p(Ha, [["__scopeId", "data-v-a5ec767a"]]), Oa = ["data-tone", "data-appearance"], qa = {
|
|
1041
|
+
key: 0,
|
|
1042
|
+
class: "badge__dot",
|
|
1043
|
+
"aria-hidden": "true"
|
|
1044
|
+
}, ja = /* @__PURE__ */ b({
|
|
1045
|
+
name: "ABadge",
|
|
1046
|
+
__name: "ABadge",
|
|
1047
|
+
props: {
|
|
1048
|
+
tone: { default: "neutral" },
|
|
1049
|
+
status: {},
|
|
1050
|
+
appearance: { default: "subtle" },
|
|
1051
|
+
dot: { type: Boolean, default: !1 }
|
|
1052
|
+
},
|
|
1053
|
+
setup(e) {
|
|
1054
|
+
const l = e, t = k(() => l.status || l.tone);
|
|
1055
|
+
return (s, o) => (a(), n("span", {
|
|
1056
|
+
class: "badge",
|
|
1057
|
+
"data-tone": t.value,
|
|
1058
|
+
"data-appearance": e.appearance
|
|
1059
|
+
}, [
|
|
1060
|
+
e.dot ? (a(), n("span", qa)) : c("", !0),
|
|
1061
|
+
g(s.$slots, "default", {}, void 0, !0)
|
|
1062
|
+
], 8, Oa));
|
|
1063
|
+
}
|
|
1064
|
+
}), re = /* @__PURE__ */ p(ja, [["__scopeId", "data-v-350d69bf"]]), Ga = { class: "tag" }, Wa = ["aria-label"], Ja = /* @__PURE__ */ b({
|
|
1065
|
+
name: "ATag",
|
|
1066
|
+
__name: "ATag",
|
|
1067
|
+
props: {
|
|
1068
|
+
removable: { type: Boolean, default: !1 },
|
|
1069
|
+
color: {},
|
|
1070
|
+
removeLabel: { default: "Remove" }
|
|
1071
|
+
},
|
|
1072
|
+
emits: ["remove"],
|
|
1073
|
+
setup(e, { emit: l }) {
|
|
1074
|
+
const t = l;
|
|
1075
|
+
return (s, o) => (a(), n("span", Ga, [
|
|
1076
|
+
e.color ? (a(), n("span", {
|
|
1077
|
+
key: 0,
|
|
1078
|
+
class: "tag__swatch",
|
|
1079
|
+
style: j({ background: e.color }),
|
|
1080
|
+
"aria-hidden": "true"
|
|
1081
|
+
}, null, 4)) : c("", !0),
|
|
1082
|
+
g(s.$slots, "default", {}, void 0, !0),
|
|
1083
|
+
e.removable ? (a(), n("button", {
|
|
1084
|
+
key: 1,
|
|
1085
|
+
class: "tag__remove",
|
|
1086
|
+
type: "button",
|
|
1087
|
+
"aria-label": e.removeLabel,
|
|
1088
|
+
onClick: o[0] || (o[0] = (d) => t("remove"))
|
|
1089
|
+
}, "x", 8, Wa)) : c("", !0)
|
|
1090
|
+
]));
|
|
1091
|
+
}
|
|
1092
|
+
}), Qa = /* @__PURE__ */ p(Ja, [["__scopeId", "data-v-4152d662"]]), Xa = /* @__PURE__ */ b({
|
|
1093
|
+
name: "AStatusPill",
|
|
1094
|
+
__name: "AStatusPill",
|
|
1095
|
+
props: {
|
|
1096
|
+
tone: { default: "neutral" }
|
|
1097
|
+
},
|
|
1098
|
+
setup(e) {
|
|
1099
|
+
return (l, t) => (a(), E(re, {
|
|
1100
|
+
tone: e.tone,
|
|
1101
|
+
appearance: "pill",
|
|
1102
|
+
dot: ""
|
|
1103
|
+
}, {
|
|
1104
|
+
default: O(() => [
|
|
1105
|
+
g(l.$slots, "default")
|
|
1106
|
+
]),
|
|
1107
|
+
_: 3
|
|
1108
|
+
}, 8, ["tone"]));
|
|
1109
|
+
}
|
|
1110
|
+
}), Ya = ["data-padded"], el = {
|
|
1111
|
+
key: 0,
|
|
1112
|
+
class: "card__header"
|
|
1113
|
+
}, tl = {
|
|
1114
|
+
key: 0,
|
|
1115
|
+
class: "card__title"
|
|
1116
|
+
}, al = {
|
|
1117
|
+
key: 1,
|
|
1118
|
+
class: "card__subtitle"
|
|
1119
|
+
}, ll = { class: "card__body" }, nl = {
|
|
1120
|
+
key: 1,
|
|
1121
|
+
class: "card__footer"
|
|
1122
|
+
}, sl = /* @__PURE__ */ b({
|
|
1123
|
+
name: "ACard",
|
|
1124
|
+
__name: "ACard",
|
|
1125
|
+
props: {
|
|
1126
|
+
title: {},
|
|
1127
|
+
subtitle: {},
|
|
1128
|
+
padded: { type: Boolean, default: !0 }
|
|
1129
|
+
},
|
|
1130
|
+
setup(e) {
|
|
1131
|
+
return (l, t) => (a(), n("section", {
|
|
1132
|
+
class: "card",
|
|
1133
|
+
"data-padded": e.padded || null
|
|
1134
|
+
}, [
|
|
1135
|
+
e.title || e.subtitle || l.$slots.header ? (a(), n("header", el, [
|
|
1136
|
+
g(l.$slots, "header", {}, () => [
|
|
1137
|
+
i("div", null, [
|
|
1138
|
+
e.title ? (a(), n("h3", tl, u(e.title), 1)) : c("", !0),
|
|
1139
|
+
e.subtitle ? (a(), n("p", al, u(e.subtitle), 1)) : c("", !0)
|
|
1140
|
+
])
|
|
1141
|
+
], !0)
|
|
1142
|
+
])) : c("", !0),
|
|
1143
|
+
i("div", ll, [
|
|
1144
|
+
g(l.$slots, "default", {}, void 0, !0)
|
|
1145
|
+
]),
|
|
1146
|
+
l.$slots.footer ? (a(), n("footer", nl, [
|
|
1147
|
+
g(l.$slots, "footer", {}, void 0, !0)
|
|
1148
|
+
])) : c("", !0)
|
|
1149
|
+
], 8, Ya));
|
|
1150
|
+
}
|
|
1151
|
+
}), ce = /* @__PURE__ */ p(sl, [["__scopeId", "data-v-6baef486"]]), ol = ["width", "height"], dl = ["d"], il = /* @__PURE__ */ b({
|
|
1152
|
+
name: "AIcon",
|
|
1153
|
+
__name: "AIcon",
|
|
1154
|
+
props: {
|
|
1155
|
+
name: {},
|
|
1156
|
+
size: { default: 20 }
|
|
1157
|
+
},
|
|
1158
|
+
setup(e) {
|
|
1159
|
+
const l = e, t = {
|
|
1160
|
+
home: "M3 11.5 12 4l9 7.5V20a1 1 0 0 1-1 1h-5v-6H9v6H4a1 1 0 0 1-1-1v-8.5Z",
|
|
1161
|
+
grid: "M4 4h6v6H4V4Zm10 0h6v6h-6V4ZM4 14h6v6H4v-6Zm10 0h6v6h-6v-6Z",
|
|
1162
|
+
wallet: "M4 7h16v12H4a2 2 0 0 1-2-2V7a3 3 0 0 1 3-3h13v3",
|
|
1163
|
+
doc: "M6 3h8l4 4v14H6V3Zm8 0v5h5",
|
|
1164
|
+
users: "M16 19c0-2-2-4-4-4s-4 2-4 4m8-10a4 4 0 1 1-8 0 4 4 0 0 1 8 0Zm3 10c0-1.5-1-2.8-2.4-3.5M17 5.2a3 3 0 0 1 0 5.6",
|
|
1165
|
+
chart: "M4 19V5m0 14h16M8 16v-5m5 5V8m5 8v-9",
|
|
1166
|
+
settings: "M12 8a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm8 4h2M2 12h2m12.8-6.8 1.4-1.4M5.8 18.2l1.4-1.4m0-11.6L5.8 3.8m12.4 14.4-1.4-1.4",
|
|
1167
|
+
search: "M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Zm5.5-2 5 5",
|
|
1168
|
+
bell: "M18 9a6 6 0 1 0-12 0c0 7-3 7-3 7h18s-3 0-3-7Zm-4 10a2 2 0 0 1-4 0",
|
|
1169
|
+
plus: "M12 5v14M5 12h14",
|
|
1170
|
+
check: "M20 6 9 17l-5-5",
|
|
1171
|
+
x: "M6 6l12 12M18 6 6 18",
|
|
1172
|
+
arrow: "M5 12h14m-6-6 6 6-6 6",
|
|
1173
|
+
chevron: "m8 10 4 4 4-4",
|
|
1174
|
+
down: "m7 9 5 5 5-5",
|
|
1175
|
+
up: "m7 15 5-5 5 5",
|
|
1176
|
+
calendar: "M7 3v4m10-4v4M4 9h16M5 5h14v16H5V5Z",
|
|
1177
|
+
filter: "M4 5h16l-6 7v6l-4 2v-8L4 5Z",
|
|
1178
|
+
upload: "M12 16V4m-5 5 5-5 5 5M5 20h14",
|
|
1179
|
+
trash: "M4 7h16M9 7V4h6v3m-8 0 1 14h8l1-14",
|
|
1180
|
+
pencil: "M4 20h4L19 9l-4-4L4 16v4Z",
|
|
1181
|
+
star: "m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.6 6.5 20l1-6.2L3 9.4l6.2-.9L12 3Z",
|
|
1182
|
+
clock: "M12 21a9 9 0 1 1 0-18 9 9 0 0 1 0 18Zm0-13v5l3 2",
|
|
1183
|
+
lock: "M7 10V7a5 5 0 0 1 10 0v3M6 10h12v11H6V10Z",
|
|
1184
|
+
mail: "M4 6h16v12H4V6Zm0 0 8 7 8-7",
|
|
1185
|
+
info: "M12 17v-6m0-4h.01M12 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20Z",
|
|
1186
|
+
warn: "M12 4 2 21h20L12 4Zm0 6v5m0 3h.01",
|
|
1187
|
+
sort: "M8 7h8M10 12h6M12 17h4",
|
|
1188
|
+
dots: "M5 12h.01M12 12h.01M19 12h.01",
|
|
1189
|
+
card: "M3 6h18v12H3V6Zm0 4h18"
|
|
1190
|
+
}, s = k(() => t[l.name] || t.info);
|
|
1191
|
+
return (o, d) => (a(), n("svg", {
|
|
1192
|
+
class: "icon",
|
|
1193
|
+
width: e.size,
|
|
1194
|
+
height: e.size,
|
|
1195
|
+
viewBox: "0 0 24 24",
|
|
1196
|
+
"aria-hidden": "true"
|
|
1197
|
+
}, [
|
|
1198
|
+
i("path", { d: s.value }, null, 8, dl)
|
|
1199
|
+
], 8, ol));
|
|
1200
|
+
}
|
|
1201
|
+
}), fe = /* @__PURE__ */ p(il, [["__scopeId", "data-v-682afa7e"]]), ul = ["data-tone"], rl = { class: "alert__content" }, cl = {
|
|
1202
|
+
key: 0,
|
|
1203
|
+
class: "alert__title"
|
|
1204
|
+
}, fl = { class: "alert__body" }, ml = ["aria-label"], vl = /* @__PURE__ */ b({
|
|
1205
|
+
name: "AAlert",
|
|
1206
|
+
__name: "AAlert",
|
|
1207
|
+
props: {
|
|
1208
|
+
tone: { default: "info" },
|
|
1209
|
+
title: {},
|
|
1210
|
+
dismissible: { type: Boolean, default: !1 },
|
|
1211
|
+
dismissLabel: { default: "Dismiss" }
|
|
1212
|
+
},
|
|
1213
|
+
emits: ["dismiss"],
|
|
1214
|
+
setup(e, { emit: l }) {
|
|
1215
|
+
const t = l;
|
|
1216
|
+
return (s, o) => (a(), n("section", {
|
|
1217
|
+
class: "alert",
|
|
1218
|
+
"data-tone": e.tone,
|
|
1219
|
+
role: "status"
|
|
1220
|
+
}, [
|
|
1221
|
+
R(fe, {
|
|
1222
|
+
class: "alert__icon",
|
|
1223
|
+
name: e.tone === "warning" || e.tone === "danger" ? "warn" : "info"
|
|
1224
|
+
}, null, 8, ["name"]),
|
|
1225
|
+
i("div", rl, [
|
|
1226
|
+
e.title ? (a(), n("strong", cl, u(e.title), 1)) : c("", !0),
|
|
1227
|
+
i("div", fl, [
|
|
1228
|
+
g(s.$slots, "default", {}, void 0, !0)
|
|
1229
|
+
])
|
|
1230
|
+
]),
|
|
1231
|
+
e.dismissible ? (a(), n("button", {
|
|
1232
|
+
key: 0,
|
|
1233
|
+
class: "alert__close",
|
|
1234
|
+
type: "button",
|
|
1235
|
+
"aria-label": e.dismissLabel,
|
|
1236
|
+
onClick: o[0] || (o[0] = (d) => t("dismiss"))
|
|
1237
|
+
}, "x", 8, ml)) : c("", !0)
|
|
1238
|
+
], 8, ul));
|
|
1239
|
+
}
|
|
1240
|
+
}), hl = /* @__PURE__ */ p(vl, [["__scopeId", "data-v-badd8637"]]), bl = { class: "progress" }, _l = {
|
|
1241
|
+
key: 0,
|
|
1242
|
+
class: "progress__label"
|
|
1243
|
+
}, pl = ["aria-valuenow"], yl = /* @__PURE__ */ b({
|
|
1244
|
+
name: "AProgress",
|
|
1245
|
+
__name: "AProgress",
|
|
1246
|
+
props: {
|
|
1247
|
+
value: { default: 0 },
|
|
1248
|
+
label: {}
|
|
1249
|
+
},
|
|
1250
|
+
setup(e) {
|
|
1251
|
+
const l = e, t = k(() => Math.min(100, Math.max(0, l.value)));
|
|
1252
|
+
return (s, o) => (a(), n("div", bl, [
|
|
1253
|
+
e.label ? (a(), n("div", _l, [
|
|
1254
|
+
i("span", null, u(e.label), 1),
|
|
1255
|
+
i("span", null, u(t.value) + "%", 1)
|
|
1256
|
+
])) : c("", !0),
|
|
1257
|
+
i("div", {
|
|
1258
|
+
class: "progress__track",
|
|
1259
|
+
role: "progressbar",
|
|
1260
|
+
"aria-valuenow": t.value,
|
|
1261
|
+
"aria-valuemin": "0",
|
|
1262
|
+
"aria-valuemax": "100"
|
|
1263
|
+
}, [
|
|
1264
|
+
i("span", {
|
|
1265
|
+
class: "progress__fill",
|
|
1266
|
+
style: j({ width: `${t.value}%` })
|
|
1267
|
+
}, null, 4)
|
|
1268
|
+
], 8, pl)
|
|
1269
|
+
]));
|
|
1270
|
+
}
|
|
1271
|
+
}), $l = /* @__PURE__ */ p(yl, [["__scopeId", "data-v-0ff00ab6"]]), gl = ["data-variant"], kl = ["aria-selected", "tabindex", "data-active", "onClick", "onKeydown"], Al = {
|
|
1272
|
+
key: 0,
|
|
1273
|
+
class: "tabs__count"
|
|
1274
|
+
}, wl = /* @__PURE__ */ b({
|
|
1275
|
+
name: "ATabs",
|
|
1276
|
+
__name: "ATabs",
|
|
1277
|
+
props: {
|
|
1278
|
+
modelValue: {},
|
|
1279
|
+
tabs: { default: () => [] },
|
|
1280
|
+
variant: { default: "underline" }
|
|
1281
|
+
},
|
|
1282
|
+
emits: ["update:modelValue"],
|
|
1283
|
+
setup(e, { emit: l }) {
|
|
1284
|
+
const t = l, s = x([]);
|
|
1285
|
+
function o(f, r) {
|
|
1286
|
+
f && (s.value[r] = f);
|
|
1287
|
+
}
|
|
1288
|
+
function d(f, r) {
|
|
1289
|
+
var $;
|
|
1290
|
+
const m = (f + r + s.value.length) % s.value.length;
|
|
1291
|
+
($ = s.value[m]) == null || $.focus();
|
|
1292
|
+
}
|
|
1293
|
+
return (f, r) => (a(), n("div", {
|
|
1294
|
+
class: "tabs",
|
|
1295
|
+
"data-variant": e.variant,
|
|
1296
|
+
role: "tablist"
|
|
1297
|
+
}, [
|
|
1298
|
+
(a(!0), n(C, null, L(e.tabs, (m, $) => (a(), n("button", {
|
|
1299
|
+
key: m.value,
|
|
1300
|
+
ref_for: !0,
|
|
1301
|
+
ref: (I) => o(I, $),
|
|
1302
|
+
class: "tabs__item",
|
|
1303
|
+
type: "button",
|
|
1304
|
+
role: "tab",
|
|
1305
|
+
"aria-selected": e.modelValue === m.value,
|
|
1306
|
+
tabindex: e.modelValue === m.value ? 0 : -1,
|
|
1307
|
+
"data-active": e.modelValue === m.value || null,
|
|
1308
|
+
onClick: (I) => t("update:modelValue", m.value),
|
|
1309
|
+
onKeydown: [
|
|
1310
|
+
ae(F((I) => d($, -1), ["prevent"]), ["left"]),
|
|
1311
|
+
ae(F((I) => d($, 1), ["prevent"]), ["right"])
|
|
1312
|
+
]
|
|
1313
|
+
}, [
|
|
1314
|
+
T(u(m.label) + " ", 1),
|
|
1315
|
+
m.count != null ? (a(), n("span", Al, u(m.count), 1)) : c("", !0)
|
|
1316
|
+
], 40, kl))), 128))
|
|
1317
|
+
], 8, gl));
|
|
1318
|
+
}
|
|
1319
|
+
}), xl = /* @__PURE__ */ p(wl, [["__scopeId", "data-v-8ead215c"]]), Vl = {
|
|
1320
|
+
class: "breadcrumbs",
|
|
1321
|
+
"aria-label": "Breadcrumbs"
|
|
1322
|
+
}, Sl = { class: "breadcrumbs__list" }, Ml = ["href"], Il = {
|
|
1323
|
+
key: 1,
|
|
1324
|
+
class: "breadcrumbs__current"
|
|
1325
|
+
}, Cl = /* @__PURE__ */ b({
|
|
1326
|
+
name: "ABreadcrumbs",
|
|
1327
|
+
__name: "ABreadcrumbs",
|
|
1328
|
+
props: {
|
|
1329
|
+
items: { default: () => [] }
|
|
1330
|
+
},
|
|
1331
|
+
setup(e) {
|
|
1332
|
+
return (l, t) => (a(), n("nav", Vl, [
|
|
1333
|
+
i("ol", Sl, [
|
|
1334
|
+
(a(!0), n(C, null, L(e.items, (s, o) => (a(), n("li", {
|
|
1335
|
+
key: `${s.label}-${o}`,
|
|
1336
|
+
class: "breadcrumbs__item"
|
|
1337
|
+
}, [
|
|
1338
|
+
s.href && o < e.items.length - 1 ? (a(), n("a", {
|
|
1339
|
+
key: 0,
|
|
1340
|
+
class: "breadcrumbs__link",
|
|
1341
|
+
href: s.href
|
|
1342
|
+
}, u(s.label), 9, Ml)) : (a(), n("span", Il, u(s.label), 1))
|
|
1343
|
+
]))), 128))
|
|
1344
|
+
])
|
|
1345
|
+
]));
|
|
1346
|
+
}
|
|
1347
|
+
}), Ll = /* @__PURE__ */ p(Cl, [["__scopeId", "data-v-32400b2a"]]), Bl = ["data-shape", "data-status"], zl = ["src", "alt"], Tl = {
|
|
1348
|
+
key: 1,
|
|
1349
|
+
class: "avatar__initials"
|
|
1350
|
+
}, El = {
|
|
1351
|
+
key: 2,
|
|
1352
|
+
class: "avatar__status",
|
|
1353
|
+
"aria-hidden": "true"
|
|
1354
|
+
}, Dl = /* @__PURE__ */ b({
|
|
1355
|
+
name: "AAvatar",
|
|
1356
|
+
__name: "AAvatar",
|
|
1357
|
+
props: {
|
|
1358
|
+
name: { default: "" },
|
|
1359
|
+
src: {},
|
|
1360
|
+
size: { default: 32 },
|
|
1361
|
+
shape: { default: "circle" },
|
|
1362
|
+
status: { default: "none" }
|
|
1363
|
+
},
|
|
1364
|
+
setup(e) {
|
|
1365
|
+
const l = e, t = k(
|
|
1366
|
+
() => l.name.split(" ").filter(Boolean).slice(0, 2).map((s) => {
|
|
1367
|
+
var o;
|
|
1368
|
+
return (o = s[0]) == null ? void 0 : o.toUpperCase();
|
|
1369
|
+
}).join("") || "?"
|
|
1370
|
+
);
|
|
1371
|
+
return (s, o) => (a(), n("span", {
|
|
1372
|
+
class: "avatar",
|
|
1373
|
+
"data-shape": e.shape,
|
|
1374
|
+
"data-status": e.status,
|
|
1375
|
+
style: j({ width: `${e.size}px`, height: `${e.size}px` })
|
|
1376
|
+
}, [
|
|
1377
|
+
e.src ? (a(), n("img", {
|
|
1378
|
+
key: 0,
|
|
1379
|
+
class: "avatar__image",
|
|
1380
|
+
src: e.src,
|
|
1381
|
+
alt: e.name
|
|
1382
|
+
}, null, 8, zl)) : (a(), n("span", Tl, u(t.value), 1)),
|
|
1383
|
+
e.status !== "none" ? (a(), n("span", El)) : c("", !0)
|
|
1384
|
+
], 12, Bl));
|
|
1385
|
+
}
|
|
1386
|
+
}), Ce = /* @__PURE__ */ p(Dl, [["__scopeId", "data-v-1b1bfca4"]]), Kl = { class: "avatar-group" }, Pl = {
|
|
1387
|
+
key: 0,
|
|
1388
|
+
class: "avatar-group__overflow"
|
|
1389
|
+
}, Rl = /* @__PURE__ */ b({
|
|
1390
|
+
name: "AAvatarGroup",
|
|
1391
|
+
__name: "AAvatarGroup",
|
|
1392
|
+
props: {
|
|
1393
|
+
items: { default: () => [] },
|
|
1394
|
+
max: { default: 4 }
|
|
1395
|
+
},
|
|
1396
|
+
setup(e) {
|
|
1397
|
+
const l = e, t = k(() => l.items.slice(0, l.max)), s = k(() => Math.max(0, l.items.length - l.max));
|
|
1398
|
+
return (o, d) => (a(), n("div", Kl, [
|
|
1399
|
+
(a(!0), n(C, null, L(t.value, (f, r) => (a(), E(Ce, He({
|
|
1400
|
+
key: `${f.name}-${r}`
|
|
1401
|
+
}, { ref_for: !0 }, f), null, 16))), 128)),
|
|
1402
|
+
s.value > 0 ? (a(), n("span", Pl, "+" + u(s.value), 1)) : c("", !0)
|
|
1403
|
+
]));
|
|
1404
|
+
}
|
|
1405
|
+
}), Fl = /* @__PURE__ */ p(Rl, [["__scopeId", "data-v-f8d4619a"]]), Zl = ["data-tone"], Nl = {
|
|
1406
|
+
class: "empty__icon",
|
|
1407
|
+
"aria-hidden": "true"
|
|
1408
|
+
}, Hl = { class: "empty__title" }, Ul = {
|
|
1409
|
+
key: 0,
|
|
1410
|
+
class: "empty__desc"
|
|
1411
|
+
}, Ol = {
|
|
1412
|
+
key: 1,
|
|
1413
|
+
class: "empty__action"
|
|
1414
|
+
}, ql = /* @__PURE__ */ b({
|
|
1415
|
+
name: "AEmptyState",
|
|
1416
|
+
__name: "AEmptyState",
|
|
1417
|
+
props: {
|
|
1418
|
+
tone: { default: "no-data" },
|
|
1419
|
+
title: { default: "No data" },
|
|
1420
|
+
desc: {},
|
|
1421
|
+
icon: { default: "i" }
|
|
1422
|
+
},
|
|
1423
|
+
setup(e) {
|
|
1424
|
+
return (l, t) => (a(), n("section", {
|
|
1425
|
+
class: "empty",
|
|
1426
|
+
"data-tone": e.tone
|
|
1427
|
+
}, [
|
|
1428
|
+
i("div", Nl, u(e.icon), 1),
|
|
1429
|
+
i("h3", Hl, u(e.title), 1),
|
|
1430
|
+
e.desc ? (a(), n("p", Ul, u(e.desc), 1)) : c("", !0),
|
|
1431
|
+
l.$slots.action ? (a(), n("div", Ol, [
|
|
1432
|
+
g(l.$slots, "action", {}, void 0, !0)
|
|
1433
|
+
])) : c("", !0)
|
|
1434
|
+
], 8, Zl));
|
|
1435
|
+
}
|
|
1436
|
+
}), jl = /* @__PURE__ */ p(ql, [["__scopeId", "data-v-c2bc84e9"]]), Gl = { class: "kpi" }, Wl = { class: "kpi__top" }, Jl = { class: "kpi__label" }, Ql = { class: "kpi__value" }, Xl = /* @__PURE__ */ b({
|
|
1437
|
+
name: "AKpiCard",
|
|
1438
|
+
__name: "AKpiCard",
|
|
1439
|
+
props: {
|
|
1440
|
+
label: {},
|
|
1441
|
+
value: {},
|
|
1442
|
+
delta: {},
|
|
1443
|
+
deltaTone: { default: "neutral" }
|
|
1444
|
+
},
|
|
1445
|
+
setup(e) {
|
|
1446
|
+
return (l, t) => (a(), E(ce, null, {
|
|
1447
|
+
default: O(() => [
|
|
1448
|
+
i("div", Gl, [
|
|
1449
|
+
i("div", Wl, [
|
|
1450
|
+
i("span", Jl, u(e.label), 1),
|
|
1451
|
+
e.delta ? (a(), E(re, {
|
|
1452
|
+
key: 0,
|
|
1453
|
+
tone: e.deltaTone,
|
|
1454
|
+
appearance: "pill"
|
|
1455
|
+
}, {
|
|
1456
|
+
default: O(() => [
|
|
1457
|
+
T(u(e.delta), 1)
|
|
1458
|
+
]),
|
|
1459
|
+
_: 1
|
|
1460
|
+
}, 8, ["tone"])) : c("", !0)
|
|
1461
|
+
]),
|
|
1462
|
+
i("strong", Ql, u(e.value), 1),
|
|
1463
|
+
g(l.$slots, "default", {}, void 0, !0)
|
|
1464
|
+
])
|
|
1465
|
+
]),
|
|
1466
|
+
_: 3
|
|
1467
|
+
}));
|
|
1468
|
+
}
|
|
1469
|
+
}), Yl = /* @__PURE__ */ p(Xl, [["__scopeId", "data-v-2f8d76fd"]]), en = ["data-placement"], tn = /* @__PURE__ */ b({
|
|
1470
|
+
name: "ATooltip",
|
|
1471
|
+
__name: "ATooltip",
|
|
1472
|
+
props: {
|
|
1473
|
+
content: {},
|
|
1474
|
+
placement: { default: "top" }
|
|
1475
|
+
},
|
|
1476
|
+
setup(e) {
|
|
1477
|
+
const l = x(!1);
|
|
1478
|
+
return (t, s) => (a(), n("span", {
|
|
1479
|
+
class: "tooltip",
|
|
1480
|
+
onMouseenter: s[0] || (s[0] = (o) => l.value = !0),
|
|
1481
|
+
onMouseleave: s[1] || (s[1] = (o) => l.value = !1),
|
|
1482
|
+
onFocusin: s[2] || (s[2] = (o) => l.value = !0),
|
|
1483
|
+
onFocusout: s[3] || (s[3] = (o) => l.value = !1)
|
|
1484
|
+
}, [
|
|
1485
|
+
g(t.$slots, "default", {}, void 0, !0),
|
|
1486
|
+
l.value ? (a(), n("span", {
|
|
1487
|
+
key: 0,
|
|
1488
|
+
class: "tooltip__bubble",
|
|
1489
|
+
"data-placement": e.placement,
|
|
1490
|
+
role: "tooltip"
|
|
1491
|
+
}, u(e.content), 9, en)) : c("", !0)
|
|
1492
|
+
], 32));
|
|
1493
|
+
}
|
|
1494
|
+
}), an = /* @__PURE__ */ p(tn, [["__scopeId", "data-v-0e19afdb"]]), ln = { class: "sidebar-nav" }, nn = {
|
|
1495
|
+
key: 0,
|
|
1496
|
+
class: "sidebar-nav__caption"
|
|
1497
|
+
}, sn = ["data-active", "href", "onClick"], on = {
|
|
1498
|
+
key: 1,
|
|
1499
|
+
class: "sidebar-nav__badge"
|
|
1500
|
+
}, dn = /* @__PURE__ */ b({
|
|
1501
|
+
name: "ASidebarNav",
|
|
1502
|
+
__name: "ASidebarNav",
|
|
1503
|
+
props: {
|
|
1504
|
+
groups: { default: () => [] }
|
|
1505
|
+
},
|
|
1506
|
+
emits: ["select"],
|
|
1507
|
+
setup(e, { emit: l }) {
|
|
1508
|
+
const t = l;
|
|
1509
|
+
return (s, o) => (a(), n("nav", ln, [
|
|
1510
|
+
(a(!0), n(C, null, L(e.groups, (d, f) => (a(), n("section", {
|
|
1511
|
+
key: d.label || f,
|
|
1512
|
+
class: "sidebar-nav__group"
|
|
1513
|
+
}, [
|
|
1514
|
+
d.label ? (a(), n("h3", nn, u(d.label), 1)) : c("", !0),
|
|
1515
|
+
(a(!0), n(C, null, L(d.items, (r) => (a(), n("a", {
|
|
1516
|
+
key: r.label,
|
|
1517
|
+
class: "sidebar-nav__item",
|
|
1518
|
+
"data-active": r.active || null,
|
|
1519
|
+
href: r.href || "#",
|
|
1520
|
+
onClick: (m) => t("select", r)
|
|
1521
|
+
}, [
|
|
1522
|
+
r.icon ? (a(), E(fe, {
|
|
1523
|
+
key: 0,
|
|
1524
|
+
name: r.icon,
|
|
1525
|
+
size: 20
|
|
1526
|
+
}, null, 8, ["name"])) : c("", !0),
|
|
1527
|
+
i("span", null, u(r.label), 1),
|
|
1528
|
+
r.badge != null ? (a(), n("span", on, u(r.badge), 1)) : c("", !0)
|
|
1529
|
+
], 8, sn))), 128))
|
|
1530
|
+
]))), 128))
|
|
1531
|
+
]));
|
|
1532
|
+
}
|
|
1533
|
+
}), un = /* @__PURE__ */ p(dn, [["__scopeId", "data-v-5fddea00"]]), rn = ["data-disabled"], cn = ["disabled"], fn = {
|
|
1534
|
+
key: 0,
|
|
1535
|
+
class: "number-input__prefix"
|
|
1536
|
+
}, mn = ["value", "disabled", "min", "max", "step"], vn = ["disabled"], hn = /* @__PURE__ */ b({
|
|
1537
|
+
name: "ANumberInput",
|
|
1538
|
+
__name: "ANumberInput",
|
|
1539
|
+
props: {
|
|
1540
|
+
modelValue: { default: 0 },
|
|
1541
|
+
min: {},
|
|
1542
|
+
max: {},
|
|
1543
|
+
step: { default: 1 },
|
|
1544
|
+
prefix: {},
|
|
1545
|
+
disabled: { type: Boolean, default: !1 }
|
|
1546
|
+
},
|
|
1547
|
+
emits: ["update:modelValue"],
|
|
1548
|
+
setup(e, { emit: l }) {
|
|
1549
|
+
const t = e, s = l;
|
|
1550
|
+
function o(r) {
|
|
1551
|
+
return Math.min(t.max ?? r, Math.max(t.min ?? r, r));
|
|
1552
|
+
}
|
|
1553
|
+
function d(r) {
|
|
1554
|
+
s("update:modelValue", o(r));
|
|
1555
|
+
}
|
|
1556
|
+
function f(r) {
|
|
1557
|
+
d((t.modelValue ?? 0) + r);
|
|
1558
|
+
}
|
|
1559
|
+
return (r, m) => (a(), n("div", {
|
|
1560
|
+
class: "number-input",
|
|
1561
|
+
"data-disabled": e.disabled || null
|
|
1562
|
+
}, [
|
|
1563
|
+
i("button", {
|
|
1564
|
+
type: "button",
|
|
1565
|
+
disabled: e.disabled,
|
|
1566
|
+
onClick: m[0] || (m[0] = ($) => f(-e.step))
|
|
1567
|
+
}, "-", 8, cn),
|
|
1568
|
+
e.prefix ? (a(), n("span", fn, u(e.prefix), 1)) : c("", !0),
|
|
1569
|
+
i("input", {
|
|
1570
|
+
value: e.modelValue,
|
|
1571
|
+
disabled: e.disabled,
|
|
1572
|
+
type: "number",
|
|
1573
|
+
min: e.min,
|
|
1574
|
+
max: e.max,
|
|
1575
|
+
step: e.step,
|
|
1576
|
+
onInput: m[1] || (m[1] = ($) => d(Number($.target.value)))
|
|
1577
|
+
}, null, 40, mn),
|
|
1578
|
+
i("button", {
|
|
1579
|
+
type: "button",
|
|
1580
|
+
disabled: e.disabled,
|
|
1581
|
+
onClick: m[2] || (m[2] = ($) => f(e.step))
|
|
1582
|
+
}, "+", 8, vn)
|
|
1583
|
+
], 8, rn));
|
|
1584
|
+
}
|
|
1585
|
+
}), bn = /* @__PURE__ */ p(hn, [["__scopeId", "data-v-ce203fdf"]]), _n = ["data-side"], pn = ["data-size"], yn = { class: "drawer__header" }, $n = ["aria-label"], gn = { class: "drawer__body" }, kn = {
|
|
1586
|
+
key: 0,
|
|
1587
|
+
class: "drawer__footer"
|
|
1588
|
+
}, An = /* @__PURE__ */ b({
|
|
1589
|
+
name: "ADrawer",
|
|
1590
|
+
__name: "ADrawer",
|
|
1591
|
+
props: {
|
|
1592
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1593
|
+
side: { default: "right" },
|
|
1594
|
+
size: { default: "md" },
|
|
1595
|
+
title: {},
|
|
1596
|
+
closeLabel: { default: "Close drawer" }
|
|
1597
|
+
},
|
|
1598
|
+
emits: ["update:modelValue", "close"],
|
|
1599
|
+
setup(e, { emit: l }) {
|
|
1600
|
+
const t = l;
|
|
1601
|
+
function s() {
|
|
1602
|
+
t("update:modelValue", !1), t("close");
|
|
1603
|
+
}
|
|
1604
|
+
function o(d) {
|
|
1605
|
+
d.target === d.currentTarget && s();
|
|
1606
|
+
}
|
|
1607
|
+
return (d, f) => (a(), E(ie, { to: "body" }, [
|
|
1608
|
+
e.modelValue ? (a(), n("div", {
|
|
1609
|
+
key: 0,
|
|
1610
|
+
class: "drawer",
|
|
1611
|
+
"data-side": e.side,
|
|
1612
|
+
onClick: o
|
|
1613
|
+
}, [
|
|
1614
|
+
i("aside", {
|
|
1615
|
+
class: "drawer__panel",
|
|
1616
|
+
"data-size": e.size
|
|
1617
|
+
}, [
|
|
1618
|
+
i("header", yn, [
|
|
1619
|
+
i("h2", null, u(e.title), 1),
|
|
1620
|
+
i("button", {
|
|
1621
|
+
type: "button",
|
|
1622
|
+
"aria-label": e.closeLabel,
|
|
1623
|
+
onClick: s
|
|
1624
|
+
}, "x", 8, $n)
|
|
1625
|
+
]),
|
|
1626
|
+
i("div", gn, [
|
|
1627
|
+
g(d.$slots, "default", {}, void 0, !0)
|
|
1628
|
+
]),
|
|
1629
|
+
d.$slots.footer ? (a(), n("footer", kn, [
|
|
1630
|
+
g(d.$slots, "footer", {}, void 0, !0)
|
|
1631
|
+
])) : c("", !0)
|
|
1632
|
+
], 8, pn)
|
|
1633
|
+
], 8, _n)) : c("", !0)
|
|
1634
|
+
]));
|
|
1635
|
+
}
|
|
1636
|
+
}), wn = /* @__PURE__ */ p(An, [["__scopeId", "data-v-a5f94494"]]), xn = { class: "accordion" }, Vn = ["aria-expanded", "aria-controls", "onClick"], Sn = ["data-open"], Mn = ["id"], In = /* @__PURE__ */ b({
|
|
1637
|
+
name: "AAccordion",
|
|
1638
|
+
__name: "AAccordion",
|
|
1639
|
+
props: {
|
|
1640
|
+
items: { default: () => [] },
|
|
1641
|
+
multiple: { type: Boolean, default: !1 }
|
|
1642
|
+
},
|
|
1643
|
+
setup(e) {
|
|
1644
|
+
const l = e, t = x(/* @__PURE__ */ new Set());
|
|
1645
|
+
function s(d) {
|
|
1646
|
+
const f = l.multiple ? new Set(t.value) : /* @__PURE__ */ new Set();
|
|
1647
|
+
f.has(d) ? f.delete(d) : f.add(d), t.value = f;
|
|
1648
|
+
}
|
|
1649
|
+
function o(d) {
|
|
1650
|
+
return `a-accordion-panel-${d}`;
|
|
1651
|
+
}
|
|
1652
|
+
return (d, f) => (a(), n("div", xn, [
|
|
1653
|
+
(a(!0), n(C, null, L(e.items, (r) => (a(), n("section", {
|
|
1654
|
+
key: r.key,
|
|
1655
|
+
class: "accordion__item"
|
|
1656
|
+
}, [
|
|
1657
|
+
i("button", {
|
|
1658
|
+
class: "accordion__header",
|
|
1659
|
+
type: "button",
|
|
1660
|
+
"aria-expanded": t.value.has(r.key),
|
|
1661
|
+
"aria-controls": o(r.key),
|
|
1662
|
+
onClick: (m) => s(r.key)
|
|
1663
|
+
}, [
|
|
1664
|
+
i("span", null, u(r.label), 1),
|
|
1665
|
+
i("span", {
|
|
1666
|
+
"data-open": t.value.has(r.key) || null
|
|
1667
|
+
}, "v", 8, Sn)
|
|
1668
|
+
], 8, Vn),
|
|
1669
|
+
t.value.has(r.key) ? (a(), n("div", {
|
|
1670
|
+
key: 0,
|
|
1671
|
+
id: o(r.key),
|
|
1672
|
+
class: "accordion__body"
|
|
1673
|
+
}, [
|
|
1674
|
+
g(d.$slots, `item-${r.key}`, {}, () => [
|
|
1675
|
+
T(u(r.content), 1)
|
|
1676
|
+
], !0)
|
|
1677
|
+
], 8, Mn)) : c("", !0)
|
|
1678
|
+
]))), 128))
|
|
1679
|
+
]));
|
|
1680
|
+
}
|
|
1681
|
+
}), Cn = /* @__PURE__ */ p(In, [["__scopeId", "data-v-0cf469a0"]]), Ln = ["aria-expanded"], Bn = ["data-placement"], zn = { key: 0 }, Tn = /* @__PURE__ */ b({
|
|
1682
|
+
name: "APopover",
|
|
1683
|
+
__name: "APopover",
|
|
1684
|
+
props: {
|
|
1685
|
+
title: {},
|
|
1686
|
+
placement: { default: "bottom" }
|
|
1687
|
+
},
|
|
1688
|
+
setup(e) {
|
|
1689
|
+
const l = x(!1), t = x();
|
|
1690
|
+
function s(o) {
|
|
1691
|
+
var d;
|
|
1692
|
+
(d = t.value) != null && d.contains(o.target) || (l.value = !1);
|
|
1693
|
+
}
|
|
1694
|
+
return we(() => {
|
|
1695
|
+
typeof document < "u" && document.addEventListener("pointerdown", s);
|
|
1696
|
+
}), de(() => {
|
|
1697
|
+
typeof document < "u" && document.removeEventListener("pointerdown", s);
|
|
1698
|
+
}), (o, d) => (a(), n("span", {
|
|
1699
|
+
ref_key: "rootRef",
|
|
1700
|
+
ref: t,
|
|
1701
|
+
class: "popover"
|
|
1702
|
+
}, [
|
|
1703
|
+
i("button", {
|
|
1704
|
+
class: "popover__trigger",
|
|
1705
|
+
type: "button",
|
|
1706
|
+
"aria-expanded": l.value,
|
|
1707
|
+
"aria-haspopup": "dialog",
|
|
1708
|
+
onClick: d[0] || (d[0] = (f) => l.value = !l.value),
|
|
1709
|
+
onKeydown: d[1] || (d[1] = ae(F((f) => l.value = !1, ["prevent"]), ["esc"]))
|
|
1710
|
+
}, [
|
|
1711
|
+
g(o.$slots, "trigger", {}, void 0, !0)
|
|
1712
|
+
], 40, Ln),
|
|
1713
|
+
l.value ? (a(), n("div", {
|
|
1714
|
+
key: 0,
|
|
1715
|
+
class: "popover__panel",
|
|
1716
|
+
"data-placement": e.placement,
|
|
1717
|
+
role: "dialog"
|
|
1718
|
+
}, [
|
|
1719
|
+
e.title ? (a(), n("strong", zn, u(e.title), 1)) : c("", !0),
|
|
1720
|
+
g(o.$slots, "default", {}, void 0, !0)
|
|
1721
|
+
], 8, Bn)) : c("", !0)
|
|
1722
|
+
], 512));
|
|
1723
|
+
}
|
|
1724
|
+
}), En = /* @__PURE__ */ p(Tn, [["__scopeId", "data-v-e1555770"]]), Dn = ["data-tone"], Kn = { class: "banner__action" }, Pn = ["aria-label"], Rn = /* @__PURE__ */ b({
|
|
1725
|
+
name: "ABanner",
|
|
1726
|
+
__name: "ABanner",
|
|
1727
|
+
props: {
|
|
1728
|
+
tone: { default: "info" },
|
|
1729
|
+
dismissible: { type: Boolean, default: !1 },
|
|
1730
|
+
dismissLabel: { default: "Dismiss banner" }
|
|
1731
|
+
},
|
|
1732
|
+
emits: ["dismiss"],
|
|
1733
|
+
setup(e, { emit: l }) {
|
|
1734
|
+
const t = l, s = x(!0);
|
|
1735
|
+
return (o, d) => s.value ? (a(), n("section", {
|
|
1736
|
+
key: 0,
|
|
1737
|
+
class: "banner",
|
|
1738
|
+
"data-tone": e.tone
|
|
1739
|
+
}, [
|
|
1740
|
+
g(o.$slots, "default", {}, void 0, !0),
|
|
1741
|
+
i("span", Kn, [
|
|
1742
|
+
g(o.$slots, "action", {}, void 0, !0)
|
|
1743
|
+
]),
|
|
1744
|
+
e.dismissible ? (a(), n("button", {
|
|
1745
|
+
key: 0,
|
|
1746
|
+
type: "button",
|
|
1747
|
+
"aria-label": e.dismissLabel,
|
|
1748
|
+
onClick: d[0] || (d[0] = (f) => {
|
|
1749
|
+
s.value = !1, t("dismiss");
|
|
1750
|
+
})
|
|
1751
|
+
}, "x", 8, Pn)) : c("", !0)
|
|
1752
|
+
], 8, Dn)) : c("", !0);
|
|
1753
|
+
}
|
|
1754
|
+
}), Fn = /* @__PURE__ */ p(Rn, [["__scopeId", "data-v-a7f56fea"]]), Zn = ["data-dragging"], Nn = ["accept", "multiple"], Hn = { class: "file-upload__icon" }, Un = {
|
|
1755
|
+
key: 0,
|
|
1756
|
+
class: "file-upload__hint"
|
|
1757
|
+
}, On = /* @__PURE__ */ b({
|
|
1758
|
+
name: "AFileUpload",
|
|
1759
|
+
__name: "AFileUpload",
|
|
1760
|
+
props: {
|
|
1761
|
+
accept: {},
|
|
1762
|
+
multiple: { type: Boolean, default: !1 },
|
|
1763
|
+
maxSize: {},
|
|
1764
|
+
label: { default: "Drop files here or choose files" },
|
|
1765
|
+
hint: {},
|
|
1766
|
+
iconLabel: { default: "+" }
|
|
1767
|
+
},
|
|
1768
|
+
emits: ["files"],
|
|
1769
|
+
setup(e, { emit: l }) {
|
|
1770
|
+
const t = e, s = l, o = x(!1), d = k(() => t.hint || (t.maxSize ? `Max ${Math.round(t.maxSize / 1024 / 1024)} MB` : ""));
|
|
1771
|
+
function f($) {
|
|
1772
|
+
$ && s("files", Array.from($));
|
|
1773
|
+
}
|
|
1774
|
+
function r($) {
|
|
1775
|
+
f($.target.files);
|
|
1776
|
+
}
|
|
1777
|
+
function m($) {
|
|
1778
|
+
var I;
|
|
1779
|
+
o.value = !1, f(((I = $.dataTransfer) == null ? void 0 : I.files) || null);
|
|
1780
|
+
}
|
|
1781
|
+
return ($, I) => (a(), n("label", {
|
|
1782
|
+
class: "file-upload",
|
|
1783
|
+
"data-dragging": o.value || null,
|
|
1784
|
+
onDragover: I[0] || (I[0] = F((P) => o.value = !0, ["prevent"])),
|
|
1785
|
+
onDragleave: I[1] || (I[1] = F((P) => o.value = !1, ["prevent"])),
|
|
1786
|
+
onDrop: F(m, ["prevent"])
|
|
1787
|
+
}, [
|
|
1788
|
+
i("input", {
|
|
1789
|
+
class: "file-upload__input",
|
|
1790
|
+
type: "file",
|
|
1791
|
+
accept: e.accept,
|
|
1792
|
+
multiple: e.multiple,
|
|
1793
|
+
onChange: r
|
|
1794
|
+
}, null, 40, Nn),
|
|
1795
|
+
i("span", Hn, u(e.iconLabel), 1),
|
|
1796
|
+
i("strong", null, u(e.label), 1),
|
|
1797
|
+
d.value ? (a(), n("span", Un, u(d.value), 1)) : c("", !0)
|
|
1798
|
+
], 40, Zn));
|
|
1799
|
+
}
|
|
1800
|
+
}), qn = /* @__PURE__ */ p(On, [["__scopeId", "data-v-896dff88"]]), jn = ["data-orientation"], Gn = ["data-state"], Wn = { class: "stepper__circle" }, Jn = /* @__PURE__ */ b({
|
|
1801
|
+
name: "AStepper",
|
|
1802
|
+
__name: "AStepper",
|
|
1803
|
+
props: {
|
|
1804
|
+
steps: { default: () => [] },
|
|
1805
|
+
current: { default: 0 },
|
|
1806
|
+
orientation: { default: "horizontal" }
|
|
1807
|
+
},
|
|
1808
|
+
setup(e) {
|
|
1809
|
+
const l = e;
|
|
1810
|
+
function t(s) {
|
|
1811
|
+
return s < l.current ? "done" : s === l.current ? "current" : "upcoming";
|
|
1812
|
+
}
|
|
1813
|
+
return (s, o) => (a(), n("ol", {
|
|
1814
|
+
class: "stepper",
|
|
1815
|
+
"data-orientation": e.orientation
|
|
1816
|
+
}, [
|
|
1817
|
+
(a(!0), n(C, null, L(e.steps, (d, f) => (a(), n("li", {
|
|
1818
|
+
key: d.key,
|
|
1819
|
+
class: "stepper__item",
|
|
1820
|
+
"data-state": t(f)
|
|
1821
|
+
}, [
|
|
1822
|
+
i("span", Wn, u(f < e.current ? "✓" : f + 1), 1),
|
|
1823
|
+
i("span", null, u(d.label), 1)
|
|
1824
|
+
], 8, Gn))), 128))
|
|
1825
|
+
], 8, jn));
|
|
1826
|
+
}
|
|
1827
|
+
}), Qn = /* @__PURE__ */ p(Jn, [["__scopeId", "data-v-858cb9ff"]]), Xn = { class: "timeline" }, Yn = { class: "timeline__node" }, es = /* @__PURE__ */ b({
|
|
1828
|
+
name: "ATimeline",
|
|
1829
|
+
__name: "ATimeline",
|
|
1830
|
+
props: {
|
|
1831
|
+
items: { default: () => [] }
|
|
1832
|
+
},
|
|
1833
|
+
setup(e) {
|
|
1834
|
+
return (l, t) => (a(), n("ol", Xn, [
|
|
1835
|
+
(a(!0), n(C, null, L(e.items, (s, o) => (a(), n("li", {
|
|
1836
|
+
key: `${s.time}-${o}`,
|
|
1837
|
+
class: "timeline__item"
|
|
1838
|
+
}, [
|
|
1839
|
+
i("span", Yn, u(s.icon || ""), 1),
|
|
1840
|
+
i("p", null, [
|
|
1841
|
+
i("strong", null, u(s.actor), 1),
|
|
1842
|
+
T(" " + u(s.action) + " ", 1),
|
|
1843
|
+
i("time", null, u(s.time), 1)
|
|
1844
|
+
])
|
|
1845
|
+
]))), 128))
|
|
1846
|
+
]));
|
|
1847
|
+
}
|
|
1848
|
+
}), ts = /* @__PURE__ */ p(es, [["__scopeId", "data-v-38171d77"]]), as = {
|
|
1849
|
+
key: 0,
|
|
1850
|
+
class: "chart-frame__header"
|
|
1851
|
+
}, ls = { key: 0 }, ns = { class: "chart-frame__body" }, ss = /* @__PURE__ */ b({
|
|
1852
|
+
name: "AChartFrame",
|
|
1853
|
+
__name: "AChartFrame",
|
|
1854
|
+
props: {
|
|
1855
|
+
title: {},
|
|
1856
|
+
subtitle: {}
|
|
1857
|
+
},
|
|
1858
|
+
setup(e) {
|
|
1859
|
+
return (l, t) => (a(), E(ce, null, {
|
|
1860
|
+
default: O(() => [
|
|
1861
|
+
e.title || e.subtitle ? (a(), n("header", as, [
|
|
1862
|
+
i("h3", null, u(e.title), 1),
|
|
1863
|
+
e.subtitle ? (a(), n("p", ls, u(e.subtitle), 1)) : c("", !0)
|
|
1864
|
+
])) : c("", !0),
|
|
1865
|
+
i("div", ns, [
|
|
1866
|
+
g(l.$slots, "default", {}, void 0, !0)
|
|
1867
|
+
])
|
|
1868
|
+
]),
|
|
1869
|
+
_: 3
|
|
1870
|
+
}));
|
|
1871
|
+
}
|
|
1872
|
+
}), os = /* @__PURE__ */ p(ss, [["__scopeId", "data-v-49775319"]]), ds = [
|
|
1873
|
+
le,
|
|
1874
|
+
Ve,
|
|
1875
|
+
ut,
|
|
1876
|
+
At,
|
|
1877
|
+
ne,
|
|
1878
|
+
Lt,
|
|
1879
|
+
Dt,
|
|
1880
|
+
Ft,
|
|
1881
|
+
Ht,
|
|
1882
|
+
Xt,
|
|
1883
|
+
oa,
|
|
1884
|
+
_a,
|
|
1885
|
+
Ua,
|
|
1886
|
+
re,
|
|
1887
|
+
Qa,
|
|
1888
|
+
Xa,
|
|
1889
|
+
ce,
|
|
1890
|
+
xe,
|
|
1891
|
+
fe,
|
|
1892
|
+
hl,
|
|
1893
|
+
$l,
|
|
1894
|
+
oe,
|
|
1895
|
+
xl,
|
|
1896
|
+
Ll,
|
|
1897
|
+
Ie,
|
|
1898
|
+
Ce,
|
|
1899
|
+
Fl,
|
|
1900
|
+
jl,
|
|
1901
|
+
Yl,
|
|
1902
|
+
an,
|
|
1903
|
+
un,
|
|
1904
|
+
bn,
|
|
1905
|
+
wn,
|
|
1906
|
+
Cn,
|
|
1907
|
+
En,
|
|
1908
|
+
Fn,
|
|
1909
|
+
qn,
|
|
1910
|
+
Qn,
|
|
1911
|
+
ts,
|
|
1912
|
+
os
|
|
1913
|
+
], ms = {
|
|
1914
|
+
install(e) {
|
|
1915
|
+
ds.forEach((l) => {
|
|
1916
|
+
l.name && e.component(l.name, l);
|
|
1917
|
+
}), e.directive("a-focus", Ue);
|
|
1918
|
+
}
|
|
1919
|
+
};
|
|
1920
|
+
function vs(e = !1) {
|
|
1921
|
+
const l = x(e);
|
|
1922
|
+
return { isOpen: l, open: () => {
|
|
1923
|
+
l.value = !0;
|
|
1924
|
+
}, close: () => {
|
|
1925
|
+
l.value = !1;
|
|
1926
|
+
}, toggle: () => {
|
|
1927
|
+
l.value = !l.value;
|
|
1928
|
+
} };
|
|
1929
|
+
}
|
|
1930
|
+
const Le = "ainorix-density", Y = x("comfortable");
|
|
1931
|
+
let ye = !1;
|
|
1932
|
+
function is() {
|
|
1933
|
+
if (typeof window > "u") return "comfortable";
|
|
1934
|
+
const e = window.localStorage.getItem(Le);
|
|
1935
|
+
return e === "compact" || e === "comfortable" ? e : "comfortable";
|
|
1936
|
+
}
|
|
1937
|
+
function Be(e) {
|
|
1938
|
+
typeof document > "u" || (document.documentElement.dataset.density = e);
|
|
1939
|
+
}
|
|
1940
|
+
function us() {
|
|
1941
|
+
ye || (Y.value = is(), Be(Y.value), ye = !0);
|
|
1942
|
+
}
|
|
1943
|
+
function hs() {
|
|
1944
|
+
us();
|
|
1945
|
+
function e(l) {
|
|
1946
|
+
Y.value = l, Be(l), typeof window < "u" && window.localStorage.setItem(Le, l);
|
|
1947
|
+
}
|
|
1948
|
+
return { density: Y, set: e };
|
|
1949
|
+
}
|
|
1950
|
+
const ze = "ainorix-theme", U = x("light");
|
|
1951
|
+
let $e = !1;
|
|
1952
|
+
function rs() {
|
|
1953
|
+
var l;
|
|
1954
|
+
if (typeof window > "u") return "light";
|
|
1955
|
+
const e = window.localStorage.getItem(ze);
|
|
1956
|
+
return e === "light" || e === "dark" ? e : (l = window.matchMedia) != null && l.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
1957
|
+
}
|
|
1958
|
+
function Te(e) {
|
|
1959
|
+
typeof document > "u" || document.documentElement.classList.toggle("dark", e === "dark");
|
|
1960
|
+
}
|
|
1961
|
+
function cs() {
|
|
1962
|
+
$e || (U.value = rs(), Te(U.value), $e = !0);
|
|
1963
|
+
}
|
|
1964
|
+
function bs() {
|
|
1965
|
+
cs();
|
|
1966
|
+
const e = k(() => U.value === "dark");
|
|
1967
|
+
function l(s) {
|
|
1968
|
+
U.value = s, Te(s), typeof window < "u" && window.localStorage.setItem(ze, s);
|
|
1969
|
+
}
|
|
1970
|
+
function t() {
|
|
1971
|
+
l(U.value === "dark" ? "light" : "dark");
|
|
1972
|
+
}
|
|
1973
|
+
return { theme: U, isDark: e, set: l, toggle: t };
|
|
1974
|
+
}
|
|
1975
|
+
const _s = {
|
|
1976
|
+
name: "CheckIcon",
|
|
1977
|
+
render() {
|
|
1978
|
+
return _e("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true" }, [
|
|
1979
|
+
_e("path", {
|
|
1980
|
+
d: "M16.25 5.75 8.5 13.5 4.75 9.75",
|
|
1981
|
+
stroke: "currentColor",
|
|
1982
|
+
"stroke-width": "2",
|
|
1983
|
+
"stroke-linecap": "round",
|
|
1984
|
+
"stroke-linejoin": "round"
|
|
1985
|
+
})
|
|
1986
|
+
]);
|
|
1987
|
+
}
|
|
1988
|
+
};
|
|
1989
|
+
function ps(e) {
|
|
1990
|
+
const l = e ?? (typeof document < "u" ? document.documentElement : null);
|
|
1991
|
+
if (!l)
|
|
1992
|
+
return {
|
|
1993
|
+
accent: "",
|
|
1994
|
+
text: "",
|
|
1995
|
+
muted: "",
|
|
1996
|
+
grid: "",
|
|
1997
|
+
surface: ""
|
|
1998
|
+
};
|
|
1999
|
+
const t = getComputedStyle(l), s = (o) => t.getPropertyValue(o).trim();
|
|
2000
|
+
return {
|
|
2001
|
+
accent: s("--accent"),
|
|
2002
|
+
text: s("--text-primary"),
|
|
2003
|
+
muted: s("--text-tertiary"),
|
|
2004
|
+
grid: s("--chart-grid"),
|
|
2005
|
+
surface: s("--bg-surface")
|
|
2006
|
+
};
|
|
2007
|
+
}
|
|
2008
|
+
let ge = 0;
|
|
2009
|
+
function ys(e = "a") {
|
|
2010
|
+
return ge += 1, `${e}-${ge}`;
|
|
2011
|
+
}
|
|
2012
|
+
export {
|
|
2013
|
+
Cn as AAccordion,
|
|
2014
|
+
hl as AAlert,
|
|
2015
|
+
Ce as AAvatar,
|
|
2016
|
+
Fl as AAvatarGroup,
|
|
2017
|
+
re as ABadge,
|
|
2018
|
+
Fn as ABanner,
|
|
2019
|
+
Ll as ABreadcrumbs,
|
|
2020
|
+
le as AButton,
|
|
2021
|
+
ce as ACard,
|
|
2022
|
+
os as AChartFrame,
|
|
2023
|
+
ne as ACheckbox,
|
|
2024
|
+
wn as ADrawer,
|
|
2025
|
+
jl as AEmptyState,
|
|
2026
|
+
qn as AFileUpload,
|
|
2027
|
+
ut as AFormField,
|
|
2028
|
+
fe as AIcon,
|
|
2029
|
+
Ve as AInput,
|
|
2030
|
+
Yl as AKpiCard,
|
|
2031
|
+
Xt as AModal,
|
|
2032
|
+
bn as ANumberInput,
|
|
2033
|
+
Ie as APagination,
|
|
2034
|
+
En as APopover,
|
|
2035
|
+
$l as AProgress,
|
|
2036
|
+
Lt as ARadio,
|
|
2037
|
+
Ft as ASegmented,
|
|
2038
|
+
At as ASelect,
|
|
2039
|
+
un as ASidebarNav,
|
|
2040
|
+
oe as ASkeleton,
|
|
2041
|
+
Ht as ASlider,
|
|
2042
|
+
xe as ASpinner,
|
|
2043
|
+
Xa as AStatusPill,
|
|
2044
|
+
Qn as AStepper,
|
|
2045
|
+
Dt as ASwitch,
|
|
2046
|
+
Ua as ATable,
|
|
2047
|
+
xl as ATabs,
|
|
2048
|
+
Qa as ATag,
|
|
2049
|
+
ts as ATimeline,
|
|
2050
|
+
oa as AToast,
|
|
2051
|
+
_a as AToastHost,
|
|
2052
|
+
an as ATooltip,
|
|
2053
|
+
ms as AinorixUI,
|
|
2054
|
+
_s as CheckIcon,
|
|
2055
|
+
ds as components,
|
|
2056
|
+
ys as createAId,
|
|
2057
|
+
ms as default,
|
|
2058
|
+
ps as getChartTheme,
|
|
2059
|
+
hs as useDensity,
|
|
2060
|
+
vs as useDisclosure,
|
|
2061
|
+
bs as useTheme,
|
|
2062
|
+
ua as useToast,
|
|
2063
|
+
Ue as vAFocus
|
|
2064
|
+
};
|
|
2065
|
+
//# sourceMappingURL=ainorix-ui.js.map
|