@dillingerstaffing/strand-vue 0.4.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/dist/components/Alert/Alert.vue.d.ts +31 -0
- package/dist/components/Alert/Alert.vue.d.ts.map +1 -0
- package/dist/components/Alert/index.d.ts +3 -0
- package/dist/components/Alert/index.d.ts.map +1 -0
- package/dist/components/Avatar/Avatar.vue.d.ts +20 -0
- package/dist/components/Avatar/Avatar.vue.d.ts.map +1 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.d.ts.map +1 -0
- package/dist/components/Badge/Badge.vue.d.ts +35 -0
- package/dist/components/Badge/Badge.vue.d.ts.map +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.d.ts.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts +15 -0
- package/dist/components/Breadcrumb/Breadcrumb.vue.d.ts.map +1 -0
- package/dist/components/Breadcrumb/index.d.ts +3 -0
- package/dist/components/Breadcrumb/index.d.ts.map +1 -0
- package/dist/components/Button/Button.vue.d.ts +46 -0
- package/dist/components/Button/Button.vue.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Card/Card.vue.d.ts +30 -0
- package/dist/components/Card/Card.vue.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.vue.d.ts +23 -0
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts +3 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/Container/Container.vue.d.ts +27 -0
- package/dist/components/Container/Container.vue.d.ts.map +1 -0
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/Container/index.d.ts.map +1 -0
- package/dist/components/DataReadout/DataReadout.vue.d.ts +15 -0
- package/dist/components/DataReadout/DataReadout.vue.d.ts.map +1 -0
- package/dist/components/DataReadout/index.d.ts +2 -0
- package/dist/components/DataReadout/index.d.ts.map +1 -0
- package/dist/components/Dialog/Dialog.vue.d.ts +39 -0
- package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -0
- package/dist/components/Dialog/index.d.ts +3 -0
- package/dist/components/Dialog/index.d.ts.map +1 -0
- package/dist/components/Divider/Divider.vue.d.ts +14 -0
- package/dist/components/Divider/Divider.vue.d.ts.map +1 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.d.ts.map +1 -0
- package/dist/components/FormField/FormField.vue.d.ts +32 -0
- package/dist/components/FormField/FormField.vue.d.ts.map +1 -0
- package/dist/components/FormField/index.d.ts +3 -0
- package/dist/components/FormField/index.d.ts.map +1 -0
- package/dist/components/Grid/Grid.vue.d.ts +30 -0
- package/dist/components/Grid/Grid.vue.d.ts.map +1 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.d.ts.map +1 -0
- package/dist/components/Input/Input.vue.d.ts +37 -0
- package/dist/components/Input/Input.vue.d.ts.map +1 -0
- package/dist/components/Input/index.d.ts +3 -0
- package/dist/components/Input/index.d.ts.map +1 -0
- package/dist/components/Link/Link.vue.d.ts +29 -0
- package/dist/components/Link/Link.vue.d.ts.map +1 -0
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Link/index.d.ts.map +1 -0
- package/dist/components/Nav/Nav.vue.d.ts +30 -0
- package/dist/components/Nav/Nav.vue.d.ts.map +1 -0
- package/dist/components/Nav/index.d.ts +3 -0
- package/dist/components/Nav/index.d.ts.map +1 -0
- package/dist/components/Progress/Progress.vue.d.ts +17 -0
- package/dist/components/Progress/Progress.vue.d.ts.map +1 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/index.d.ts.map +1 -0
- package/dist/components/Radio/Radio.vue.d.ts +22 -0
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -0
- package/dist/components/Radio/index.d.ts +3 -0
- package/dist/components/Radio/index.d.ts.map +1 -0
- package/dist/components/Section/Section.vue.d.ts +30 -0
- package/dist/components/Section/Section.vue.d.ts.map +1 -0
- package/dist/components/Section/index.d.ts +2 -0
- package/dist/components/Section/index.d.ts.map +1 -0
- package/dist/components/Select/Select.vue.d.ts +26 -0
- package/dist/components/Select/Select.vue.d.ts.map +1 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Select/index.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.vue.d.ts +16 -0
- package/dist/components/Skeleton/Skeleton.vue.d.ts.map +1 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Slider/Slider.vue.d.ts +24 -0
- package/dist/components/Slider/Slider.vue.d.ts.map +1 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Spinner/Spinner.vue.d.ts +12 -0
- package/dist/components/Spinner/Spinner.vue.d.ts.map +1 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.d.ts.map +1 -0
- package/dist/components/Stack/Stack.vue.d.ts +38 -0
- package/dist/components/Stack/Stack.vue.d.ts.map +1 -0
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stack/index.d.ts.map +1 -0
- package/dist/components/Switch/Switch.vue.d.ts +18 -0
- package/dist/components/Switch/Switch.vue.d.ts.map +1 -0
- package/dist/components/Switch/index.d.ts +3 -0
- package/dist/components/Switch/index.d.ts.map +1 -0
- package/dist/components/Table/Table.vue.d.ts +23 -0
- package/dist/components/Table/Table.vue.d.ts.map +1 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/index.d.ts.map +1 -0
- package/dist/components/Tabs/Tabs.vue.d.ts +34 -0
- package/dist/components/Tabs/Tabs.vue.d.ts.map +1 -0
- package/dist/components/Tabs/index.d.ts +3 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tag/Tag.vue.d.ts +37 -0
- package/dist/components/Tag/Tag.vue.d.ts.map +1 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Tag/index.d.ts.map +1 -0
- package/dist/components/Textarea/Textarea.vue.d.ts +29 -0
- package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -0
- package/dist/components/Textarea/index.d.ts +3 -0
- package/dist/components/Textarea/index.d.ts.map +1 -0
- package/dist/components/Toast/Toast.vue.d.ts +16 -0
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -0
- package/dist/components/Toast/ToastProvider.vue.d.ts +18 -0
- package/dist/components/Toast/ToastProvider.vue.d.ts.map +1 -0
- package/dist/components/Toast/index.d.ts +6 -0
- package/dist/components/Toast/index.d.ts.map +1 -0
- package/dist/components/Toast/useToast.d.ts +13 -0
- package/dist/components/Toast/useToast.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts +29 -0
- package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/Tooltip/index.d.ts +3 -0
- package/dist/components/Tooltip/index.d.ts.map +1 -0
- package/dist/css/strand-ui.css +2534 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1413 -0
- package/dist/index.js.map +1 -0
- package/dist/test-setup.d.ts +1 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/package.json +51 -0
- package/src/components/Alert/Alert.test.ts +100 -0
- package/src/components/Alert/Alert.vue +54 -0
- package/src/components/Alert/index.ts +2 -0
- package/src/components/Avatar/Avatar.test.ts +105 -0
- package/src/components/Avatar/Avatar.vue +56 -0
- package/src/components/Avatar/index.ts +1 -0
- package/src/components/Badge/Badge.test.ts +114 -0
- package/src/components/Badge/Badge.vue +66 -0
- package/src/components/Badge/index.ts +1 -0
- package/src/components/Breadcrumb/Breadcrumb.test.ts +119 -0
- package/src/components/Breadcrumb/Breadcrumb.vue +58 -0
- package/src/components/Breadcrumb/index.ts +2 -0
- package/src/components/Button/Button.test.ts +148 -0
- package/src/components/Button/Button.vue +75 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Card/Card.test.ts +93 -0
- package/src/components/Card/Card.vue +36 -0
- package/src/components/Card/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.test.ts +118 -0
- package/src/components/Checkbox/Checkbox.vue +117 -0
- package/src/components/Checkbox/index.ts +2 -0
- package/src/components/Container/Container.test.ts +70 -0
- package/src/components/Container/Container.vue +32 -0
- package/src/components/Container/index.ts +1 -0
- package/src/components/DataReadout/DataReadout.test.ts +99 -0
- package/src/components/DataReadout/DataReadout.vue +36 -0
- package/src/components/DataReadout/index.ts +1 -0
- package/src/components/Dialog/Dialog.test.ts +224 -0
- package/src/components/Dialog/Dialog.vue +146 -0
- package/src/components/Dialog/index.ts +2 -0
- package/src/components/Divider/Divider.test.ts +95 -0
- package/src/components/Divider/Divider.vue +63 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/FormField/FormField.test.ts +98 -0
- package/src/components/FormField/FormField.vue +59 -0
- package/src/components/FormField/index.ts +2 -0
- package/src/components/Grid/Grid.test.ts +73 -0
- package/src/components/Grid/Grid.vue +34 -0
- package/src/components/Grid/index.ts +1 -0
- package/src/components/Input/Input.test.ts +102 -0
- package/src/components/Input/Input.vue +63 -0
- package/src/components/Input/index.ts +2 -0
- package/src/components/Link/Link.test.ts +92 -0
- package/src/components/Link/Link.vue +35 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/Nav/Nav.test.ts +171 -0
- package/src/components/Nav/Nav.vue +81 -0
- package/src/components/Nav/index.ts +2 -0
- package/src/components/Progress/Progress.test.ts +103 -0
- package/src/components/Progress/Progress.vue +96 -0
- package/src/components/Progress/index.ts +1 -0
- package/src/components/Radio/Radio.test.ts +92 -0
- package/src/components/Radio/Radio.vue +60 -0
- package/src/components/Radio/index.ts +2 -0
- package/src/components/Section/Section.test.ts +77 -0
- package/src/components/Section/Section.vue +36 -0
- package/src/components/Section/index.ts +1 -0
- package/src/components/Select/Select.test.ts +102 -0
- package/src/components/Select/Select.vue +70 -0
- package/src/components/Select/index.ts +2 -0
- package/src/components/Skeleton/Skeleton.test.ts +77 -0
- package/src/components/Skeleton/Skeleton.vue +48 -0
- package/src/components/Skeleton/index.ts +1 -0
- package/src/components/Slider/Slider.test.ts +73 -0
- package/src/components/Slider/Slider.vue +60 -0
- package/src/components/Slider/index.ts +2 -0
- package/src/components/Spinner/Spinner.test.ts +66 -0
- package/src/components/Spinner/Spinner.vue +33 -0
- package/src/components/Spinner/index.ts +1 -0
- package/src/components/Stack/Stack.test.ts +140 -0
- package/src/components/Stack/Stack.vue +50 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Switch/Switch.test.ts +116 -0
- package/src/components/Switch/Switch.vue +62 -0
- package/src/components/Switch/index.ts +2 -0
- package/src/components/Table/Table.test.ts +152 -0
- package/src/components/Table/Table.vue +98 -0
- package/src/components/Table/index.ts +2 -0
- package/src/components/Tabs/Tabs.test.ts +138 -0
- package/src/components/Tabs/Tabs.vue +96 -0
- package/src/components/Tabs/index.ts +2 -0
- package/src/components/Tag/Tag.test.ts +128 -0
- package/src/components/Tag/Tag.vue +65 -0
- package/src/components/Tag/index.ts +1 -0
- package/src/components/Textarea/Textarea.test.ts +107 -0
- package/src/components/Textarea/Textarea.vue +90 -0
- package/src/components/Textarea/index.ts +2 -0
- package/src/components/Toast/Toast.test.ts +204 -0
- package/src/components/Toast/Toast.vue +48 -0
- package/src/components/Toast/ToastProvider.vue +80 -0
- package/src/components/Toast/index.ts +5 -0
- package/src/components/Toast/useToast.ts +26 -0
- package/src/components/Tooltip/Tooltip.test.ts +145 -0
- package/src/components/Tooltip/Tooltip.vue +79 -0
- package/src/components/Tooltip/index.ts +2 -0
- package/src/index.ts +44 -0
- package/src/test-setup.ts +7 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1413 @@
|
|
|
1
|
+
import { defineComponent as h, computed as c, openBlock as n, createElementBlock as l, normalizeClass as b, createCommentVNode as $, createElementVNode as f, normalizeStyle as S, renderSlot as g, useSlots as E, ref as x, watch as z, onMounted as L, toDisplayString as _, Fragment as k, renderList as w, createTextVNode as N, mergeProps as y, inject as A, provide as F, onUnmounted as V, nextTick as K } from "vue";
|
|
2
|
+
const M = ["type", "disabled", "aria-disabled", "aria-busy"], P = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "strand-btn__spinner",
|
|
5
|
+
"aria-hidden": "true"
|
|
6
|
+
}, na = /* @__PURE__ */ h({
|
|
7
|
+
__name: "Button",
|
|
8
|
+
props: {
|
|
9
|
+
variant: { default: "primary" },
|
|
10
|
+
size: { default: "md" },
|
|
11
|
+
loading: { type: Boolean, default: !1 },
|
|
12
|
+
iconOnly: { type: Boolean, default: !1 },
|
|
13
|
+
type: { default: "button" },
|
|
14
|
+
disabled: { type: Boolean, default: !1 },
|
|
15
|
+
fullWidth: { type: Boolean, default: !1 }
|
|
16
|
+
},
|
|
17
|
+
emits: ["click"],
|
|
18
|
+
setup(e, { emit: t }) {
|
|
19
|
+
const a = e, r = t, s = c(() => a.disabled || a.loading), o = c(
|
|
20
|
+
() => [
|
|
21
|
+
"strand-btn",
|
|
22
|
+
`strand-btn--${a.variant}`,
|
|
23
|
+
`strand-btn--${a.size}`,
|
|
24
|
+
a.iconOnly && "strand-btn--icon-only",
|
|
25
|
+
a.fullWidth && "strand-btn--full-width",
|
|
26
|
+
a.loading && "strand-btn--loading"
|
|
27
|
+
].filter(Boolean).join(" ")
|
|
28
|
+
);
|
|
29
|
+
function d(i) {
|
|
30
|
+
s.value || r("click", i);
|
|
31
|
+
}
|
|
32
|
+
return (i, u) => (n(), l("button", {
|
|
33
|
+
type: e.type,
|
|
34
|
+
class: b(o.value),
|
|
35
|
+
disabled: s.value,
|
|
36
|
+
"aria-disabled": s.value ? "true" : void 0,
|
|
37
|
+
"aria-busy": e.loading ? "true" : void 0,
|
|
38
|
+
onClick: d
|
|
39
|
+
}, [
|
|
40
|
+
e.loading ? (n(), l("span", P)) : $("", !0),
|
|
41
|
+
f("span", {
|
|
42
|
+
class: "strand-btn__content",
|
|
43
|
+
style: S(e.loading ? { visibility: "hidden" } : void 0)
|
|
44
|
+
}, [
|
|
45
|
+
g(i.$slots, "default")
|
|
46
|
+
], 4)
|
|
47
|
+
], 10, M));
|
|
48
|
+
}
|
|
49
|
+
}), q = {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "strand-input__leading",
|
|
52
|
+
"aria-hidden": "true"
|
|
53
|
+
}, U = ["type", "disabled", "aria-invalid", "value"], G = {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: "strand-input__trailing",
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}, la = /* @__PURE__ */ h({
|
|
58
|
+
__name: "Input",
|
|
59
|
+
props: {
|
|
60
|
+
type: { default: "text" },
|
|
61
|
+
error: { type: Boolean, default: !1 },
|
|
62
|
+
disabled: { type: Boolean, default: !1 },
|
|
63
|
+
modelValue: {}
|
|
64
|
+
},
|
|
65
|
+
emits: ["update:modelValue"],
|
|
66
|
+
setup(e, { emit: t }) {
|
|
67
|
+
const a = e, r = t, s = E(), o = c(
|
|
68
|
+
() => [
|
|
69
|
+
"strand-input",
|
|
70
|
+
a.error && "strand-input--error",
|
|
71
|
+
a.disabled && "strand-input--disabled",
|
|
72
|
+
!!s.leading && "strand-input--has-leading",
|
|
73
|
+
!!s.trailing && "strand-input--has-trailing"
|
|
74
|
+
].filter(Boolean).join(" ")
|
|
75
|
+
);
|
|
76
|
+
function d(i) {
|
|
77
|
+
const u = i.target;
|
|
78
|
+
r("update:modelValue", u.value);
|
|
79
|
+
}
|
|
80
|
+
return (i, u) => (n(), l("div", {
|
|
81
|
+
class: b(o.value)
|
|
82
|
+
}, [
|
|
83
|
+
i.$slots.leading ? (n(), l("span", q, [
|
|
84
|
+
g(i.$slots, "leading")
|
|
85
|
+
])) : $("", !0),
|
|
86
|
+
f("input", {
|
|
87
|
+
type: e.type,
|
|
88
|
+
class: "strand-input__field",
|
|
89
|
+
disabled: e.disabled,
|
|
90
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
91
|
+
value: e.modelValue,
|
|
92
|
+
onInput: d
|
|
93
|
+
}, null, 40, U),
|
|
94
|
+
i.$slots.trailing ? (n(), l("span", G, [
|
|
95
|
+
g(i.$slots, "trailing")
|
|
96
|
+
])) : $("", !0)
|
|
97
|
+
], 2));
|
|
98
|
+
}
|
|
99
|
+
}), H = ["disabled", "aria-invalid", "maxlength", "value"], W = {
|
|
100
|
+
key: 0,
|
|
101
|
+
class: "strand-textarea__count",
|
|
102
|
+
"aria-live": "polite"
|
|
103
|
+
}, ra = /* @__PURE__ */ h({
|
|
104
|
+
__name: "Textarea",
|
|
105
|
+
props: {
|
|
106
|
+
autoResize: { type: Boolean, default: !1 },
|
|
107
|
+
showCount: { type: Boolean, default: !1 },
|
|
108
|
+
error: { type: Boolean, default: !1 },
|
|
109
|
+
maxLength: {},
|
|
110
|
+
disabled: { type: Boolean, default: !1 },
|
|
111
|
+
modelValue: { default: "" }
|
|
112
|
+
},
|
|
113
|
+
emits: ["update:modelValue"],
|
|
114
|
+
setup(e, { emit: t }) {
|
|
115
|
+
const a = e, r = t, s = x(null), o = c(
|
|
116
|
+
() => [
|
|
117
|
+
"strand-textarea",
|
|
118
|
+
a.error && "strand-textarea--error",
|
|
119
|
+
a.disabled && "strand-textarea--disabled",
|
|
120
|
+
a.autoResize && "strand-textarea--auto-resize"
|
|
121
|
+
].filter(Boolean).join(" ")
|
|
122
|
+
), d = c(
|
|
123
|
+
() => typeof a.modelValue == "string" ? a.modelValue.length : 0
|
|
124
|
+
);
|
|
125
|
+
function i() {
|
|
126
|
+
a.autoResize && s.value && (s.value.style.height = "auto", s.value.style.height = `${s.value.scrollHeight}px`);
|
|
127
|
+
}
|
|
128
|
+
function u(m) {
|
|
129
|
+
const v = m.target;
|
|
130
|
+
r("update:modelValue", v.value), i();
|
|
131
|
+
}
|
|
132
|
+
return z(() => a.modelValue, () => {
|
|
133
|
+
i();
|
|
134
|
+
}), L(() => {
|
|
135
|
+
i();
|
|
136
|
+
}), (m, v) => (n(), l("div", {
|
|
137
|
+
class: b(o.value)
|
|
138
|
+
}, [
|
|
139
|
+
f("textarea", {
|
|
140
|
+
ref_key: "textareaRef",
|
|
141
|
+
ref: s,
|
|
142
|
+
class: "strand-textarea__field",
|
|
143
|
+
disabled: e.disabled,
|
|
144
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
145
|
+
maxlength: e.maxLength,
|
|
146
|
+
value: e.modelValue,
|
|
147
|
+
onInput: u
|
|
148
|
+
}, null, 40, H),
|
|
149
|
+
e.showCount && e.maxLength != null ? (n(), l("span", W, _(d.value) + "/" + _(e.maxLength), 1)) : $("", !0)
|
|
150
|
+
], 2));
|
|
151
|
+
}
|
|
152
|
+
}), Z = ["value", "disabled", "aria-invalid"], J = {
|
|
153
|
+
key: 0,
|
|
154
|
+
value: "",
|
|
155
|
+
disabled: ""
|
|
156
|
+
}, Q = ["value"], ia = /* @__PURE__ */ h({
|
|
157
|
+
__name: "Select",
|
|
158
|
+
props: {
|
|
159
|
+
options: {},
|
|
160
|
+
disabled: { type: Boolean, default: !1 },
|
|
161
|
+
modelValue: {},
|
|
162
|
+
error: { type: Boolean, default: !1 },
|
|
163
|
+
placeholder: {}
|
|
164
|
+
},
|
|
165
|
+
emits: ["update:modelValue"],
|
|
166
|
+
setup(e, { emit: t }) {
|
|
167
|
+
const a = e, r = t, s = c(
|
|
168
|
+
() => [
|
|
169
|
+
"strand-select",
|
|
170
|
+
a.error && "strand-select--error",
|
|
171
|
+
a.disabled && "strand-select--disabled"
|
|
172
|
+
].filter(Boolean).join(" ")
|
|
173
|
+
);
|
|
174
|
+
function o(d) {
|
|
175
|
+
const i = d.target;
|
|
176
|
+
r("update:modelValue", i.value);
|
|
177
|
+
}
|
|
178
|
+
return (d, i) => (n(), l("div", {
|
|
179
|
+
class: b(s.value)
|
|
180
|
+
}, [
|
|
181
|
+
f("select", {
|
|
182
|
+
class: "strand-select__field",
|
|
183
|
+
value: e.modelValue,
|
|
184
|
+
disabled: e.disabled,
|
|
185
|
+
"aria-invalid": e.error ? "true" : void 0,
|
|
186
|
+
onChange: o
|
|
187
|
+
}, [
|
|
188
|
+
e.placeholder ? (n(), l("option", J, _(e.placeholder), 1)) : $("", !0),
|
|
189
|
+
(n(!0), l(k, null, w(e.options, (u) => (n(), l("option", {
|
|
190
|
+
key: u.value,
|
|
191
|
+
value: u.value
|
|
192
|
+
}, _(u.label), 9, Q))), 128))
|
|
193
|
+
], 40, Z),
|
|
194
|
+
i[0] || (i[0] = f("span", {
|
|
195
|
+
class: "strand-select__arrow",
|
|
196
|
+
"aria-hidden": "true"
|
|
197
|
+
}, null, -1))
|
|
198
|
+
], 2));
|
|
199
|
+
}
|
|
200
|
+
}), X = ["checked", "disabled", "aria-checked"], Y = {
|
|
201
|
+
class: "strand-checkbox__control",
|
|
202
|
+
"aria-hidden": "true"
|
|
203
|
+
}, ee = {
|
|
204
|
+
key: 0,
|
|
205
|
+
class: "strand-checkbox__icon",
|
|
206
|
+
viewBox: "0 0 16 16",
|
|
207
|
+
fill: "none"
|
|
208
|
+
}, ae = {
|
|
209
|
+
key: 1,
|
|
210
|
+
class: "strand-checkbox__icon",
|
|
211
|
+
viewBox: "0 0 16 16",
|
|
212
|
+
fill: "none"
|
|
213
|
+
}, te = {
|
|
214
|
+
key: 0,
|
|
215
|
+
class: "strand-checkbox__label"
|
|
216
|
+
}, oa = /* @__PURE__ */ h({
|
|
217
|
+
__name: "Checkbox",
|
|
218
|
+
props: {
|
|
219
|
+
checked: { type: Boolean, default: !1 },
|
|
220
|
+
indeterminate: { type: Boolean, default: !1 },
|
|
221
|
+
disabled: { type: Boolean, default: !1 },
|
|
222
|
+
label: {}
|
|
223
|
+
},
|
|
224
|
+
emits: ["change"],
|
|
225
|
+
setup(e, { emit: t }) {
|
|
226
|
+
const a = e, r = t, s = x(null);
|
|
227
|
+
L(() => {
|
|
228
|
+
s.value && (s.value.indeterminate = a.indeterminate);
|
|
229
|
+
}), z(() => a.indeterminate, (m) => {
|
|
230
|
+
s.value && (s.value.indeterminate = m);
|
|
231
|
+
});
|
|
232
|
+
const o = c(
|
|
233
|
+
() => [
|
|
234
|
+
"strand-checkbox",
|
|
235
|
+
a.checked && "strand-checkbox--checked",
|
|
236
|
+
a.indeterminate && "strand-checkbox--indeterminate",
|
|
237
|
+
a.disabled && "strand-checkbox--disabled"
|
|
238
|
+
].filter(Boolean).join(" ")
|
|
239
|
+
), d = c(
|
|
240
|
+
() => a.indeterminate ? "mixed" : a.checked ? "true" : "false"
|
|
241
|
+
);
|
|
242
|
+
function i(m) {
|
|
243
|
+
a.disabled || r("change", m);
|
|
244
|
+
}
|
|
245
|
+
function u(m) {
|
|
246
|
+
m.key === " " && !a.disabled && (m.preventDefault(), s.value && s.value.click());
|
|
247
|
+
}
|
|
248
|
+
return (m, v) => (n(), l("label", {
|
|
249
|
+
class: b(o.value),
|
|
250
|
+
onKeydown: u
|
|
251
|
+
}, [
|
|
252
|
+
f("input", {
|
|
253
|
+
ref_key: "inputRef",
|
|
254
|
+
ref: s,
|
|
255
|
+
type: "checkbox",
|
|
256
|
+
class: "strand-checkbox__native",
|
|
257
|
+
checked: e.checked,
|
|
258
|
+
disabled: e.disabled,
|
|
259
|
+
"aria-checked": d.value,
|
|
260
|
+
role: "checkbox",
|
|
261
|
+
onChange: i
|
|
262
|
+
}, null, 40, X),
|
|
263
|
+
f("span", Y, [
|
|
264
|
+
e.indeterminate ? (n(), l("svg", ee, [...v[0] || (v[0] = [
|
|
265
|
+
f("line", {
|
|
266
|
+
x1: "4",
|
|
267
|
+
y1: "8",
|
|
268
|
+
x2: "12",
|
|
269
|
+
y2: "8",
|
|
270
|
+
stroke: "currentColor",
|
|
271
|
+
"stroke-width": "2",
|
|
272
|
+
"stroke-linecap": "round"
|
|
273
|
+
}, null, -1)
|
|
274
|
+
])])) : e.checked ? (n(), l("svg", ae, [...v[1] || (v[1] = [
|
|
275
|
+
f("path", {
|
|
276
|
+
d: "M3.5 8L6.5 11L12.5 5",
|
|
277
|
+
stroke: "currentColor",
|
|
278
|
+
"stroke-width": "2",
|
|
279
|
+
"stroke-linecap": "round",
|
|
280
|
+
"stroke-linejoin": "round"
|
|
281
|
+
}, null, -1)
|
|
282
|
+
])])) : $("", !0)
|
|
283
|
+
]),
|
|
284
|
+
e.label ? (n(), l("span", te, _(e.label), 1)) : $("", !0)
|
|
285
|
+
], 34));
|
|
286
|
+
}
|
|
287
|
+
}), se = ["checked", "disabled", "name", "value"], ne = {
|
|
288
|
+
key: 0,
|
|
289
|
+
class: "strand-radio__label"
|
|
290
|
+
}, da = /* @__PURE__ */ h({
|
|
291
|
+
__name: "Radio",
|
|
292
|
+
props: {
|
|
293
|
+
checked: { type: Boolean, default: !1 },
|
|
294
|
+
disabled: { type: Boolean, default: !1 },
|
|
295
|
+
label: {},
|
|
296
|
+
name: {},
|
|
297
|
+
value: {}
|
|
298
|
+
},
|
|
299
|
+
emits: ["change"],
|
|
300
|
+
setup(e, { emit: t }) {
|
|
301
|
+
const a = e, r = t, s = c(
|
|
302
|
+
() => [
|
|
303
|
+
"strand-radio",
|
|
304
|
+
a.checked && "strand-radio--checked",
|
|
305
|
+
a.disabled && "strand-radio--disabled"
|
|
306
|
+
].filter(Boolean).join(" ")
|
|
307
|
+
);
|
|
308
|
+
function o(d) {
|
|
309
|
+
a.disabled || r("change", d);
|
|
310
|
+
}
|
|
311
|
+
return (d, i) => (n(), l("label", {
|
|
312
|
+
class: b(s.value)
|
|
313
|
+
}, [
|
|
314
|
+
f("input", {
|
|
315
|
+
type: "radio",
|
|
316
|
+
class: "strand-radio__native",
|
|
317
|
+
checked: e.checked,
|
|
318
|
+
disabled: e.disabled,
|
|
319
|
+
name: e.name,
|
|
320
|
+
value: e.value,
|
|
321
|
+
onChange: o
|
|
322
|
+
}, null, 40, se),
|
|
323
|
+
i[0] || (i[0] = f("span", {
|
|
324
|
+
class: "strand-radio__control",
|
|
325
|
+
"aria-hidden": "true"
|
|
326
|
+
}, [
|
|
327
|
+
f("span", { class: "strand-radio__dot" })
|
|
328
|
+
], -1)),
|
|
329
|
+
e.label ? (n(), l("span", ne, _(e.label), 1)) : $("", !0)
|
|
330
|
+
], 2));
|
|
331
|
+
}
|
|
332
|
+
}), le = ["aria-checked", "disabled"], re = {
|
|
333
|
+
key: 0,
|
|
334
|
+
class: "strand-switch__label"
|
|
335
|
+
}, ca = /* @__PURE__ */ h({
|
|
336
|
+
__name: "Switch",
|
|
337
|
+
props: {
|
|
338
|
+
checked: { type: Boolean, default: !1 },
|
|
339
|
+
disabled: { type: Boolean, default: !1 },
|
|
340
|
+
label: {}
|
|
341
|
+
},
|
|
342
|
+
emits: ["change"],
|
|
343
|
+
setup(e, { emit: t }) {
|
|
344
|
+
const a = e, r = t, s = c(
|
|
345
|
+
() => [
|
|
346
|
+
"strand-switch",
|
|
347
|
+
a.checked && "strand-switch--checked",
|
|
348
|
+
a.disabled && "strand-switch--disabled"
|
|
349
|
+
].filter(Boolean).join(" ")
|
|
350
|
+
);
|
|
351
|
+
function o() {
|
|
352
|
+
a.disabled || r("change", !a.checked);
|
|
353
|
+
}
|
|
354
|
+
function d(i) {
|
|
355
|
+
(i.key === " " || i.key === "Enter") && !a.disabled && (i.preventDefault(), r("change", !a.checked));
|
|
356
|
+
}
|
|
357
|
+
return (i, u) => (n(), l("label", {
|
|
358
|
+
class: b(s.value)
|
|
359
|
+
}, [
|
|
360
|
+
f("button", {
|
|
361
|
+
type: "button",
|
|
362
|
+
role: "switch",
|
|
363
|
+
class: "strand-switch__track",
|
|
364
|
+
"aria-checked": e.checked ? "true" : "false",
|
|
365
|
+
disabled: e.disabled,
|
|
366
|
+
onClick: o,
|
|
367
|
+
onKeydown: d
|
|
368
|
+
}, [...u[0] || (u[0] = [
|
|
369
|
+
f("span", {
|
|
370
|
+
class: "strand-switch__thumb",
|
|
371
|
+
"aria-hidden": "true"
|
|
372
|
+
}, null, -1)
|
|
373
|
+
])], 40, le),
|
|
374
|
+
e.label ? (n(), l("span", re, _(e.label), 1)) : $("", !0)
|
|
375
|
+
], 2));
|
|
376
|
+
}
|
|
377
|
+
}), ie = ["min", "max", "step", "value", "disabled", "aria-valuemin", "aria-valuemax", "aria-valuenow"], ua = /* @__PURE__ */ h({
|
|
378
|
+
__name: "Slider",
|
|
379
|
+
props: {
|
|
380
|
+
min: { default: 0 },
|
|
381
|
+
max: { default: 100 },
|
|
382
|
+
step: { default: 1 },
|
|
383
|
+
modelValue: {},
|
|
384
|
+
disabled: { type: Boolean, default: !1 }
|
|
385
|
+
},
|
|
386
|
+
emits: ["update:modelValue"],
|
|
387
|
+
setup(e, { emit: t }) {
|
|
388
|
+
const a = e, r = t, s = c(
|
|
389
|
+
() => [
|
|
390
|
+
"strand-slider",
|
|
391
|
+
a.disabled && "strand-slider--disabled"
|
|
392
|
+
].filter(Boolean).join(" ")
|
|
393
|
+
);
|
|
394
|
+
function o(d) {
|
|
395
|
+
const i = d.target;
|
|
396
|
+
r("update:modelValue", Number(i.value));
|
|
397
|
+
}
|
|
398
|
+
return (d, i) => (n(), l("div", {
|
|
399
|
+
class: b(s.value)
|
|
400
|
+
}, [
|
|
401
|
+
f("input", {
|
|
402
|
+
type: "range",
|
|
403
|
+
class: "strand-slider__field",
|
|
404
|
+
min: e.min,
|
|
405
|
+
max: e.max,
|
|
406
|
+
step: e.step,
|
|
407
|
+
value: e.modelValue,
|
|
408
|
+
disabled: e.disabled,
|
|
409
|
+
"aria-valuemin": e.min,
|
|
410
|
+
"aria-valuemax": e.max,
|
|
411
|
+
"aria-valuenow": e.modelValue,
|
|
412
|
+
onInput: o
|
|
413
|
+
}, null, 40, ie)
|
|
414
|
+
], 2));
|
|
415
|
+
}
|
|
416
|
+
}), oe = ["for"], de = {
|
|
417
|
+
key: 0,
|
|
418
|
+
class: "strand-form-field__required",
|
|
419
|
+
"aria-hidden": "true"
|
|
420
|
+
}, ce = { class: "strand-form-field__control" }, ue = ["id"], fe = ["id"], fa = /* @__PURE__ */ h({
|
|
421
|
+
__name: "FormField",
|
|
422
|
+
props: {
|
|
423
|
+
label: {},
|
|
424
|
+
htmlFor: {},
|
|
425
|
+
hint: {},
|
|
426
|
+
error: {},
|
|
427
|
+
required: { type: Boolean, default: !1 }
|
|
428
|
+
},
|
|
429
|
+
setup(e) {
|
|
430
|
+
const t = e, a = c(
|
|
431
|
+
() => [
|
|
432
|
+
"strand-form-field",
|
|
433
|
+
t.error && "strand-form-field--error"
|
|
434
|
+
].filter(Boolean).join(" ")
|
|
435
|
+
);
|
|
436
|
+
return (r, s) => (n(), l("div", {
|
|
437
|
+
class: b(a.value)
|
|
438
|
+
}, [
|
|
439
|
+
f("label", {
|
|
440
|
+
class: "strand-form-field__label",
|
|
441
|
+
for: e.htmlFor
|
|
442
|
+
}, [
|
|
443
|
+
N(_(e.label) + " ", 1),
|
|
444
|
+
e.required ? (n(), l("span", de, " * ")) : $("", !0)
|
|
445
|
+
], 8, oe),
|
|
446
|
+
f("div", ce, [
|
|
447
|
+
g(r.$slots, "default")
|
|
448
|
+
]),
|
|
449
|
+
e.error ? (n(), l("p", {
|
|
450
|
+
key: 0,
|
|
451
|
+
class: "strand-form-field__error",
|
|
452
|
+
id: `${e.htmlFor}-error`,
|
|
453
|
+
role: "alert"
|
|
454
|
+
}, _(e.error), 9, ue)) : e.hint ? (n(), l("p", {
|
|
455
|
+
key: 1,
|
|
456
|
+
class: "strand-form-field__hint",
|
|
457
|
+
id: `${e.htmlFor}-hint`
|
|
458
|
+
}, _(e.hint), 9, fe)) : $("", !0)
|
|
459
|
+
], 2));
|
|
460
|
+
}
|
|
461
|
+
}), va = /* @__PURE__ */ h({
|
|
462
|
+
__name: "Card",
|
|
463
|
+
props: {
|
|
464
|
+
variant: { default: "elevated" },
|
|
465
|
+
padding: { default: "md" },
|
|
466
|
+
className: { default: "" }
|
|
467
|
+
},
|
|
468
|
+
setup(e) {
|
|
469
|
+
const t = e, a = c(
|
|
470
|
+
() => [
|
|
471
|
+
"strand-card",
|
|
472
|
+
`strand-card--${t.variant}`,
|
|
473
|
+
`strand-card--pad-${t.padding}`,
|
|
474
|
+
t.className
|
|
475
|
+
].filter(Boolean).join(" ")
|
|
476
|
+
);
|
|
477
|
+
return (r, s) => (n(), l("div", y({ class: a.value }, r.$attrs), [
|
|
478
|
+
g(r.$slots, "default")
|
|
479
|
+
], 16));
|
|
480
|
+
}
|
|
481
|
+
}), ve = ["aria-label"], ma = /* @__PURE__ */ h({
|
|
482
|
+
__name: "Badge",
|
|
483
|
+
props: {
|
|
484
|
+
variant: { default: "count" },
|
|
485
|
+
status: { default: "default" },
|
|
486
|
+
count: {},
|
|
487
|
+
maxCount: { default: 99 },
|
|
488
|
+
className: { default: "" }
|
|
489
|
+
},
|
|
490
|
+
setup(e) {
|
|
491
|
+
const t = e, a = E(), r = c(() => !!a.default), s = c(() => t.variant === "count" ? t.count != null && t.count > t.maxCount ? `${t.maxCount}+` : t.count : null), o = c(() => {
|
|
492
|
+
if (t.variant === "dot") return "Status indicator";
|
|
493
|
+
if (t.count != null) return `${t.count} notifications`;
|
|
494
|
+
}), d = c(
|
|
495
|
+
() => [
|
|
496
|
+
"strand-badge__indicator",
|
|
497
|
+
`strand-badge--${t.variant}`,
|
|
498
|
+
`strand-badge--${t.status}`
|
|
499
|
+
].filter(Boolean).join(" ")
|
|
500
|
+
), i = c(
|
|
501
|
+
() => r.value ? ["strand-badge", t.className].filter(Boolean).join(" ") : ["strand-badge", "strand-badge--inline", t.className].filter(Boolean).join(" ")
|
|
502
|
+
);
|
|
503
|
+
return (u, m) => (n(), l("span", y({ class: i.value }, u.$attrs), [
|
|
504
|
+
g(u.$slots, "default"),
|
|
505
|
+
f("span", {
|
|
506
|
+
class: b(d.value),
|
|
507
|
+
"aria-label": o.value,
|
|
508
|
+
role: "status"
|
|
509
|
+
}, _(s.value), 11, ve)
|
|
510
|
+
], 16));
|
|
511
|
+
}
|
|
512
|
+
}), me = ["aria-label"], he = ["src", "alt"], _e = {
|
|
513
|
+
key: 1,
|
|
514
|
+
class: "strand-avatar__initials",
|
|
515
|
+
"aria-hidden": "true"
|
|
516
|
+
}, ha = /* @__PURE__ */ h({
|
|
517
|
+
__name: "Avatar",
|
|
518
|
+
props: {
|
|
519
|
+
src: {},
|
|
520
|
+
alt: { default: "" },
|
|
521
|
+
initials: { default: "" },
|
|
522
|
+
size: { default: "md" },
|
|
523
|
+
className: { default: "" }
|
|
524
|
+
},
|
|
525
|
+
setup(e) {
|
|
526
|
+
const t = e, a = x(!1), r = () => {
|
|
527
|
+
a.value = !0;
|
|
528
|
+
}, s = c(() => t.src && !a.value), o = c(() => t.initials.slice(0, 2).toUpperCase()), d = c(
|
|
529
|
+
() => [
|
|
530
|
+
"strand-avatar",
|
|
531
|
+
`strand-avatar--${t.size}`,
|
|
532
|
+
t.className
|
|
533
|
+
].filter(Boolean).join(" ")
|
|
534
|
+
);
|
|
535
|
+
return (i, u) => (n(), l("div", y({
|
|
536
|
+
class: d.value,
|
|
537
|
+
role: "img",
|
|
538
|
+
"aria-label": e.alt || o.value
|
|
539
|
+
}, i.$attrs), [
|
|
540
|
+
s.value ? (n(), l("img", {
|
|
541
|
+
key: 0,
|
|
542
|
+
class: "strand-avatar__img",
|
|
543
|
+
src: e.src,
|
|
544
|
+
alt: e.alt,
|
|
545
|
+
onError: r
|
|
546
|
+
}, null, 40, he)) : (n(), l("span", _e, _(o.value), 1))
|
|
547
|
+
], 16, me));
|
|
548
|
+
}
|
|
549
|
+
}), be = { class: "strand-tag__text" }, _a = /* @__PURE__ */ h({
|
|
550
|
+
__name: "Tag",
|
|
551
|
+
props: {
|
|
552
|
+
variant: { default: "solid" },
|
|
553
|
+
status: { default: "default" },
|
|
554
|
+
removable: { type: Boolean, default: !1 },
|
|
555
|
+
className: { default: "" }
|
|
556
|
+
},
|
|
557
|
+
emits: ["remove"],
|
|
558
|
+
setup(e, { emit: t }) {
|
|
559
|
+
const a = e, r = t, s = c(
|
|
560
|
+
() => [
|
|
561
|
+
"strand-tag",
|
|
562
|
+
`strand-tag--${a.variant}`,
|
|
563
|
+
`strand-tag--${a.status}`,
|
|
564
|
+
a.className
|
|
565
|
+
].filter(Boolean).join(" ")
|
|
566
|
+
);
|
|
567
|
+
return (o, d) => (n(), l("span", y({ class: s.value }, o.$attrs), [
|
|
568
|
+
f("span", be, [
|
|
569
|
+
g(o.$slots, "default")
|
|
570
|
+
]),
|
|
571
|
+
e.removable ? (n(), l("button", {
|
|
572
|
+
key: 0,
|
|
573
|
+
type: "button",
|
|
574
|
+
class: "strand-tag__remove",
|
|
575
|
+
"aria-label": "Remove",
|
|
576
|
+
onClick: d[0] || (d[0] = (i) => r("remove"))
|
|
577
|
+
}, [...d[1] || (d[1] = [
|
|
578
|
+
f("svg", {
|
|
579
|
+
width: "12",
|
|
580
|
+
height: "12",
|
|
581
|
+
viewBox: "0 0 12 12",
|
|
582
|
+
fill: "none",
|
|
583
|
+
"aria-hidden": "true"
|
|
584
|
+
}, [
|
|
585
|
+
f("path", {
|
|
586
|
+
d: "M3 3l6 6M9 3l-6 6",
|
|
587
|
+
stroke: "currentColor",
|
|
588
|
+
"stroke-width": "1.5",
|
|
589
|
+
"stroke-linecap": "round"
|
|
590
|
+
})
|
|
591
|
+
], -1)
|
|
592
|
+
])])) : $("", !0)
|
|
593
|
+
], 16));
|
|
594
|
+
}
|
|
595
|
+
}), pe = { class: "strand-table" }, $e = { class: "strand-table__head" }, ge = ["aria-label", "onClick"], ye = {
|
|
596
|
+
class: "strand-table__sort-indicator",
|
|
597
|
+
"aria-hidden": "true"
|
|
598
|
+
}, ke = { class: "strand-table__body" }, ba = /* @__PURE__ */ h({
|
|
599
|
+
__name: "Table",
|
|
600
|
+
props: {
|
|
601
|
+
columns: {},
|
|
602
|
+
data: {}
|
|
603
|
+
},
|
|
604
|
+
emits: ["sort"],
|
|
605
|
+
setup(e, { emit: t }) {
|
|
606
|
+
const a = t, r = x(null), s = x("asc"), o = c(
|
|
607
|
+
() => ["strand-table-wrapper"].filter(Boolean).join(" ")
|
|
608
|
+
);
|
|
609
|
+
function d(u) {
|
|
610
|
+
const m = r.value === u && s.value === "asc" ? "desc" : "asc";
|
|
611
|
+
r.value = u, s.value = m, a("sort", u, m);
|
|
612
|
+
}
|
|
613
|
+
function i(u) {
|
|
614
|
+
return r.value === u ? s.value === "asc" ? "↑" : "↓" : "↕";
|
|
615
|
+
}
|
|
616
|
+
return (u, m) => (n(), l("div", {
|
|
617
|
+
class: b(o.value)
|
|
618
|
+
}, [
|
|
619
|
+
f("table", pe, [
|
|
620
|
+
f("thead", $e, [
|
|
621
|
+
f("tr", null, [
|
|
622
|
+
(n(!0), l(k, null, w(e.columns, (v) => (n(), l("th", {
|
|
623
|
+
key: v.key,
|
|
624
|
+
class: "strand-table__th",
|
|
625
|
+
style: S(v.width ? { width: v.width } : void 0)
|
|
626
|
+
}, [
|
|
627
|
+
v.sortable ? (n(), l("button", {
|
|
628
|
+
key: 0,
|
|
629
|
+
type: "button",
|
|
630
|
+
class: "strand-table__sort-btn",
|
|
631
|
+
"aria-label": `Sort by ${v.header}`,
|
|
632
|
+
onClick: (B) => d(v.key)
|
|
633
|
+
}, [
|
|
634
|
+
N(_(v.header) + " ", 1),
|
|
635
|
+
f("span", ye, _(i(v.key)), 1)
|
|
636
|
+
], 8, ge)) : (n(), l(k, { key: 1 }, [
|
|
637
|
+
N(_(v.header), 1)
|
|
638
|
+
], 64))
|
|
639
|
+
], 4))), 128))
|
|
640
|
+
])
|
|
641
|
+
]),
|
|
642
|
+
f("tbody", ke, [
|
|
643
|
+
(n(!0), l(k, null, w(e.data, (v, B) => (n(), l("tr", {
|
|
644
|
+
key: B,
|
|
645
|
+
class: "strand-table__row"
|
|
646
|
+
}, [
|
|
647
|
+
(n(!0), l(k, null, w(e.columns, (p) => (n(), l("td", {
|
|
648
|
+
key: p.key,
|
|
649
|
+
class: "strand-table__td"
|
|
650
|
+
}, _(v[p.key]), 1))), 128))
|
|
651
|
+
]))), 128))
|
|
652
|
+
])
|
|
653
|
+
])
|
|
654
|
+
], 2));
|
|
655
|
+
}
|
|
656
|
+
}), Be = { class: "strand-data-readout__label" }, we = { class: "strand-data-readout__value" }, pa = /* @__PURE__ */ h({
|
|
657
|
+
__name: "DataReadout",
|
|
658
|
+
props: {
|
|
659
|
+
label: {},
|
|
660
|
+
value: {},
|
|
661
|
+
size: {},
|
|
662
|
+
className: { default: "" }
|
|
663
|
+
},
|
|
664
|
+
setup(e) {
|
|
665
|
+
const t = e, a = c(
|
|
666
|
+
() => [
|
|
667
|
+
"strand-data-readout",
|
|
668
|
+
t.size && t.size !== "md" ? `strand-data-readout--${t.size}` : "",
|
|
669
|
+
t.className
|
|
670
|
+
].filter(Boolean).join(" ")
|
|
671
|
+
);
|
|
672
|
+
return (r, s) => (n(), l("div", y({ class: a.value }, r.$attrs), [
|
|
673
|
+
f("span", Be, _(e.label), 1),
|
|
674
|
+
f("span", we, _(e.value), 1)
|
|
675
|
+
], 16));
|
|
676
|
+
}
|
|
677
|
+
}), $a = /* @__PURE__ */ h({
|
|
678
|
+
__name: "Stack",
|
|
679
|
+
props: {
|
|
680
|
+
direction: { default: "vertical" },
|
|
681
|
+
gap: { default: 4 },
|
|
682
|
+
align: { default: "stretch" },
|
|
683
|
+
justify: {},
|
|
684
|
+
wrap: { type: Boolean, default: !1 },
|
|
685
|
+
className: { default: "" }
|
|
686
|
+
},
|
|
687
|
+
setup(e) {
|
|
688
|
+
const t = e, a = c(
|
|
689
|
+
() => [
|
|
690
|
+
"strand-stack",
|
|
691
|
+
`strand-stack--${t.direction}`,
|
|
692
|
+
t.align !== "stretch" && `strand-stack--align-${t.align}`,
|
|
693
|
+
t.justify && `strand-stack--justify-${t.justify}`,
|
|
694
|
+
t.wrap && "strand-stack--wrap",
|
|
695
|
+
t.className
|
|
696
|
+
].filter(Boolean).join(" ")
|
|
697
|
+
), r = c(() => ({
|
|
698
|
+
gap: `var(--strand-space-${t.gap})`
|
|
699
|
+
}));
|
|
700
|
+
return (s, o) => (n(), l("div", y({
|
|
701
|
+
class: a.value,
|
|
702
|
+
style: r.value
|
|
703
|
+
}, s.$attrs), [
|
|
704
|
+
g(s.$slots, "default")
|
|
705
|
+
], 16));
|
|
706
|
+
}
|
|
707
|
+
}), ga = /* @__PURE__ */ h({
|
|
708
|
+
__name: "Grid",
|
|
709
|
+
props: {
|
|
710
|
+
columns: { default: 1 },
|
|
711
|
+
gap: { default: 4 },
|
|
712
|
+
className: { default: "" }
|
|
713
|
+
},
|
|
714
|
+
setup(e) {
|
|
715
|
+
const t = e, a = c(
|
|
716
|
+
() => ["strand-grid", t.className].filter(Boolean).join(" ")
|
|
717
|
+
), r = c(() => ({
|
|
718
|
+
gridTemplateColumns: `repeat(${t.columns}, 1fr)`,
|
|
719
|
+
gap: `var(--strand-space-${t.gap})`
|
|
720
|
+
}));
|
|
721
|
+
return (s, o) => (n(), l("div", y({
|
|
722
|
+
class: a.value,
|
|
723
|
+
style: r.value
|
|
724
|
+
}, s.$attrs), [
|
|
725
|
+
g(s.$slots, "default")
|
|
726
|
+
], 16));
|
|
727
|
+
}
|
|
728
|
+
}), ya = /* @__PURE__ */ h({
|
|
729
|
+
__name: "Container",
|
|
730
|
+
props: {
|
|
731
|
+
size: { default: "default" },
|
|
732
|
+
className: { default: "" }
|
|
733
|
+
},
|
|
734
|
+
setup(e) {
|
|
735
|
+
const t = e, a = c(
|
|
736
|
+
() => [
|
|
737
|
+
"strand-container",
|
|
738
|
+
`strand-container--${t.size}`,
|
|
739
|
+
t.className
|
|
740
|
+
].filter(Boolean).join(" ")
|
|
741
|
+
);
|
|
742
|
+
return (r, s) => (n(), l("div", y({ class: a.value }, r.$attrs), [
|
|
743
|
+
g(r.$slots, "default")
|
|
744
|
+
], 16));
|
|
745
|
+
}
|
|
746
|
+
}), xe = { class: "strand-divider__label" }, ka = /* @__PURE__ */ h({
|
|
747
|
+
__name: "Divider",
|
|
748
|
+
props: {
|
|
749
|
+
direction: { default: "horizontal" },
|
|
750
|
+
label: {},
|
|
751
|
+
className: { default: "" }
|
|
752
|
+
},
|
|
753
|
+
setup(e) {
|
|
754
|
+
const t = e, a = c(() => t.direction === "vertical"), r = c(() => !a.value && !!t.label);
|
|
755
|
+
c(() => !a.value && !t.label);
|
|
756
|
+
const s = c(() => a.value ? ["strand-divider", "strand-divider--vertical", t.className].filter(Boolean).join(" ") : r.value ? ["strand-divider", "strand-divider--horizontal", "strand-divider--labeled", t.className].filter(Boolean).join(" ") : ["strand-divider", "strand-divider--horizontal", t.className].filter(Boolean).join(" "));
|
|
757
|
+
return (o, d) => a.value ? (n(), l("div", {
|
|
758
|
+
key: 0,
|
|
759
|
+
class: b(s.value),
|
|
760
|
+
role: "separator",
|
|
761
|
+
"aria-orientation": "vertical"
|
|
762
|
+
}, null, 2)) : r.value ? (n(), l("div", {
|
|
763
|
+
key: 1,
|
|
764
|
+
class: b(s.value),
|
|
765
|
+
role: "separator",
|
|
766
|
+
"aria-orientation": "horizontal"
|
|
767
|
+
}, [
|
|
768
|
+
d[0] || (d[0] = f("span", { class: "strand-divider__line" }, null, -1)),
|
|
769
|
+
f("span", xe, _(e.label), 1),
|
|
770
|
+
d[1] || (d[1] = f("span", { class: "strand-divider__line" }, null, -1))
|
|
771
|
+
], 2)) : (n(), l("hr", {
|
|
772
|
+
key: 2,
|
|
773
|
+
class: b(s.value),
|
|
774
|
+
role: "separator",
|
|
775
|
+
"aria-orientation": "horizontal"
|
|
776
|
+
}, null, 2));
|
|
777
|
+
}
|
|
778
|
+
}), Ba = /* @__PURE__ */ h({
|
|
779
|
+
__name: "Section",
|
|
780
|
+
props: {
|
|
781
|
+
variant: { default: "standard" },
|
|
782
|
+
background: { default: "primary" },
|
|
783
|
+
className: { default: "" }
|
|
784
|
+
},
|
|
785
|
+
setup(e) {
|
|
786
|
+
const t = e, a = c(
|
|
787
|
+
() => [
|
|
788
|
+
"strand-section",
|
|
789
|
+
`strand-section--${t.variant}`,
|
|
790
|
+
`strand-section--bg-${t.background}`,
|
|
791
|
+
t.className
|
|
792
|
+
].filter(Boolean).join(" ")
|
|
793
|
+
);
|
|
794
|
+
return (r, s) => (n(), l("section", y({ class: a.value }, r.$attrs), [
|
|
795
|
+
g(r.$slots, "default")
|
|
796
|
+
], 16));
|
|
797
|
+
}
|
|
798
|
+
}), Ce = ["href"], wa = /* @__PURE__ */ h({
|
|
799
|
+
__name: "Link",
|
|
800
|
+
props: {
|
|
801
|
+
href: {},
|
|
802
|
+
external: { type: Boolean, default: !1 },
|
|
803
|
+
className: { default: "" }
|
|
804
|
+
},
|
|
805
|
+
setup(e) {
|
|
806
|
+
const t = e, a = c(
|
|
807
|
+
() => ["strand-link", t.className].filter(Boolean).join(" ")
|
|
808
|
+
);
|
|
809
|
+
return (r, s) => (n(), l("a", y({
|
|
810
|
+
href: e.href,
|
|
811
|
+
class: a.value
|
|
812
|
+
}, {
|
|
813
|
+
...e.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
814
|
+
...r.$attrs
|
|
815
|
+
}), [
|
|
816
|
+
g(r.$slots, "default")
|
|
817
|
+
], 16, Ce));
|
|
818
|
+
}
|
|
819
|
+
}), je = ["id", "aria-selected", "aria-controls", "tabindex", "onClick"], Te = ["id", "aria-labelledby", "hidden"], xa = /* @__PURE__ */ h({
|
|
820
|
+
__name: "Tabs",
|
|
821
|
+
props: {
|
|
822
|
+
tabs: {},
|
|
823
|
+
activeTab: {}
|
|
824
|
+
},
|
|
825
|
+
emits: ["change"],
|
|
826
|
+
setup(e, { emit: t }) {
|
|
827
|
+
const a = e, r = t, s = x(null), o = c(() => ["strand-tabs"].filter(Boolean).join(" "));
|
|
828
|
+
function d(u) {
|
|
829
|
+
var v, B;
|
|
830
|
+
const m = a.tabs[u];
|
|
831
|
+
if (m) {
|
|
832
|
+
r("change", m.id);
|
|
833
|
+
const p = (v = s.value) == null ? void 0 : v.querySelectorAll('[role="tab"]');
|
|
834
|
+
(B = p == null ? void 0 : p[u]) == null || B.focus();
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
function i(u) {
|
|
838
|
+
const m = a.tabs.findIndex((B) => B.id === a.activeTab);
|
|
839
|
+
let v = null;
|
|
840
|
+
switch (u.key) {
|
|
841
|
+
case "ArrowRight":
|
|
842
|
+
v = (m + 1) % a.tabs.length;
|
|
843
|
+
break;
|
|
844
|
+
case "ArrowLeft":
|
|
845
|
+
v = (m - 1 + a.tabs.length) % a.tabs.length;
|
|
846
|
+
break;
|
|
847
|
+
case "Home":
|
|
848
|
+
v = 0;
|
|
849
|
+
break;
|
|
850
|
+
case "End":
|
|
851
|
+
v = a.tabs.length - 1;
|
|
852
|
+
break;
|
|
853
|
+
default:
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
856
|
+
u.preventDefault(), d(v);
|
|
857
|
+
}
|
|
858
|
+
return (u, m) => (n(), l("div", {
|
|
859
|
+
class: b(o.value)
|
|
860
|
+
}, [
|
|
861
|
+
f("div", {
|
|
862
|
+
ref_key: "tablistRef",
|
|
863
|
+
ref: s,
|
|
864
|
+
role: "tablist",
|
|
865
|
+
onKeydown: i
|
|
866
|
+
}, [
|
|
867
|
+
(n(!0), l(k, null, w(e.tabs, (v) => (n(), l("button", {
|
|
868
|
+
key: v.id,
|
|
869
|
+
id: `tab-${v.id}`,
|
|
870
|
+
role: "tab",
|
|
871
|
+
type: "button",
|
|
872
|
+
class: b([
|
|
873
|
+
"strand-tabs__tab",
|
|
874
|
+
v.id === e.activeTab && "strand-tabs__tab--active"
|
|
875
|
+
].filter(Boolean).join(" ")),
|
|
876
|
+
"aria-selected": v.id === e.activeTab ? "true" : "false",
|
|
877
|
+
"aria-controls": `panel-${v.id}`,
|
|
878
|
+
tabindex: v.id === e.activeTab ? 0 : -1,
|
|
879
|
+
onClick: (B) => r("change", v.id)
|
|
880
|
+
}, _(v.label), 11, je))), 128))
|
|
881
|
+
], 544),
|
|
882
|
+
(n(!0), l(k, null, w(e.tabs, (v) => (n(), l("div", {
|
|
883
|
+
key: v.id,
|
|
884
|
+
id: `panel-${v.id}`,
|
|
885
|
+
role: "tabpanel",
|
|
886
|
+
"aria-labelledby": `tab-${v.id}`,
|
|
887
|
+
hidden: v.id !== e.activeTab || void 0,
|
|
888
|
+
tabindex: 0
|
|
889
|
+
}, [
|
|
890
|
+
g(u.$slots, `panel-${v.id}`)
|
|
891
|
+
], 8, Te))), 128))
|
|
892
|
+
], 2));
|
|
893
|
+
}
|
|
894
|
+
}), Ne = { class: "strand-breadcrumb__list" }, Se = {
|
|
895
|
+
key: 0,
|
|
896
|
+
class: "strand-breadcrumb__separator",
|
|
897
|
+
"aria-hidden": "true"
|
|
898
|
+
}, ze = {
|
|
899
|
+
key: 1,
|
|
900
|
+
class: "strand-breadcrumb__current",
|
|
901
|
+
"aria-current": "page"
|
|
902
|
+
}, Ve = ["href"], Ca = /* @__PURE__ */ h({
|
|
903
|
+
__name: "Breadcrumb",
|
|
904
|
+
props: {
|
|
905
|
+
items: {},
|
|
906
|
+
separator: { default: "/" }
|
|
907
|
+
},
|
|
908
|
+
setup(e) {
|
|
909
|
+
const t = c(
|
|
910
|
+
() => ["strand-breadcrumb"].filter(Boolean).join(" ")
|
|
911
|
+
);
|
|
912
|
+
return (a, r) => (n(), l("nav", {
|
|
913
|
+
"aria-label": "Breadcrumb",
|
|
914
|
+
class: b(t.value)
|
|
915
|
+
}, [
|
|
916
|
+
f("ol", Ne, [
|
|
917
|
+
(n(!0), l(k, null, w(e.items, (s, o) => (n(), l("li", {
|
|
918
|
+
key: `${s.label}-${o}`,
|
|
919
|
+
class: "strand-breadcrumb__item"
|
|
920
|
+
}, [
|
|
921
|
+
o > 0 ? (n(), l("span", Se, _(e.separator), 1)) : $("", !0),
|
|
922
|
+
o === e.items.length - 1 ? (n(), l("span", ze, _(s.label), 1)) : (n(), l("a", {
|
|
923
|
+
key: 2,
|
|
924
|
+
href: s.href,
|
|
925
|
+
class: "strand-breadcrumb__link"
|
|
926
|
+
}, _(s.label), 9, Ve))
|
|
927
|
+
]))), 128))
|
|
928
|
+
])
|
|
929
|
+
], 2));
|
|
930
|
+
}
|
|
931
|
+
}), De = { class: "strand-nav__inner" }, Ie = {
|
|
932
|
+
key: 0,
|
|
933
|
+
class: "strand-nav__logo"
|
|
934
|
+
}, Re = { class: "strand-nav__items" }, Ee = ["href", "aria-current"], Le = {
|
|
935
|
+
key: 1,
|
|
936
|
+
class: "strand-nav__actions"
|
|
937
|
+
}, Oe = ["aria-expanded", "aria-label"], Ae = {
|
|
938
|
+
key: 0,
|
|
939
|
+
class: "strand-nav__mobile-menu"
|
|
940
|
+
}, Fe = ["href", "aria-current"], ja = /* @__PURE__ */ h({
|
|
941
|
+
__name: "Nav",
|
|
942
|
+
props: {
|
|
943
|
+
items: { default: () => [] }
|
|
944
|
+
},
|
|
945
|
+
setup(e) {
|
|
946
|
+
const t = x(!1);
|
|
947
|
+
function a() {
|
|
948
|
+
t.value = !t.value;
|
|
949
|
+
}
|
|
950
|
+
const r = c(() => ["strand-nav"].filter(Boolean).join(" "));
|
|
951
|
+
return (s, o) => (n(), l("nav", {
|
|
952
|
+
class: b(r.value),
|
|
953
|
+
"aria-label": "Main navigation"
|
|
954
|
+
}, [
|
|
955
|
+
f("div", De, [
|
|
956
|
+
s.$slots.logo ? (n(), l("div", Ie, [
|
|
957
|
+
g(s.$slots, "logo")
|
|
958
|
+
])) : $("", !0),
|
|
959
|
+
f("div", Re, [
|
|
960
|
+
(n(!0), l(k, null, w(e.items, (d) => (n(), l("a", {
|
|
961
|
+
key: d.href,
|
|
962
|
+
href: d.href,
|
|
963
|
+
class: b([
|
|
964
|
+
"strand-nav__link",
|
|
965
|
+
d.active && "strand-nav__link--active"
|
|
966
|
+
].filter(Boolean).join(" ")),
|
|
967
|
+
"aria-current": d.active ? "page" : void 0
|
|
968
|
+
}, _(d.label), 11, Ee))), 128))
|
|
969
|
+
]),
|
|
970
|
+
s.$slots.actions ? (n(), l("div", Le, [
|
|
971
|
+
g(s.$slots, "actions")
|
|
972
|
+
])) : $("", !0),
|
|
973
|
+
f("button", {
|
|
974
|
+
type: "button",
|
|
975
|
+
class: "strand-nav__hamburger",
|
|
976
|
+
"aria-expanded": t.value ? "true" : "false",
|
|
977
|
+
"aria-label": t.value ? "Close menu" : "Menu",
|
|
978
|
+
onClick: a
|
|
979
|
+
}, [...o[0] || (o[0] = [
|
|
980
|
+
f("span", {
|
|
981
|
+
class: "strand-nav__hamburger-icon",
|
|
982
|
+
"aria-hidden": "true"
|
|
983
|
+
}, null, -1)
|
|
984
|
+
])], 8, Oe)
|
|
985
|
+
]),
|
|
986
|
+
t.value ? (n(), l("div", Ae, [
|
|
987
|
+
(n(!0), l(k, null, w(e.items, (d) => (n(), l("a", {
|
|
988
|
+
key: d.href,
|
|
989
|
+
href: d.href,
|
|
990
|
+
class: b([
|
|
991
|
+
"strand-nav__mobile-link",
|
|
992
|
+
d.active && "strand-nav__mobile-link--active"
|
|
993
|
+
].filter(Boolean).join(" ")),
|
|
994
|
+
"aria-current": d.active ? "page" : void 0
|
|
995
|
+
}, _(d.label), 11, Fe))), 128))
|
|
996
|
+
])) : $("", !0)
|
|
997
|
+
], 2));
|
|
998
|
+
}
|
|
999
|
+
}), Ke = ["aria-live"], Me = { class: "strand-toast__message" }, Ta = /* @__PURE__ */ h({
|
|
1000
|
+
__name: "Toast",
|
|
1001
|
+
props: {
|
|
1002
|
+
status: { default: "info" },
|
|
1003
|
+
message: {}
|
|
1004
|
+
},
|
|
1005
|
+
emits: ["dismiss"],
|
|
1006
|
+
setup(e, { emit: t }) {
|
|
1007
|
+
const a = e, r = t, s = c(
|
|
1008
|
+
() => a.status === "error" || a.status === "warning"
|
|
1009
|
+
), o = c(
|
|
1010
|
+
() => ["strand-toast", `strand-toast--${a.status}`].filter(Boolean).join(" ")
|
|
1011
|
+
);
|
|
1012
|
+
return (d, i) => (n(), l("div", {
|
|
1013
|
+
class: b(o.value),
|
|
1014
|
+
role: "status",
|
|
1015
|
+
"aria-live": s.value ? "assertive" : "polite"
|
|
1016
|
+
}, [
|
|
1017
|
+
f("span", Me, _(e.message), 1),
|
|
1018
|
+
f("button", {
|
|
1019
|
+
type: "button",
|
|
1020
|
+
class: "strand-toast__dismiss",
|
|
1021
|
+
"aria-label": "Dismiss",
|
|
1022
|
+
onClick: i[0] || (i[0] = (u) => r("dismiss"))
|
|
1023
|
+
}, " × ")
|
|
1024
|
+
], 10, Ke));
|
|
1025
|
+
}
|
|
1026
|
+
});
|
|
1027
|
+
/*! Strand Vue | MIT License | dillingerstaffing.com */
|
|
1028
|
+
const O = Symbol("StrandToast");
|
|
1029
|
+
function Na() {
|
|
1030
|
+
const e = A(O);
|
|
1031
|
+
if (!e)
|
|
1032
|
+
throw new Error("useToast must be used within a ToastProvider");
|
|
1033
|
+
return e;
|
|
1034
|
+
}
|
|
1035
|
+
const Pe = {
|
|
1036
|
+
key: 0,
|
|
1037
|
+
class: "strand-toast__container"
|
|
1038
|
+
}, qe = ["aria-live"], Ue = { class: "strand-toast__message" }, Ge = ["onClick"], Sa = /* @__PURE__ */ h({
|
|
1039
|
+
__name: "ToastProvider",
|
|
1040
|
+
setup(e) {
|
|
1041
|
+
let t = 0;
|
|
1042
|
+
const a = x([]), r = /* @__PURE__ */ new Map();
|
|
1043
|
+
function s(i) {
|
|
1044
|
+
const u = r.get(i);
|
|
1045
|
+
u !== void 0 && (clearTimeout(u), r.delete(i)), a.value = a.value.filter((m) => m.id !== i);
|
|
1046
|
+
}
|
|
1047
|
+
function o(i) {
|
|
1048
|
+
const u = {
|
|
1049
|
+
id: ++t,
|
|
1050
|
+
message: i.message,
|
|
1051
|
+
status: i.status ?? "info",
|
|
1052
|
+
duration: i.duration ?? 5e3
|
|
1053
|
+
};
|
|
1054
|
+
if (a.value = [...a.value, u], u.duration > 0) {
|
|
1055
|
+
const m = setTimeout(() => {
|
|
1056
|
+
s(u.id);
|
|
1057
|
+
}, u.duration);
|
|
1058
|
+
r.set(u.id, m);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
F(O, { toast: o }), V(() => {
|
|
1062
|
+
for (const i of r.values())
|
|
1063
|
+
clearTimeout(i);
|
|
1064
|
+
r.clear();
|
|
1065
|
+
});
|
|
1066
|
+
function d(i) {
|
|
1067
|
+
return i === "error" || i === "warning";
|
|
1068
|
+
}
|
|
1069
|
+
return (i, u) => (n(), l(k, null, [
|
|
1070
|
+
g(i.$slots, "default"),
|
|
1071
|
+
a.value.length > 0 ? (n(), l("div", Pe, [
|
|
1072
|
+
(n(!0), l(k, null, w(a.value, (m) => (n(), l("div", {
|
|
1073
|
+
key: m.id,
|
|
1074
|
+
class: b(["strand-toast", `strand-toast--${m.status}`].join(" ")),
|
|
1075
|
+
role: "status",
|
|
1076
|
+
"aria-live": d(m.status) ? "assertive" : "polite"
|
|
1077
|
+
}, [
|
|
1078
|
+
f("span", Ue, _(m.message), 1),
|
|
1079
|
+
f("button", {
|
|
1080
|
+
type: "button",
|
|
1081
|
+
class: "strand-toast__dismiss",
|
|
1082
|
+
"aria-label": "Dismiss",
|
|
1083
|
+
onClick: (v) => s(m.id)
|
|
1084
|
+
}, " × ", 8, Ge)
|
|
1085
|
+
], 10, qe))), 128))
|
|
1086
|
+
])) : $("", !0)
|
|
1087
|
+
], 64));
|
|
1088
|
+
}
|
|
1089
|
+
}), He = ["role"], We = { class: "strand-alert__content" }, za = /* @__PURE__ */ h({
|
|
1090
|
+
__name: "Alert",
|
|
1091
|
+
props: {
|
|
1092
|
+
status: { default: "info" },
|
|
1093
|
+
dismissible: { type: Boolean, default: !1 }
|
|
1094
|
+
},
|
|
1095
|
+
emits: ["dismiss"],
|
|
1096
|
+
setup(e, { emit: t }) {
|
|
1097
|
+
const a = e, r = t, s = c(
|
|
1098
|
+
() => a.status === "error" || a.status === "warning" ? "alert" : "status"
|
|
1099
|
+
), o = c(
|
|
1100
|
+
() => [
|
|
1101
|
+
"strand-alert",
|
|
1102
|
+
`strand-alert--${a.status}`
|
|
1103
|
+
].filter(Boolean).join(" ")
|
|
1104
|
+
);
|
|
1105
|
+
function d() {
|
|
1106
|
+
r("dismiss");
|
|
1107
|
+
}
|
|
1108
|
+
return (i, u) => (n(), l("div", {
|
|
1109
|
+
class: b(o.value),
|
|
1110
|
+
role: s.value
|
|
1111
|
+
}, [
|
|
1112
|
+
f("div", We, [
|
|
1113
|
+
g(i.$slots, "default")
|
|
1114
|
+
]),
|
|
1115
|
+
e.dismissible ? (n(), l("button", {
|
|
1116
|
+
key: 0,
|
|
1117
|
+
type: "button",
|
|
1118
|
+
class: "strand-alert__dismiss",
|
|
1119
|
+
"aria-label": "Dismiss",
|
|
1120
|
+
onClick: d
|
|
1121
|
+
}, " × ")) : $("", !0)
|
|
1122
|
+
], 10, He));
|
|
1123
|
+
}
|
|
1124
|
+
}), Ze = ["aria-labelledby"], Je = {
|
|
1125
|
+
key: 0,
|
|
1126
|
+
class: "strand-dialog__header"
|
|
1127
|
+
}, Qe = { class: "strand-dialog__body" }, R = 'a[href], button:not(:disabled), textarea:not(:disabled), input:not(:disabled), select:not(:disabled), [tabindex]:not([tabindex="-1"])', Va = /* @__PURE__ */ h({
|
|
1128
|
+
__name: "Dialog",
|
|
1129
|
+
props: {
|
|
1130
|
+
open: { type: Boolean },
|
|
1131
|
+
title: {},
|
|
1132
|
+
closeOnOutsideClick: { type: Boolean, default: !0 },
|
|
1133
|
+
closeOnEscape: { type: Boolean, default: !0 }
|
|
1134
|
+
},
|
|
1135
|
+
emits: ["close"],
|
|
1136
|
+
setup(e, { emit: t }) {
|
|
1137
|
+
const a = e, r = t;
|
|
1138
|
+
let s = 0;
|
|
1139
|
+
const o = `strand-dialog-title-${++s}`, d = x(null);
|
|
1140
|
+
let i = null, u = "";
|
|
1141
|
+
const m = c(
|
|
1142
|
+
() => ["strand-dialog__panel"].filter(Boolean).join(" ")
|
|
1143
|
+
);
|
|
1144
|
+
function v(p) {
|
|
1145
|
+
if (p.key === "Escape" && a.closeOnEscape) {
|
|
1146
|
+
p.stopPropagation(), r("close");
|
|
1147
|
+
return;
|
|
1148
|
+
}
|
|
1149
|
+
if (p.key === "Tab") {
|
|
1150
|
+
const C = d.value;
|
|
1151
|
+
if (!C) return;
|
|
1152
|
+
const j = Array.from(
|
|
1153
|
+
C.querySelectorAll(R)
|
|
1154
|
+
);
|
|
1155
|
+
if (j.length === 0) return;
|
|
1156
|
+
const D = j[0], I = j[j.length - 1];
|
|
1157
|
+
p.shiftKey ? document.activeElement === D && (p.preventDefault(), I.focus()) : document.activeElement === I && (p.preventDefault(), D.focus());
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
function B(p) {
|
|
1161
|
+
a.closeOnOutsideClick && p.target === p.currentTarget && r("close");
|
|
1162
|
+
}
|
|
1163
|
+
return z(
|
|
1164
|
+
() => a.open,
|
|
1165
|
+
async (p) => {
|
|
1166
|
+
if (p) {
|
|
1167
|
+
i = document.activeElement, u = document.body.style.overflow, document.body.style.overflow = "hidden", await K();
|
|
1168
|
+
const C = d.value;
|
|
1169
|
+
if (C) {
|
|
1170
|
+
const j = C.querySelectorAll(R);
|
|
1171
|
+
j.length > 0 ? j[0].focus() : C.focus();
|
|
1172
|
+
}
|
|
1173
|
+
} else
|
|
1174
|
+
document.body.style.overflow = u, i && i instanceof HTMLElement && i.focus();
|
|
1175
|
+
},
|
|
1176
|
+
{ immediate: !0 }
|
|
1177
|
+
), V(() => {
|
|
1178
|
+
a.open && (document.body.style.overflow = u);
|
|
1179
|
+
}), (p, C) => e.open ? (n(), l("div", {
|
|
1180
|
+
key: 0,
|
|
1181
|
+
class: "strand-dialog__backdrop",
|
|
1182
|
+
onClick: B,
|
|
1183
|
+
onKeydown: v
|
|
1184
|
+
}, [
|
|
1185
|
+
f("div", {
|
|
1186
|
+
ref_key: "panelRef",
|
|
1187
|
+
ref: d,
|
|
1188
|
+
class: b(m.value),
|
|
1189
|
+
role: "dialog",
|
|
1190
|
+
"aria-modal": "true",
|
|
1191
|
+
"aria-labelledby": e.title ? o : void 0,
|
|
1192
|
+
tabindex: -1
|
|
1193
|
+
}, [
|
|
1194
|
+
e.title ? (n(), l("div", Je, [
|
|
1195
|
+
f("h2", {
|
|
1196
|
+
id: o,
|
|
1197
|
+
class: "strand-dialog__title"
|
|
1198
|
+
}, _(e.title), 1)
|
|
1199
|
+
])) : $("", !0),
|
|
1200
|
+
f("button", {
|
|
1201
|
+
type: "button",
|
|
1202
|
+
class: "strand-dialog__close",
|
|
1203
|
+
"aria-label": "Close",
|
|
1204
|
+
onClick: C[0] || (C[0] = (j) => r("close"))
|
|
1205
|
+
}, " × "),
|
|
1206
|
+
f("div", Qe, [
|
|
1207
|
+
g(p.$slots, "default")
|
|
1208
|
+
])
|
|
1209
|
+
], 10, Ze)
|
|
1210
|
+
], 32)) : $("", !0);
|
|
1211
|
+
}
|
|
1212
|
+
}), Xe = ["aria-hidden"], Da = /* @__PURE__ */ h({
|
|
1213
|
+
__name: "Tooltip",
|
|
1214
|
+
props: {
|
|
1215
|
+
content: {},
|
|
1216
|
+
position: { default: "top" },
|
|
1217
|
+
delay: { default: 200 }
|
|
1218
|
+
},
|
|
1219
|
+
setup(e) {
|
|
1220
|
+
const t = e;
|
|
1221
|
+
let a = 0;
|
|
1222
|
+
const r = `strand-tooltip-${++a}`, s = x(!1);
|
|
1223
|
+
let o = null;
|
|
1224
|
+
function d() {
|
|
1225
|
+
o = setTimeout(() => {
|
|
1226
|
+
s.value = !0;
|
|
1227
|
+
}, t.delay);
|
|
1228
|
+
}
|
|
1229
|
+
function i() {
|
|
1230
|
+
o !== null && (clearTimeout(o), o = null), s.value = !1;
|
|
1231
|
+
}
|
|
1232
|
+
V(() => {
|
|
1233
|
+
o !== null && clearTimeout(o);
|
|
1234
|
+
});
|
|
1235
|
+
const u = c(
|
|
1236
|
+
() => ["strand-tooltip__wrapper"].filter(Boolean).join(" ")
|
|
1237
|
+
), m = c(
|
|
1238
|
+
() => [
|
|
1239
|
+
"strand-tooltip",
|
|
1240
|
+
`strand-tooltip--${t.position}`,
|
|
1241
|
+
s.value && "strand-tooltip--visible"
|
|
1242
|
+
].filter(Boolean).join(" ")
|
|
1243
|
+
);
|
|
1244
|
+
return (v, B) => (n(), l("span", {
|
|
1245
|
+
class: b(u.value),
|
|
1246
|
+
"aria-describedby": r,
|
|
1247
|
+
onMouseenter: d,
|
|
1248
|
+
onMouseleave: i,
|
|
1249
|
+
onFocus: d,
|
|
1250
|
+
onBlur: i
|
|
1251
|
+
}, [
|
|
1252
|
+
g(v.$slots, "default"),
|
|
1253
|
+
f("span", {
|
|
1254
|
+
id: r,
|
|
1255
|
+
class: b(m.value),
|
|
1256
|
+
role: "tooltip",
|
|
1257
|
+
"aria-hidden": !s.value
|
|
1258
|
+
}, _(e.content), 11, Xe)
|
|
1259
|
+
], 34));
|
|
1260
|
+
}
|
|
1261
|
+
}), Ye = ["aria-valuenow"], ea = ["width", "height", "viewBox"], aa = ["cx", "cy", "r"], ta = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset", "transform"], T = 3, Ia = /* @__PURE__ */ h({
|
|
1262
|
+
__name: "Progress",
|
|
1263
|
+
props: {
|
|
1264
|
+
variant: { default: "bar" },
|
|
1265
|
+
value: {},
|
|
1266
|
+
size: { default: "md" },
|
|
1267
|
+
className: { default: "" }
|
|
1268
|
+
},
|
|
1269
|
+
setup(e) {
|
|
1270
|
+
const t = e, a = { sm: 24, md: 40, lg: 56 }, r = c(() => t.value != null), s = c(
|
|
1271
|
+
() => [
|
|
1272
|
+
"strand-progress",
|
|
1273
|
+
`strand-progress--${t.variant}`,
|
|
1274
|
+
`strand-progress--${t.size}`,
|
|
1275
|
+
!r.value && "strand-progress--indeterminate",
|
|
1276
|
+
t.className
|
|
1277
|
+
].filter(Boolean).join(" ")
|
|
1278
|
+
), o = c(() => a[t.size] ?? a.md), d = c(() => (o.value - T) / 2), i = c(() => 2 * Math.PI * d.value), u = c(
|
|
1279
|
+
() => r.value ? i.value - i.value * t.value / 100 : 0
|
|
1280
|
+
);
|
|
1281
|
+
return (m, v) => (n(), l("div", y({
|
|
1282
|
+
class: s.value,
|
|
1283
|
+
role: "progressbar",
|
|
1284
|
+
"aria-valuemin": 0,
|
|
1285
|
+
"aria-valuemax": 100,
|
|
1286
|
+
"aria-valuenow": r.value ? e.value : void 0
|
|
1287
|
+
}, m.$attrs), [
|
|
1288
|
+
e.variant === "ring" ? (n(), l("svg", {
|
|
1289
|
+
key: 0,
|
|
1290
|
+
width: o.value,
|
|
1291
|
+
height: o.value,
|
|
1292
|
+
viewBox: `0 0 ${o.value} ${o.value}`,
|
|
1293
|
+
class: "strand-progress__ring"
|
|
1294
|
+
}, [
|
|
1295
|
+
f("circle", {
|
|
1296
|
+
cx: o.value / 2,
|
|
1297
|
+
cy: o.value / 2,
|
|
1298
|
+
r: d.value,
|
|
1299
|
+
fill: "none",
|
|
1300
|
+
"stroke-width": T,
|
|
1301
|
+
class: "strand-progress__track"
|
|
1302
|
+
}, null, 8, aa),
|
|
1303
|
+
f("circle", {
|
|
1304
|
+
cx: o.value / 2,
|
|
1305
|
+
cy: o.value / 2,
|
|
1306
|
+
r: d.value,
|
|
1307
|
+
fill: "none",
|
|
1308
|
+
"stroke-width": T,
|
|
1309
|
+
"stroke-dasharray": i.value,
|
|
1310
|
+
"stroke-dashoffset": r.value ? u.value : void 0,
|
|
1311
|
+
"stroke-linecap": "round",
|
|
1312
|
+
class: "strand-progress__fill",
|
|
1313
|
+
transform: `rotate(-90 ${o.value / 2} ${o.value / 2})`
|
|
1314
|
+
}, null, 8, ta)
|
|
1315
|
+
], 8, ea)) : (n(), l("div", {
|
|
1316
|
+
key: 1,
|
|
1317
|
+
class: "strand-progress__fill",
|
|
1318
|
+
style: S(r.value ? { width: `${e.value}%` } : void 0)
|
|
1319
|
+
}, null, 4))
|
|
1320
|
+
], 16, Ye));
|
|
1321
|
+
}
|
|
1322
|
+
}), Ra = /* @__PURE__ */ h({
|
|
1323
|
+
__name: "Spinner",
|
|
1324
|
+
props: {
|
|
1325
|
+
size: { default: "md" },
|
|
1326
|
+
className: { default: "" }
|
|
1327
|
+
},
|
|
1328
|
+
setup(e) {
|
|
1329
|
+
const t = e, a = c(
|
|
1330
|
+
() => [
|
|
1331
|
+
"strand-spinner",
|
|
1332
|
+
`strand-spinner--${t.size}`,
|
|
1333
|
+
t.className
|
|
1334
|
+
].filter(Boolean).join(" ")
|
|
1335
|
+
);
|
|
1336
|
+
return (r, s) => (n(), l("span", y({
|
|
1337
|
+
class: a.value,
|
|
1338
|
+
role: "status"
|
|
1339
|
+
}, r.$attrs), [...s[0] || (s[0] = [
|
|
1340
|
+
f("span", {
|
|
1341
|
+
class: "strand-spinner__ring",
|
|
1342
|
+
"aria-hidden": "true"
|
|
1343
|
+
}, null, -1),
|
|
1344
|
+
f("span", { class: "strand-spinner__sr-only" }, "Loading", -1)
|
|
1345
|
+
])], 16));
|
|
1346
|
+
}
|
|
1347
|
+
}), Ea = /* @__PURE__ */ h({
|
|
1348
|
+
__name: "Skeleton",
|
|
1349
|
+
props: {
|
|
1350
|
+
variant: { default: "text" },
|
|
1351
|
+
width: {},
|
|
1352
|
+
height: {},
|
|
1353
|
+
className: { default: "" }
|
|
1354
|
+
},
|
|
1355
|
+
setup(e) {
|
|
1356
|
+
const t = e, a = c(
|
|
1357
|
+
() => t.width ?? (t.variant === "text" ? "100%" : void 0)
|
|
1358
|
+
), r = c(
|
|
1359
|
+
() => t.variant === "circle" ? a.value : t.height
|
|
1360
|
+
), s = c(
|
|
1361
|
+
() => [
|
|
1362
|
+
"strand-skeleton",
|
|
1363
|
+
`strand-skeleton--${t.variant}`,
|
|
1364
|
+
"strand-skeleton--shimmer",
|
|
1365
|
+
t.className
|
|
1366
|
+
].filter(Boolean).join(" ")
|
|
1367
|
+
), o = c(() => ({
|
|
1368
|
+
width: a.value,
|
|
1369
|
+
height: r.value
|
|
1370
|
+
}));
|
|
1371
|
+
return (d, i) => (n(), l("div", y({
|
|
1372
|
+
class: s.value,
|
|
1373
|
+
"aria-hidden": "true",
|
|
1374
|
+
style: o.value
|
|
1375
|
+
}, d.$attrs), null, 16));
|
|
1376
|
+
}
|
|
1377
|
+
});
|
|
1378
|
+
export {
|
|
1379
|
+
za as Alert,
|
|
1380
|
+
ha as Avatar,
|
|
1381
|
+
ma as Badge,
|
|
1382
|
+
Ca as Breadcrumb,
|
|
1383
|
+
na as Button,
|
|
1384
|
+
va as Card,
|
|
1385
|
+
oa as Checkbox,
|
|
1386
|
+
ya as Container,
|
|
1387
|
+
pa as DataReadout,
|
|
1388
|
+
Va as Dialog,
|
|
1389
|
+
ka as Divider,
|
|
1390
|
+
fa as FormField,
|
|
1391
|
+
ga as Grid,
|
|
1392
|
+
la as Input,
|
|
1393
|
+
wa as Link,
|
|
1394
|
+
ja as Nav,
|
|
1395
|
+
Ia as Progress,
|
|
1396
|
+
da as Radio,
|
|
1397
|
+
Ba as Section,
|
|
1398
|
+
ia as Select,
|
|
1399
|
+
Ea as Skeleton,
|
|
1400
|
+
ua as Slider,
|
|
1401
|
+
Ra as Spinner,
|
|
1402
|
+
$a as Stack,
|
|
1403
|
+
ca as Switch,
|
|
1404
|
+
ba as Table,
|
|
1405
|
+
xa as Tabs,
|
|
1406
|
+
_a as Tag,
|
|
1407
|
+
ra as Textarea,
|
|
1408
|
+
Ta as Toast,
|
|
1409
|
+
Sa as ToastProvider,
|
|
1410
|
+
Da as Tooltip,
|
|
1411
|
+
Na as useToast
|
|
1412
|
+
};
|
|
1413
|
+
//# sourceMappingURL=index.js.map
|