@leaflink/stash 52.0.3 → 53.0.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/README.md +50 -49
- package/dist/Accordion.js +16 -16
- package/dist/Accordion.js.map +1 -1
- package/dist/AccordionGroup.js +7 -7
- package/dist/AccordionGroup.js.map +1 -1
- package/dist/ActionsDropdown.js +16 -16
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +1 -1
- package/dist/Alert.js +34 -34
- package/dist/Alert.js.map +1 -1
- package/dist/AppNavigationItem.js +31 -31
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppSidebar.js +19 -19
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppTopbar.js +32 -32
- package/dist/AppTopbar.js.map +1 -1
- package/dist/Avatar.js +18 -18
- package/dist/Avatar.js.map +1 -1
- package/dist/Backdrop.js +5 -5
- package/dist/Backdrop.js.map +1 -1
- package/dist/Badge.js +38 -38
- package/dist/Badge.js.map +1 -1
- package/dist/Box.js +1 -1
- package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js} +6 -6
- package/dist/{Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js.map → Box.vue_vue_type_script_setup_true_lang-dFFZN40_.js.map} +1 -1
- package/dist/Button.js +21 -21
- package/dist/Button.js.map +1 -1
- package/dist/ButtonGroup.js +26 -26
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/Card.js +14 -14
- package/dist/Card.js.map +1 -1
- package/dist/CardContent.js +1 -1
- package/dist/CardContent.js.map +1 -1
- package/dist/CardFooter.js +1 -1
- package/dist/CardFooter.js.map +1 -1
- package/dist/CardHeader.js +4 -4
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardMedia.js +20 -20
- package/dist/CardMedia.js.map +1 -1
- package/dist/Carousel.js +60 -60
- package/dist/Carousel.js.map +1 -1
- package/dist/Checkbox.js +30 -30
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +0 -3
- package/dist/Chip.js +33 -33
- package/dist/Chip.js.map +1 -1
- package/dist/ConfirmationCodeInput.js +72 -72
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ContextSwitcher.js +27 -27
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/Copy.js +47 -48
- package/dist/Copy.js.map +1 -1
- package/dist/CurrencyInput.js +1 -1
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +5 -5
- package/dist/DataView.js +23 -23
- package/dist/DataView.js.map +1 -1
- package/dist/DataViewFilters.js +26 -26
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewSortButton.js +22 -22
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewToolbar.js +52 -52
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.js +10 -10
- package/dist/DatePicker.js.map +1 -1
- package/dist/DescriptionList.js +2 -2
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionListDetail.js +2 -2
- package/dist/DescriptionListDetail.js.map +1 -1
- package/dist/DescriptionListGroup.js +9 -9
- package/dist/DescriptionListGroup.js.map +1 -1
- package/dist/DescriptionListTerm.js +8 -8
- package/dist/DescriptionListTerm.js.map +1 -1
- package/dist/Dialog.js +47 -47
- package/dist/Dialog.js.map +1 -1
- package/dist/Divider.js +6 -6
- package/dist/Divider.js.map +1 -1
- package/dist/Dropdown.js +20 -20
- package/dist/Dropdown.js.map +1 -1
- package/dist/EmptyState.js +26 -26
- package/dist/EmptyState.js.map +1 -1
- package/dist/Field.js +1 -1
- package/dist/{Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js → Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js} +17 -17
- package/dist/Field.vue_vue_type_script_setup_true_lang-dAGKfjf5.js.map +1 -0
- package/dist/FileUpload.js +47 -49
- package/dist/FileUpload.js.map +1 -1
- package/dist/FilterChip.js +20 -20
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterDrawerItem.js +13 -13
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDropdown.js +27 -27
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterSelect.js +33 -33
- package/dist/FilterSelect.js.map +1 -1
- package/dist/Filters.js +29 -29
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2 -8
- package/dist/HttpError.js +29 -29
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +0 -3
- package/dist/Icon.js +12 -12
- package/dist/Icon.js.map +1 -1
- package/dist/IconLabel.js +19 -19
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +1 -1
- package/dist/Illustration.js +2 -2
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js} +4 -4
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js.map → Illustration.vue_vue_type_script_setup_true_lang-C1bPkWZZ.js.map} +1 -1
- package/dist/Image.js +2 -2
- package/dist/Image.vue.d.ts +0 -3
- package/dist/{Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js → Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js} +11 -11
- package/dist/Image.vue_vue_type_script_setup_true_lang-CAj0FH9h.js.map +1 -0
- package/dist/InlineEdit.js +8 -8
- package/dist/InlineEdit.js.map +1 -1
- package/dist/Input.js +29 -29
- package/dist/Input.js.map +1 -1
- package/dist/InputOptions.js +87 -84
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +2 -2
- package/dist/IntegrationIcon.js +11 -11
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/Label.js +1 -1
- package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js} +16 -16
- package/dist/{Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map → Label.vue_vue_type_script_setup_true_lang-xwY3X-iV.js.map} +1 -1
- package/dist/ListItem.js +14 -14
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItem.vue.d.ts +0 -6
- package/dist/ListItemCell.js +9 -9
- package/dist/ListItemCell.js.map +1 -1
- package/dist/ListView.js +138 -141
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.vue.d.ts +2 -26
- package/dist/Loading.js +8 -8
- package/dist/Loading.js.map +1 -1
- package/dist/Logo.js +1 -1
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js} +3 -3
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js.map → Logo.vue_vue_type_script_setup_true_lang-DghNC_k6.js.map} +1 -1
- package/dist/Menu.js +5 -5
- package/dist/Menu.js.map +1 -1
- package/dist/MenuItem.js +12 -12
- package/dist/MenuItem.js.map +1 -1
- package/dist/Metric.js +24 -24
- package/dist/Metric.js.map +1 -1
- package/dist/Modal.js +60 -60
- package/dist/Modal.js.map +1 -1
- package/dist/Modals.js +1 -1
- package/dist/Modals.js.map +1 -1
- package/dist/Module.js +6 -6
- package/dist/Module.js.map +1 -1
- package/dist/ModuleContent.js +16 -16
- package/dist/ModuleContent.js.map +1 -1
- package/dist/ModuleFooter.js +13 -13
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleHeader.js +29 -29
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/MoreActions.js +81 -84
- package/dist/MoreActions.js.map +1 -1
- package/dist/ObfuscateText.js +4 -4
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/PageContent.js +13 -13
- package/dist/PageContent.js.map +1 -1
- package/dist/PageHeader.js +28 -28
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageNavigation.js +1 -1
- package/dist/Paginate.js +45 -45
- package/dist/Paginate.js.map +1 -1
- package/dist/QuickAction.js +18 -18
- package/dist/QuickAction.js.map +1 -1
- package/dist/Radio.js +17 -17
- package/dist/Radio.js.map +1 -1
- package/dist/RadioGroup.js +121 -121
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioNew.js +80 -80
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +0 -3
- package/dist/RangeInput.js +2 -2
- package/dist/RangeInput.js.map +1 -1
- package/dist/SearchBar.js +9 -9
- package/dist/SearchBar.js.map +1 -1
- package/dist/SectionHeader.js +14 -14
- package/dist/SectionHeader.js.map +1 -1
- package/dist/Select.js +369 -366
- package/dist/Select.js.map +1 -1
- package/dist/SelectStatus.js +26 -26
- package/dist/SelectStatus.js.map +1 -1
- package/dist/Skeleton.js +20 -20
- package/dist/Skeleton.js.map +1 -1
- package/dist/Step.js +37 -40
- package/dist/Step.js.map +1 -1
- package/dist/Stepper.js +17 -17
- package/dist/Stepper.js.map +1 -1
- package/dist/Switch.js +57 -57
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.js +17 -19
- package/dist/Tab.js.map +1 -1
- package/dist/TabPanel.js +1 -1
- package/dist/TabPanel.js.map +1 -1
- package/dist/Table.js +22 -22
- package/dist/Table.js.map +1 -1
- package/dist/TableCell.js +32 -32
- package/dist/TableCell.js.map +1 -1
- package/dist/TableHeaderCell.js +35 -35
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderRow.js +10 -10
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableRow.js +51 -51
- package/dist/TableRow.js.map +1 -1
- package/dist/Tabs.js +2 -2
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js → Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js} +33 -33
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-BVTCcK6M.js.map +1 -0
- package/dist/TextEditor.js +8 -8
- package/dist/TextEditor.js.map +1 -1
- package/dist/Textarea.js +15 -15
- package/dist/Textarea.js.map +1 -1
- package/dist/Thumbnail.js +41 -41
- package/dist/Thumbnail.js.map +1 -1
- package/dist/ThumbnailEmpty.js +3 -3
- package/dist/ThumbnailEmpty.js.map +1 -1
- package/dist/ThumbnailGroup.js +22 -22
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/Timeline.js +3 -3
- package/dist/Timeline.js.map +1 -1
- package/dist/TimelineItem.js +22 -22
- package/dist/TimelineItem.js.map +1 -1
- package/dist/Toast.js +29 -29
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +3 -0
- package/dist/Toasts.js +11 -11
- package/dist/Toasts.js.map +1 -1
- package/dist/Tooltip.js +2 -81
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.vue.d.ts +1 -1
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js +84 -0
- package/dist/Tooltip.vue_vue_type_script_setup_true_lang-mzBLSXy3.js.map +1 -0
- package/dist/components.css +2 -2
- package/dist/constants.d.ts +9 -9
- package/dist/constants.js +17 -17
- package/dist/constants.js.map +1 -1
- package/dist/directives/tooltip.js +2 -2
- package/dist/directives/tooltip.js.map +1 -1
- package/dist/{index-C14LhAwV.js → index-DBV9Uz0C.js} +3 -3
- package/dist/{index-C14LhAwV.js.map → index-DBV9Uz0C.js.map} +1 -1
- package/dist/tailwind-base.js.d.ts +12 -0
- package/dist/tailwind-base.js.map +1 -1
- package/dist/useSortable.js +1 -1
- package/dist/utils/helpers.js +15 -15
- package/dist/utils/helpers.js.map +1 -1
- package/package.json +15 -15
- package/styles/backwards-compat.css +373 -2851
- package/styles/main.css +8 -0
- package/styles/sofia-font.css +23 -27
- package/styles/theme.css +1033 -0
- package/dist/Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js.map +0 -1
- package/dist/Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js.map +0 -1
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-B3Irnlcd.js.map +0 -1
- package/dist/tailwind-base.d.ts +0 -333
- package/styles/base.css +0 -902
- package/tailwind-base.ts +0 -455
package/dist/Checkbox.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as C, useAttrs as E, useSlots as V, useCssModule as A, computed as s, createElementBlock as d, openBlock as i, unref as o, normalizeClass as n, withDirectives as B, createElementVNode as x, createCommentVNode as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as C, useAttrs as E, useSlots as V, useCssModule as A, computed as s, createElementBlock as d, openBlock as i, unref as o, normalizeClass as n, withDirectives as B, createElementVNode as x, createCommentVNode as M, mergeProps as $, vModelCheckbox as I, renderSlot as k, createTextVNode as v, toDisplayString as h } from "vue";
|
|
2
|
+
import N from "@leaflink/snitch";
|
|
3
3
|
import m from "lodash-es/uniqueId";
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
4
|
+
import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const D = ["data-test"], q = ["id", "aria-invalid", "aria-errormessage", "disabled", "value"], z = ["for"], H = ["id"], P = /* @__PURE__ */ C({
|
|
6
6
|
name: "ll-checkbox",
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "Checkbox",
|
|
9
9
|
props: {
|
|
10
|
-
checked: { type: [Boolean, Array]
|
|
10
|
+
checked: { type: [Boolean, Array] },
|
|
11
11
|
hasError: { type: Boolean, default: !1 },
|
|
12
12
|
id: { default: void 0 },
|
|
13
13
|
label: { default: void 0 },
|
|
@@ -18,13 +18,13 @@ const S = ["data-test"], D = ["id", "aria-invalid", "aria-errormessage", "disabl
|
|
|
18
18
|
disabled: { type: Boolean, default: !1 }
|
|
19
19
|
},
|
|
20
20
|
emits: ["update:checked"],
|
|
21
|
-
setup(
|
|
22
|
-
const e =
|
|
21
|
+
setup(f, { emit: _ }) {
|
|
22
|
+
const e = f, a = E(), y = V(), l = A(), g = _;
|
|
23
23
|
if (e.modelValue !== void 0)
|
|
24
24
|
throw new Error("ll-checkbox: use :checked or v-model:checked instead of :model-value and v-model.");
|
|
25
|
-
if (typeof e.value == "boolean" &&
|
|
25
|
+
if (typeof e.value == "boolean" && N.warn("ll-checkbox: use `checked` to toggle the state; `value` is what will be set if `checked` is true"), a.onChange)
|
|
26
26
|
throw new Error("ll-checkbox: use the @update:checked event instead of @change.");
|
|
27
|
-
const
|
|
27
|
+
const w = s(() => {
|
|
28
28
|
const t = { ...a };
|
|
29
29
|
return delete t["data-test"], delete t.class, t;
|
|
30
30
|
}), r = s({
|
|
@@ -32,11 +32,11 @@ const S = ["data-test"], D = ["id", "aria-invalid", "aria-errormessage", "disabl
|
|
|
32
32
|
return e.checked;
|
|
33
33
|
},
|
|
34
34
|
set(t) {
|
|
35
|
-
|
|
35
|
+
g("update:checked", t);
|
|
36
36
|
}
|
|
37
37
|
}), c = s(() => !!e.errorText || e.hasError), u = s(() => e.id || m("checkbox-")), b = s(() => e.errorText ? m("checkbox-error-") : void 0);
|
|
38
38
|
return (t, p) => (i(), d("div", {
|
|
39
|
-
class: n(["stash-checkbox
|
|
39
|
+
class: n(["stash-checkbox relative m-0", [
|
|
40
40
|
o(a).class,
|
|
41
41
|
{
|
|
42
42
|
"stash-checkbox--checked": !!r.value,
|
|
@@ -45,57 +45,57 @@ const S = ["data-test"], D = ["id", "aria-invalid", "aria-errormessage", "disabl
|
|
|
45
45
|
]]),
|
|
46
46
|
"data-test": o(a)["data-test"] || "stash-checkbox"
|
|
47
47
|
}, [
|
|
48
|
-
B(x("input",
|
|
48
|
+
B(x("input", $({
|
|
49
49
|
id: u.value,
|
|
50
50
|
"onUpdate:modelValue": p[0] || (p[0] = (T) => r.value = T),
|
|
51
51
|
"aria-invalid": !!e.errorText,
|
|
52
52
|
"aria-errormessage": b.value,
|
|
53
53
|
disabled: e.disabled,
|
|
54
|
-
class: ["
|
|
54
|
+
class: ["sr-only lg:m-0", o(l).input],
|
|
55
55
|
type: "checkbox",
|
|
56
56
|
value: t.value
|
|
57
|
-
},
|
|
58
|
-
[
|
|
57
|
+
}, w.value), null, 16, q), [
|
|
58
|
+
[I, r.value]
|
|
59
59
|
]),
|
|
60
60
|
x("label", {
|
|
61
61
|
"data-test": "stash-checkbox|label",
|
|
62
|
-
class: n(["stash-checkbox__label
|
|
62
|
+
class: n(["stash-checkbox__label relative inline-block min-h-9 cursor-pointer overflow-visible py-1.5 pl-8 align-top text-sm font-normal leading-6", [
|
|
63
63
|
o(l).label,
|
|
64
64
|
{
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
65
|
+
"text-ice-900": !c.value && !e.disabled,
|
|
66
|
+
"text-red-500": c.value,
|
|
67
|
+
"text-ice-500": e.disabled
|
|
68
68
|
}
|
|
69
69
|
]]),
|
|
70
70
|
for: u.value
|
|
71
71
|
}, [
|
|
72
72
|
k(t.$slots, "default", {}, () => [
|
|
73
|
-
|
|
73
|
+
v(h(t.label), 1)
|
|
74
74
|
])
|
|
75
|
-
], 10,
|
|
75
|
+
], 10, z),
|
|
76
76
|
e.errorText ? (i(), d("span", {
|
|
77
77
|
key: 0,
|
|
78
78
|
id: b.value,
|
|
79
|
-
class: "stash-checkbox__error-text
|
|
79
|
+
class: "stash-checkbox__error-text ml-8 block whitespace-pre-line text-xs text-red-500",
|
|
80
80
|
"data-test": "stash-checkbox|error"
|
|
81
|
-
}, h(e.errorText), 9, H)) : e.hintText || o(
|
|
81
|
+
}, h(e.errorText), 9, H)) : e.hintText || o(y).hint ? (i(), d("span", {
|
|
82
82
|
key: 1,
|
|
83
|
-
class: n(["stash-checkbox__hint-text
|
|
83
|
+
class: n(["stash-checkbox__hint-text ml-8 block whitespace-pre-line text-xs", { "text-ice-500": e.disabled }]),
|
|
84
84
|
"data-test": "stash-checkbox|hint"
|
|
85
85
|
}, [
|
|
86
86
|
k(t.$slots, "hint", {}, () => [
|
|
87
|
-
|
|
87
|
+
v(h(e.hintText), 1)
|
|
88
88
|
])
|
|
89
|
-
], 2)) :
|
|
90
|
-
], 10,
|
|
89
|
+
], 2)) : M("", !0)
|
|
90
|
+
], 10, D));
|
|
91
91
|
}
|
|
92
|
-
}), U = "
|
|
92
|
+
}), U = "_input_1v4by_5", j = "_label_1v4by_5", F = {
|
|
93
93
|
input: U,
|
|
94
94
|
label: j,
|
|
95
|
-
"has-error": "_has-
|
|
95
|
+
"has-error": "_has-error_1v4by_26"
|
|
96
96
|
}, G = {
|
|
97
97
|
$style: F
|
|
98
|
-
}, Q = /* @__PURE__ */
|
|
98
|
+
}, Q = /* @__PURE__ */ S(P, [["__cssModules", G]]);
|
|
99
99
|
export {
|
|
100
100
|
Q as default
|
|
101
101
|
};
|
package/dist/Checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../src/components/Checkbox/Checkbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, useAttrs, useCssModule, useSlots } from 'vue';\n\n export interface CheckboxProps {\n /**\n * Whether the checkbox is currently checked based on the current value.\n * Either defined by a boolean, or whether `checked` as an array includes `value`.\n */\n checked: boolean | Array<string | number>;\n\n /**\n * Whether the checkbox is in an error state (optional). For error styling without error text.\n *\n * @deprecated Just pass `error-text` instead.\n */\n hasError?: boolean;\n\n /**\n * Unique ID for the checkbox, required for accessibility purposes\n */\n id?: string;\n\n /**\n * Label text to display with checkbox\n */\n label?: string;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) and adds error styling (overrides `hasError`).\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * @deprecated use the `checked` prop instead\n */\n modelValue?: boolean | Array<string | number>;\n\n /**\n * The value of the checkbox.\n */\n value?: string | number;\n\n /**\n * Whether the checkbox is disabled.\n */\n disabled?: boolean;\n }\n\n defineOptions({\n name: 'll-checkbox',\n inheritAttrs: false,\n });\n\n const props = withDefaults(defineProps<CheckboxProps>(), {\n
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../src/components/Checkbox/Checkbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import logger from '@leaflink/snitch';\n import uniqueId from 'lodash-es/uniqueId';\n import { computed, useAttrs, useCssModule, useSlots } from 'vue';\n\n export interface CheckboxProps {\n /**\n * Whether the checkbox is currently checked based on the current value.\n * Either defined by a boolean, or whether `checked` as an array includes `value`.\n */\n checked: boolean | Array<string | number>;\n\n /**\n * Whether the checkbox is in an error state (optional). For error styling without error text.\n *\n * @deprecated Just pass `error-text` instead.\n */\n hasError?: boolean;\n\n /**\n * Unique ID for the checkbox, required for accessibility purposes\n */\n id?: string;\n\n /**\n * Label text to display with checkbox\n */\n label?: string;\n\n /**\n * Error text to display. Replaces `hintText` (if provided) and adds error styling (overrides `hasError`).\n */\n errorText?: string;\n\n /**\n * Displays text below the input; hidden when the isReadOnly prop is truthy.\n */\n hintText?: string;\n\n /**\n * @deprecated use the `checked` prop instead\n */\n modelValue?: boolean | Array<string | number>;\n\n /**\n * The value of the checkbox.\n */\n value?: string | number;\n\n /**\n * Whether the checkbox is disabled.\n */\n disabled?: boolean;\n }\n\n defineOptions({\n name: 'll-checkbox',\n inheritAttrs: false,\n });\n\n const props = withDefaults(defineProps<CheckboxProps>(), {\n errorId: undefined,\n errorText: '',\n hasError: false,\n hintText: '',\n id: undefined,\n label: undefined,\n modelValue: undefined,\n value: undefined,\n disabled: false,\n });\n\n const attrs = useAttrs();\n const slots = useSlots();\n const classes = useCssModule();\n\n const emit = defineEmits<{\n (e: 'update:checked', value: CheckboxProps['checked']): void;\n }>();\n\n if (props.modelValue !== undefined) {\n throw new Error('ll-checkbox: use :checked or v-model:checked instead of :model-value and v-model.');\n }\n\n if (typeof props.value === 'boolean') {\n logger.warn('ll-checkbox: use `checked` to toggle the state; `value` is what will be set if `checked` is true');\n }\n\n if (attrs.onChange) {\n throw new Error('ll-checkbox: use the @update:checked event instead of @change.');\n }\n\n const inputAttrs = computed(() => {\n const tempAttrs = { ...attrs };\n\n delete tempAttrs['data-test'];\n delete tempAttrs.class;\n\n return tempAttrs;\n });\n\n const internalValue = computed({\n get() {\n return props.checked;\n },\n set(value) {\n emit('update:checked', value);\n },\n });\n\n const internalHasError = computed(() => !!props.errorText || props.hasError);\n const checkboxId = computed(() => props.id || uniqueId('checkbox-'));\n const checkboxErrorId = computed(() => (props.errorText ? uniqueId('checkbox-error-') : undefined));\n</script>\n\n<template>\n <div\n class=\"stash-checkbox relative m-0\"\n :class=\"[\n attrs.class,\n {\n 'stash-checkbox--checked': !!internalValue,\n [`stash-checkbox--has-error ${classes['has-error']}`]: internalHasError,\n },\n ]\"\n :data-test=\"attrs['data-test'] || 'stash-checkbox'\"\n >\n <input\n :id=\"checkboxId\"\n v-model=\"internalValue\"\n :aria-invalid=\"!!props.errorText\"\n :aria-errormessage=\"checkboxErrorId\"\n :disabled=\"props.disabled\"\n class=\"sr-only lg:m-0\"\n :class=\"classes.input\"\n type=\"checkbox\"\n :value=\"value\"\n v-bind=\"inputAttrs\"\n />\n\n <label\n data-test=\"stash-checkbox|label\"\n class=\"stash-checkbox__label relative inline-block min-h-9 cursor-pointer overflow-visible py-1.5 pl-8 align-top text-sm font-normal leading-6\"\n :class=\"[\n classes.label,\n {\n 'text-ice-900': !internalHasError && !props.disabled,\n 'text-red-500': internalHasError,\n 'text-ice-500': props.disabled,\n },\n ]\"\n :for=\"checkboxId\"\n >\n <slot>\n {{ label }}\n </slot>\n </label>\n\n <span\n v-if=\"props.errorText\"\n :id=\"checkboxErrorId\"\n class=\"stash-checkbox__error-text ml-8 block whitespace-pre-line text-xs text-red-500\"\n data-test=\"stash-checkbox|error\"\n >\n {{ props.errorText }}\n </span>\n <span\n v-else-if=\"props.hintText || slots.hint\"\n class=\"stash-checkbox__hint-text ml-8 block whitespace-pre-line text-xs\"\n :class=\"{ 'text-ice-500': props.disabled }\"\n data-test=\"stash-checkbox|hint\"\n >\n <!-- @slot for displaying hint text -->\n <slot name=\"hint\">{{ props.hintText }}</slot>\n </span>\n </div>\n</template>\n\n<style module>\n @reference \"../../../styles/main.css\";\n\n @layer utilities {\n .input:disabled + .label {\n cursor: auto;\n }\n\n .label::before {\n content: '';\n border: 1px solid var(--color-ice-500);\n display: inline-block;\n vertical-align: top;\n }\n\n .label::before,\n .label::after {\n border-radius: var(--radius-sm);\n height: 20px;\n left: 0;\n position: absolute;\n top: --spacing(1.5);\n width: 20px;\n }\n\n .has-error .label::before,\n .has-error .input {\n border-color: var(--color-red-500);\n }\n\n .input:indeterminate + .label::after {\n content: url('data:image/svg+xml; utf8, <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 10.4C6 10.1791 6.17909 10 6.4 10H17.6C17.8209 10 18 10.1791 18 10.4V12.6C18 12.8209 17.8209 13 17.6 13H6.4C6.17909 13 6 12.8209 6 12.6V10.4Z\" fill=\"white\"/></svg>');\n }\n\n .input:checked + .label::after {\n content: url('data:image/svg+xml; utf8, <svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M17.89 8.281a.723.723 0 0 1 .22.531.723.723 0 0 1-.22.532l-6.718 6.719a.723.723 0 0 1-.531.218.723.723 0 0 1-.532-.218l-3.89-3.891A.723.723 0 0 1 6 11.64c0-.209.073-.386.219-.532l1.062-1.062a.723.723 0 0 1 .532-.219.72.72 0 0 1 .53.219l2.298 2.305 5.125-5.133a.723.723 0 0 1 .53-.219c.21 0 .386.073.532.219l1.063 1.062z\" fill=\"white\"/></svg>');\n background: var(--color-blue-500);\n height: 20px;\n width: 20px;\n top: --spacing(1.5);\n }\n\n .input:checked + .label::before,\n .input:indeterminate + .label::before {\n background: var(--color-blue-500);\n border-color: var(--color-blue-500);\n }\n\n .input:disabled + .label::before,\n .input:disabled + .label::after {\n background: var(--color-ice-100);\n border: 1px solid var(--color-ice-500);\n }\n\n .input:disabled:is(:checked, :indeterminate) + .label::after {\n background: var(--color-ice-500);\n }\n\n .input:not(:disabled, :checked, :indeterminate) + .label:hover::before {\n border-color: var(--color-blue-500);\n }\n }\n</style>\n"],"names":["props","__props","attrs","useAttrs","slots","useSlots","classes","useCssModule","emit","__emit","logger","inputAttrs","computed","tempAttrs","internalValue","value","internalHasError","checkboxId","uniqueId","checkboxErrorId"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA4DE,UAAMA,IAAQC,GAYRC,IAAQC,EAAA,GACRC,IAAQC,EAAA,GACRC,IAAUC,EAAA,GAEVC,IAAOC;AAIb,QAAIT,EAAM,eAAe;AACvB,YAAM,IAAI,MAAM,mFAAmF;AAOrG,QAJI,OAAOA,EAAM,SAAU,aACzBU,EAAO,KAAK,kGAAkG,GAG5GR,EAAM;AACR,YAAM,IAAI,MAAM,gEAAgE;AAGlF,UAAMS,IAAaC,EAAS,MAAM;AAChC,YAAMC,IAAY,EAAE,GAAGX,EAAA;AAEvB,oBAAOW,EAAU,WAAW,GAC5B,OAAOA,EAAU,OAEVA;AAAA,IACT,CAAC,GAEKC,IAAgBF,EAAS;AAAA,MAC7B,MAAM;AACJ,eAAOZ,EAAM;AAAA,MACf;AAAA,MACA,IAAIe,GAAO;AACT,QAAAP,EAAK,kBAAkBO,CAAK;AAAA,MAC9B;AAAA,IAAA,CACD,GAEKC,IAAmBJ,EAAS,MAAM,CAAC,CAACZ,EAAM,aAAaA,EAAM,QAAQ,GACrEiB,IAAaL,EAAS,MAAMZ,EAAM,MAAMkB,EAAS,WAAW,CAAC,GAC7DC,IAAkBP,EAAS,MAAOZ,EAAM,YAAYkB,EAAS,iBAAiB,IAAI,MAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Checkbox.vue.d.ts
CHANGED
|
@@ -75,7 +75,6 @@ export declare interface CheckboxProps {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckboxProps>, {
|
|
78
|
-
checked: boolean;
|
|
79
78
|
errorId: undefined;
|
|
80
79
|
errorText: string;
|
|
81
80
|
hasError: boolean;
|
|
@@ -88,7 +87,6 @@ disabled: boolean;
|
|
|
88
87
|
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
89
88
|
"update:checked": (value: boolean | (string | number)[]) => void;
|
|
90
89
|
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CheckboxProps>, {
|
|
91
|
-
checked: boolean;
|
|
92
90
|
errorId: undefined;
|
|
93
91
|
errorText: string;
|
|
94
92
|
hasError: boolean;
|
|
@@ -109,7 +107,6 @@ errorText: string;
|
|
|
109
107
|
hintText: string;
|
|
110
108
|
modelValue: boolean | (string | number)[];
|
|
111
109
|
value: string | number;
|
|
112
|
-
checked: boolean | (string | number)[];
|
|
113
110
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
114
111
|
default?(_: {}): any;
|
|
115
112
|
hint?(_: {}): any;
|
package/dist/Chip.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as f, useCssModule as b, createElementBlock as r, openBlock as d, normalizeClass as n, unref as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as f, useCssModule as b, createElementBlock as r, openBlock as d, normalizeClass as n, unref as i, renderSlot as m, createCommentVNode as v, withModifiers as u, withKeys as _, createVNode as C } from "vue";
|
|
2
|
+
import y from "./utils/colorScheme.js";
|
|
3
|
+
import $ from "./Icon.js";
|
|
4
|
+
import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const k = ["disabled"], w = /* @__PURE__ */ f({
|
|
6
6
|
name: "ll-chip",
|
|
7
7
|
__name: "Chip",
|
|
8
8
|
props: {
|
|
@@ -18,65 +18,65 @@ const z = ["disabled"], k = /* @__PURE__ */ f({
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["click", "remove"],
|
|
20
20
|
setup(c, { emit: p }) {
|
|
21
|
-
const e = c,
|
|
21
|
+
const e = c, a = p, t = b();
|
|
22
22
|
function h() {
|
|
23
|
-
const { computedBgColor:
|
|
23
|
+
const { computedBgColor: s, computedTextColor: o } = y({
|
|
24
24
|
shade: e.shade,
|
|
25
25
|
color: e.colorScheme
|
|
26
|
-
}), l = `
|
|
26
|
+
}), l = `text-${e.textColor || o} bg-${e.bgColor || s}`;
|
|
27
27
|
return {
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
28
|
+
"rounded-none": e.radius === "none",
|
|
29
|
+
"rounded-xs": e.radius === "standard",
|
|
30
|
+
"rounded-full": e.radius === "pill",
|
|
31
31
|
[l]: !e.shouldOverrideColors && !e.disabled,
|
|
32
|
-
"
|
|
32
|
+
"bg-ice-500 text-white": e.disabled
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
return (
|
|
36
|
-
class: n(["stash-chip
|
|
35
|
+
return (s, o) => (d(), r("span", {
|
|
36
|
+
class: n(["stash-chip relative inline-flex items-center", [
|
|
37
37
|
`stash-chip--radius-${e.radius}`,
|
|
38
38
|
`stash-chip--size-${e.size}`,
|
|
39
39
|
`stash-chip--shade-${e.shade}`,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
i(t).root,
|
|
41
|
+
i(t).removableChip,
|
|
42
|
+
i(t)[`size-${e.size}`],
|
|
43
43
|
h()
|
|
44
44
|
]]),
|
|
45
45
|
"data-test": "stash-chip",
|
|
46
|
-
onClick:
|
|
46
|
+
onClick: o[2] || (o[2] = (l) => a("click"))
|
|
47
47
|
}, [
|
|
48
|
-
|
|
48
|
+
s.isRemovable ? (d(), r("span", {
|
|
49
49
|
key: 0,
|
|
50
|
-
class: n([{ "
|
|
50
|
+
class: n([{ "mr-6 truncate": e.isRemovable }])
|
|
51
51
|
}, [
|
|
52
|
-
|
|
53
|
-
], 2)) :
|
|
52
|
+
m(s.$slots, "default")
|
|
53
|
+
], 2)) : m(s.$slots, "default", { key: 1 }),
|
|
54
54
|
e.isRemovable ? (d(), r("button", {
|
|
55
55
|
key: 2,
|
|
56
56
|
tabindex: "-1",
|
|
57
|
-
class: n(["stash-chip__remove-button", ["
|
|
57
|
+
class: n(["stash-chip__remove-button", ["absolute", i(t)["remove-button"]]]),
|
|
58
58
|
"data-test": "stash-chip|remove-button",
|
|
59
59
|
disabled: e.disabled,
|
|
60
|
-
onKeypress:
|
|
61
|
-
onMousedown:
|
|
60
|
+
onKeypress: o[0] || (o[0] = _(u((l) => a("remove"), ["prevent"]), ["enter"])),
|
|
61
|
+
onMousedown: o[1] || (o[1] = u((l) => a("remove"), ["prevent", "stop"]))
|
|
62
62
|
}, [
|
|
63
|
-
|
|
63
|
+
C($, {
|
|
64
64
|
"data-test": "icon|close",
|
|
65
65
|
name: "close",
|
|
66
66
|
size: "small"
|
|
67
67
|
})
|
|
68
|
-
], 42,
|
|
68
|
+
], 42, k)) : v("", !0)
|
|
69
69
|
], 2));
|
|
70
70
|
}
|
|
71
|
-
}), x = "
|
|
71
|
+
}), x = "_root_1jiew_5", g = {
|
|
72
72
|
root: x,
|
|
73
|
-
"size-medium": "_size-
|
|
74
|
-
"size-small": "_size-
|
|
75
|
-
"remove-button": "_remove-
|
|
73
|
+
"size-medium": "_size-medium_1jiew_15",
|
|
74
|
+
"size-small": "_size-small_1jiew_20",
|
|
75
|
+
"remove-button": "_remove-button_1jiew_25"
|
|
76
76
|
}, B = {
|
|
77
77
|
$style: g
|
|
78
|
-
},
|
|
78
|
+
}, K = /* @__PURE__ */ z(w, [["__cssModules", B]]);
|
|
79
79
|
export {
|
|
80
|
-
|
|
80
|
+
K as default
|
|
81
81
|
};
|
|
82
82
|
//# sourceMappingURL=Chip.js.map
|
package/dist/Chip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.js","sources":["../src/components/Chip/Chip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n import { StashCommonColor, StashPrimaryColorGroup } from '../../../types/colors';\n import colorSchemeUtil from '../../utils/colorScheme';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-chip',\n });\n\n export interface ChipProps {\n /**\n * The color for the chip that determines both the text and bg color. Needs to\n * be one of the brand colors in our design system (not a shade).\n */\n colorScheme?: StashPrimaryColorGroup;\n\n /**\n * The shade of the provided color to use for the background color. This effects the inferred\n * text color unless a specific text color is provided. Currently only `light` and `main`\n * shades are supported. `dark` may be added in the future.\n */\n shade?: 'light' | 'main';\n\n /**\n * The size of the chip.\n */\n size?: 'small' | 'medium';\n\n /**\n * The type of border radius to use.\n */\n radius?: 'none' | 'standard' | 'pill';\n\n /**\n * The background color of the chip. Needs to be one of our design system colors.\n */\n bgColor?: StashCommonColor;\n\n /**\n * The color of the chip text. Needs to be one of our design system colors.\n */\n textColor?: StashCommonColor;\n\n /**\n * Determines if a close icon is surfaced.\n */\n isRemovable?: boolean;\n\n /**\n * Determines if background and text color in Chip should be overidden.\n */\n shouldOverrideColors?: boolean;\n\n /**\n * Determines if the chip is disabled.\n */\n disabled?: boolean;\n }\n\n const props = withDefaults(defineProps<ChipProps>(), {\n size: 'medium',\n radius: 'standard',\n colorScheme: 'ice',\n shade: 'light',\n bgColor: undefined,\n textColor: undefined,\n isRemovable: false,\n shouldOverrideColors: false,\n disabled: false,\n });\n\n const emit = defineEmits<{\n /**\n * Fires on click of the chip.\n */\n (e: 'click'): void;\n /**\n * If `is-removable` is true, fires on click of the close button.\n */\n (e: 'remove'): void;\n }>();\n\n const classes = useCssModule();\n\n function determineConditionalStyles() {\n const { computedBgColor, computedTextColor } = colorSchemeUtil({\n shade: props.shade,\n color: props.colorScheme,\n });\n\n const colorStyles = `
|
|
1
|
+
{"version":3,"file":"Chip.js","sources":["../src/components/Chip/Chip.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { useCssModule } from 'vue';\n\n import { StashCommonColor, StashPrimaryColorGroup } from '../../../types/colors';\n import colorSchemeUtil from '../../utils/colorScheme';\n import Icon from '../Icon/Icon.vue';\n\n defineOptions({\n name: 'll-chip',\n });\n\n export interface ChipProps {\n /**\n * The color for the chip that determines both the text and bg color. Needs to\n * be one of the brand colors in our design system (not a shade).\n */\n colorScheme?: StashPrimaryColorGroup;\n\n /**\n * The shade of the provided color to use for the background color. This effects the inferred\n * text color unless a specific text color is provided. Currently only `light` and `main`\n * shades are supported. `dark` may be added in the future.\n */\n shade?: 'light' | 'main';\n\n /**\n * The size of the chip.\n */\n size?: 'small' | 'medium';\n\n /**\n * The type of border radius to use.\n */\n radius?: 'none' | 'standard' | 'pill';\n\n /**\n * The background color of the chip. Needs to be one of our design system colors.\n */\n bgColor?: StashCommonColor;\n\n /**\n * The color of the chip text. Needs to be one of our design system colors.\n */\n textColor?: StashCommonColor;\n\n /**\n * Determines if a close icon is surfaced.\n */\n isRemovable?: boolean;\n\n /**\n * Determines if background and text color in Chip should be overidden.\n */\n shouldOverrideColors?: boolean;\n\n /**\n * Determines if the chip is disabled.\n */\n disabled?: boolean;\n }\n\n const props = withDefaults(defineProps<ChipProps>(), {\n size: 'medium',\n radius: 'standard',\n colorScheme: 'ice',\n shade: 'light',\n bgColor: undefined,\n textColor: undefined,\n isRemovable: false,\n shouldOverrideColors: false,\n disabled: false,\n });\n\n const emit = defineEmits<{\n /**\n * Fires on click of the chip.\n */\n (e: 'click'): void;\n /**\n * If `is-removable` is true, fires on click of the close button.\n */\n (e: 'remove'): void;\n }>();\n\n const classes = useCssModule();\n\n function determineConditionalStyles() {\n const { computedBgColor, computedTextColor } = colorSchemeUtil({\n shade: props.shade,\n color: props.colorScheme,\n });\n\n const colorStyles = `text-${props.textColor || computedTextColor} bg-${props.bgColor || computedBgColor}`;\n\n return {\n 'rounded-none': props.radius === 'none',\n 'rounded-xs': props.radius === 'standard',\n 'rounded-full': props.radius === 'pill',\n [colorStyles]: !props.shouldOverrideColors && !props.disabled,\n 'bg-ice-500 text-white': props.disabled,\n };\n }\n</script>\n\n<template>\n <span\n class=\"stash-chip relative inline-flex items-center\"\n :class=\"[\n `stash-chip--radius-${props.radius}`,\n `stash-chip--size-${props.size}`,\n `stash-chip--shade-${props.shade}`,\n classes.root,\n classes.removableChip,\n classes[`size-${props.size}`],\n determineConditionalStyles(),\n ]\"\n data-test=\"stash-chip\"\n @click=\"emit('click')\"\n >\n <span v-if=\"isRemovable\" :class=\"[{ 'mr-6 truncate': props.isRemovable }]\">\n <!-- @slot Chip text -->\n <slot></slot>\n </span>\n\n <!-- Allows easier testing and DOM quering when the chip text isn't nested in an inner span -->\n <!-- @slot Chip text -->\n <slot v-else></slot>\n\n <button\n v-if=\"props.isRemovable\"\n tabindex=\"-1\"\n class=\"stash-chip__remove-button\"\n :class=\"['absolute', classes['remove-button']]\"\n data-test=\"stash-chip|remove-button\"\n :disabled=\"props.disabled\"\n @keypress.enter.prevent=\"emit('remove')\"\n @mousedown.prevent.stop=\"emit('remove')\"\n >\n <Icon data-test=\"icon|close\" name=\"close\" size=\"small\" />\n </button>\n </span>\n</template>\n\n<style module>\n @reference \"../../../styles/main.css\";\n\n @layer utilities {\n .root {\n /**\n * Applying these styles this way because the rule of thumb is that tailwind classes should\n * always end up taking precedence, so we're converted these specific styles to be generated\n * in a custom class instead, giving `FilterChip` (which wraps `Chip`) the ability to easily\n * override them.\n */\n @apply leading-none font-semibold uppercase text-[10px];\n }\n\n .size-medium {\n height: 20px;\n padding: 2px 8px 0 8px;\n }\n\n .size-small {\n height: 16px;\n padding: 2px 8px 0 8px;\n }\n\n .remove-button {\n border-radius: inherit;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n height: inherit;\n margin-top: -2px; /* used to offset 2px top padding from .size-medium and size-small */\n padding: 0 4px;\n right: 0;\n }\n\n .remove-button:not(:disabled):hover {\n background: rgb(0 0 0 / 10%);\n }\n }\n</style>\n"],"names":["props","__props","emit","__emit","classes","useCssModule","determineConditionalStyles","computedBgColor","computedTextColor","colorSchemeUtil","colorStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;AA6DE,UAAMA,IAAQC,GAYRC,IAAOC,GAWPC,IAAUC,EAAA;AAEhB,aAASC,IAA6B;AACpC,YAAM,EAAE,iBAAAC,GAAiB,mBAAAC,EAAA,IAAsBC,EAAgB;AAAA,QAC7D,OAAOT,EAAM;AAAA,QACb,OAAOA,EAAM;AAAA,MAAA,CACd,GAEKU,IAAc,QAAQV,EAAM,aAAaQ,CAAiB,OAAOR,EAAM,WAAWO,CAAe;AAEvG,aAAO;AAAA,QACL,gBAAgBP,EAAM,WAAW;AAAA,QACjC,cAAcA,EAAM,WAAW;AAAA,QAC/B,gBAAgBA,EAAM,WAAW;AAAA,QACjC,CAACU,CAAW,GAAG,CAACV,EAAM,wBAAwB,CAACA,EAAM;AAAA,QACrD,yBAAyBA,EAAM;AAAA,MAAA;AAAA,IAEnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as I, useCssVars as v, useCssModule as E, ref as V, onMounted as B, watch as P, createElementBlock as a, openBlock as r, normalizeClass as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as I, useCssVars as v, useCssModule as E, ref as V, onMounted as B, watch as P, createElementBlock as a, openBlock as r, normalizeClass as g, unref as l, createElementVNode as A, createCommentVNode as p, Fragment as M, renderList as F, toDisplayString as f } from "vue";
|
|
2
|
+
import { _ as K } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const S = { class: "mb-3 flex gap-6" }, U = ["value", "onInput"], j = {
|
|
4
4
|
key: 0,
|
|
5
|
-
class: "
|
|
5
|
+
class: "mt-1 block whitespace-pre-line pr-6 text-center text-red-500",
|
|
6
6
|
"data-test": "field-error"
|
|
7
|
-
},
|
|
7
|
+
}, L = {
|
|
8
8
|
key: 1,
|
|
9
|
-
class: "
|
|
9
|
+
class: "mt-1 block whitespace-pre-line pr-6 text-center text-green-500",
|
|
10
10
|
"data-test": "field-success"
|
|
11
|
-
},
|
|
11
|
+
}, z = {
|
|
12
12
|
key: 2,
|
|
13
|
-
class: "
|
|
13
|
+
class: "mt-1 block whitespace-pre-line pr-6 text-center text-ice-700",
|
|
14
14
|
"data-test": "field-hint"
|
|
15
15
|
}, R = /* @__PURE__ */ I({
|
|
16
16
|
__name: "ConfirmationCodeInput",
|
|
@@ -22,96 +22,96 @@ const K = { class: "tw-mb-3 tw-flex tw-gap-6" }, S = ["value", "onInput"], U = {
|
|
|
22
22
|
modelValue: { default: void 0 }
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:model-value", "change", "focus", "blur"],
|
|
25
|
-
setup(
|
|
26
|
-
v((
|
|
27
|
-
|
|
25
|
+
setup(b, { emit: k }) {
|
|
26
|
+
v((e) => ({
|
|
27
|
+
"18a4a680": e.digitCount
|
|
28
28
|
}));
|
|
29
|
-
const c = E(), o =
|
|
29
|
+
const c = E(), o = b, i = k, s = V([]);
|
|
30
30
|
B(() => {
|
|
31
|
-
var
|
|
32
|
-
o.modelValue && (s.value = (
|
|
31
|
+
var e;
|
|
32
|
+
o.modelValue && (s.value = (e = o.modelValue) == null ? void 0 : e.split(""));
|
|
33
33
|
});
|
|
34
|
-
function
|
|
34
|
+
function T(e, t) {
|
|
35
35
|
var n;
|
|
36
|
-
s.value[
|
|
36
|
+
s.value[t] = (n = e.target) == null ? void 0 : n.value, m(e), e.inputType === "deleteContentBackward" ? d(e) : (e.inputType === "insertText" || e.inputType === "deleteContentForward") && h(e);
|
|
37
37
|
}
|
|
38
|
-
function m(
|
|
39
|
-
const
|
|
40
|
-
i("update:model-value",
|
|
38
|
+
function m(e) {
|
|
39
|
+
const t = s.value.join("");
|
|
40
|
+
i("update:model-value", t), i("change", { originalEvent: e, value: t });
|
|
41
41
|
}
|
|
42
|
-
function d(
|
|
43
|
-
const
|
|
44
|
-
|
|
42
|
+
function d(e) {
|
|
43
|
+
const t = _(e.target);
|
|
44
|
+
t && (t.focus(), t.select());
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
|
|
46
|
+
function h(e) {
|
|
47
|
+
const t = x(e.target);
|
|
48
|
+
t && (t.focus(), t.select());
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
return
|
|
50
|
+
function _(e) {
|
|
51
|
+
const t = e.previousElementSibling;
|
|
52
|
+
if (t)
|
|
53
|
+
return t.nodeName === "INPUT" ? t : _(t);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
55
|
+
function x(e) {
|
|
56
|
+
const t = e.nextElementSibling;
|
|
57
|
+
if (t)
|
|
58
|
+
return t.nodeName === "INPUT" ? t : x(t);
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
60
|
+
function y(e) {
|
|
61
|
+
e.target.select(), i("focus", e);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
i("blur",
|
|
63
|
+
function C(e) {
|
|
64
|
+
i("blur", e);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
var
|
|
68
|
-
if (!(
|
|
69
|
-
switch (
|
|
66
|
+
function w(e) {
|
|
67
|
+
var t;
|
|
68
|
+
if (!(e.ctrlKey || e.metaKey))
|
|
69
|
+
switch (e.code) {
|
|
70
70
|
case "ArrowLeft":
|
|
71
|
-
d(
|
|
71
|
+
d(e), e.preventDefault();
|
|
72
72
|
break;
|
|
73
73
|
case "ArrowUp":
|
|
74
74
|
case "ArrowDown":
|
|
75
|
-
|
|
75
|
+
e.preventDefault();
|
|
76
76
|
break;
|
|
77
77
|
case "Backspace":
|
|
78
|
-
((
|
|
78
|
+
((t = e.target) == null ? void 0 : t.value.length) === 0 && (d(e), e.preventDefault());
|
|
79
79
|
break;
|
|
80
80
|
case "ArrowRight":
|
|
81
|
-
|
|
81
|
+
h(e), e.preventDefault();
|
|
82
82
|
break;
|
|
83
83
|
case "Enter":
|
|
84
84
|
case "NumpadEnter":
|
|
85
85
|
case "Tab":
|
|
86
86
|
break;
|
|
87
87
|
default:
|
|
88
|
-
(!(
|
|
88
|
+
(!(e.code !== "Space" && Number(e.key) >= 0 && Number(e.key) <= 9) || s.value.join("").length >= o.digitCount && e.code !== "Delete") && e.preventDefault();
|
|
89
89
|
break;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function N(
|
|
92
|
+
function N(e) {
|
|
93
93
|
var n;
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
const u =
|
|
97
|
-
isNaN(D) || (s.value = u.split(""), m(
|
|
94
|
+
const t = (n = e.clipboardData) == null ? void 0 : n.getData("text");
|
|
95
|
+
if (t != null && t.length) {
|
|
96
|
+
const u = t == null ? void 0 : t.substring(0, o.digitCount), D = parseInt(u);
|
|
97
|
+
isNaN(D) || (s.value = u.split(""), m(e));
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
e.preventDefault();
|
|
100
100
|
}
|
|
101
101
|
return P(
|
|
102
102
|
() => o.modelValue,
|
|
103
|
-
(
|
|
104
|
-
s.value =
|
|
103
|
+
(e) => {
|
|
104
|
+
s.value = e ? e.split("") : new Array(o.digitCount);
|
|
105
105
|
}
|
|
106
|
-
), (
|
|
107
|
-
class:
|
|
106
|
+
), (e, t) => (r(), a("div", {
|
|
107
|
+
class: g(["stash-confirmation-code-input inline-block", [l(c)["stash-confirmation-code-input-container"]]]),
|
|
108
108
|
"data-test": "stash-confirmation-code-input"
|
|
109
109
|
}, [
|
|
110
|
-
|
|
111
|
-
(r(!0), a(
|
|
110
|
+
A("div", S, [
|
|
111
|
+
(r(!0), a(M, null, F(o.digitCount, (n) => (r(), a("input", {
|
|
112
112
|
key: n,
|
|
113
113
|
"data-test": "stash-confirmation-code-input__otp",
|
|
114
|
-
class:
|
|
114
|
+
class: g(["border bg-white p-2 text-center text-base font-medium text-ice-900 focus:border-blue-500", [
|
|
115
115
|
l(c)["otp-code-input"],
|
|
116
116
|
{ [l(c)["has-error"]]: !!o.errorText },
|
|
117
117
|
{ [l(c)["has-success"]]: !!o.successText }
|
|
@@ -122,26 +122,26 @@ const K = { class: "tw-mb-3 tw-flex tw-gap-6" }, S = ["value", "onInput"], U = {
|
|
|
122
122
|
value: s.value[n - 1],
|
|
123
123
|
pattern: "[0-9]",
|
|
124
124
|
autocomplete: "one-time-code",
|
|
125
|
-
onInput: (u) =>
|
|
126
|
-
onKeydown:
|
|
125
|
+
onInput: (u) => T(u, n - 1),
|
|
126
|
+
onKeydown: w,
|
|
127
127
|
onPaste: N,
|
|
128
|
-
onFocus:
|
|
129
|
-
onBlur:
|
|
130
|
-
}, null, 42,
|
|
128
|
+
onFocus: y,
|
|
129
|
+
onBlur: C
|
|
130
|
+
}, null, 42, U))), 128))
|
|
131
131
|
]),
|
|
132
|
-
o.errorText ? (r(), a("small",
|
|
133
|
-
o.successText ? (r(), a("small",
|
|
134
|
-
o.hintText ? (r(), a("small",
|
|
132
|
+
o.errorText ? (r(), a("small", j, f(o.errorText), 1)) : p("", !0),
|
|
133
|
+
o.successText ? (r(), a("small", L, f(o.successText), 1)) : p("", !0),
|
|
134
|
+
o.hintText ? (r(), a("small", z, f(o.hintText), 1)) : p("", !0)
|
|
135
135
|
], 2));
|
|
136
136
|
}
|
|
137
137
|
}), $ = {
|
|
138
|
-
"stash-confirmation-code-input-container": "_stash-confirmation-code-input-
|
|
139
|
-
"otp-code-input": "_otp-code-
|
|
140
|
-
"has-error": "_has-
|
|
141
|
-
"has-success": "_has-
|
|
138
|
+
"stash-confirmation-code-input-container": "_stash-confirmation-code-input-container_r8c1g_3",
|
|
139
|
+
"otp-code-input": "_otp-code-input_r8c1g_10",
|
|
140
|
+
"has-error": "_has-error_r8c1g_17",
|
|
141
|
+
"has-success": "_has-success_r8c1g_21"
|
|
142
142
|
}, q = {
|
|
143
143
|
$style: $
|
|
144
|
-
}, J = /* @__PURE__ */
|
|
144
|
+
}, J = /* @__PURE__ */ K(R, [["__cssModules", q]]);
|
|
145
145
|
export {
|
|
146
146
|
J as default
|
|
147
147
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationCodeInput.js","sources":["../src/components/ConfirmationCodeInput/ConfirmationCodeInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { onMounted, Ref, ref, useCssModule, watch } from 'vue';\n\n const classes = useCssModule();\n\n export interface VerificationCodeInputProps {\n digitCount?: number;\n /**\n * Error text to display.\n */\n errorText?: string;\n /**\n * Success text to display.\n */\n successText?: string;\n /**\n * Hint text to display.\n */\n hintText?: string;\n /**\n * One time password/code\n */\n modelValue?: string;\n }\n\n const props = withDefaults(defineProps<VerificationCodeInputProps>(), {\n digitCount: 6,\n errorText: undefined,\n successText: undefined,\n hintText: undefined,\n modelValue: undefined,\n });\n\n const emit = defineEmits<{\n (e: 'update:model-value', value: string | null): void;\n (e: 'change', params: { originalEvent: Event; value: string | null }): void;\n (e: 'focus', params: Event): void;\n (e: 'blur', params: Event): void;\n }>();\n\n const data: Ref<Array<string>> = ref([]);\n\n onMounted(() => {\n if (props.modelValue) {\n data.value = props.modelValue?.split('');\n }\n });\n\n function handleInput(event: InputEvent, index) {\n data.value[index] = event.target?.['value'];\n updateModel(event);\n\n if (event.inputType === 'deleteContentBackward') {\n moveToPrev(event);\n } else if (event.inputType === 'insertText' || event.inputType === 'deleteContentForward') {\n moveToNext(event);\n }\n }\n\n function updateModel(event: Event) {\n const newValue = data.value.join('');\n emit('update:model-value', newValue);\n emit('change', { originalEvent: event, value: newValue });\n }\n\n function moveToPrev(event: InputEvent | KeyboardEvent) {\n const prevInput: HTMLInputElement = findPrevInput(event.target as HTMLInputElement);\n\n if (prevInput) {\n prevInput.focus();\n prevInput.select();\n }\n }\n\n function moveToNext(event: InputEvent | KeyboardEvent) {\n const nextInput: HTMLInputElement = findNextInput(event.target as HTMLInputElement);\n\n if (nextInput) {\n nextInput.focus();\n nextInput.select();\n }\n }\n\n function findPrevInput(element: HTMLInputElement) {\n const prevElement = element.previousElementSibling;\n\n if (!prevElement) return;\n\n return prevElement.nodeName === 'INPUT' ? prevElement : findPrevInput(prevElement as HTMLInputElement);\n }\n\n function findNextInput(element: HTMLInputElement) {\n const nextElement = element.nextElementSibling;\n\n if (!nextElement) return;\n\n return nextElement.nodeName === 'INPUT' ? nextElement : findNextInput(nextElement as HTMLInputElement);\n }\n\n function handleFocus(event) {\n event.target.select();\n emit('focus', event);\n }\n\n function handleBlur(event: Event) {\n emit('blur', event);\n }\n\n function handleKeyDown(event: KeyboardEvent) {\n if (event.ctrlKey || event.metaKey) {\n return;\n }\n\n switch (event.code) {\n case 'ArrowLeft':\n moveToPrev(event);\n event.preventDefault();\n break;\n\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n\n case 'Backspace':\n if (event.target?.['value'].length === 0) {\n moveToPrev(event);\n event.preventDefault();\n }\n break;\n\n case 'ArrowRight':\n moveToNext(event);\n event.preventDefault();\n\n break;\n\n case 'Enter':\n case 'NumpadEnter':\n case 'Tab':\n break;\n\n default:\n if (\n !(event.code !== 'Space' && Number(event.key) >= 0 && Number(event.key) <= 9) ||\n (data.value.join('').length >= props.digitCount && event.code !== 'Delete')\n ) {\n event.preventDefault();\n }\n\n break;\n }\n }\n\n function handlePaste(event: ClipboardEvent) {\n const paste = event.clipboardData?.getData('text');\n\n if (paste?.length) {\n const pastedCode = paste?.substring(0, props.digitCount);\n\n const parsed = parseInt(pastedCode);\n\n if (!isNaN(parsed)) {\n data.value = pastedCode.split('');\n updateModel(event);\n }\n }\n\n event.preventDefault();\n }\n\n watch(\n () => props.modelValue,\n (newValue) => {\n data.value = newValue ? newValue.split('') : new Array(props.digitCount);\n },\n );\n</script>\n\n<template>\n <div\n class=\"stash-confirmation-code-input
|
|
1
|
+
{"version":3,"file":"ConfirmationCodeInput.js","sources":["../src/components/ConfirmationCodeInput/ConfirmationCodeInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { onMounted, Ref, ref, useCssModule, watch } from 'vue';\n\n const classes = useCssModule();\n\n export interface VerificationCodeInputProps {\n digitCount?: number;\n /**\n * Error text to display.\n */\n errorText?: string;\n /**\n * Success text to display.\n */\n successText?: string;\n /**\n * Hint text to display.\n */\n hintText?: string;\n /**\n * One time password/code\n */\n modelValue?: string;\n }\n\n const props = withDefaults(defineProps<VerificationCodeInputProps>(), {\n digitCount: 6,\n errorText: undefined,\n successText: undefined,\n hintText: undefined,\n modelValue: undefined,\n });\n\n const emit = defineEmits<{\n (e: 'update:model-value', value: string | null): void;\n (e: 'change', params: { originalEvent: Event; value: string | null }): void;\n (e: 'focus', params: Event): void;\n (e: 'blur', params: Event): void;\n }>();\n\n const data: Ref<Array<string>> = ref([]);\n\n onMounted(() => {\n if (props.modelValue) {\n data.value = props.modelValue?.split('');\n }\n });\n\n function handleInput(event: InputEvent, index) {\n data.value[index] = event.target?.['value'];\n updateModel(event);\n\n if (event.inputType === 'deleteContentBackward') {\n moveToPrev(event);\n } else if (event.inputType === 'insertText' || event.inputType === 'deleteContentForward') {\n moveToNext(event);\n }\n }\n\n function updateModel(event: Event) {\n const newValue = data.value.join('');\n emit('update:model-value', newValue);\n emit('change', { originalEvent: event, value: newValue });\n }\n\n function moveToPrev(event: InputEvent | KeyboardEvent) {\n const prevInput: HTMLInputElement = findPrevInput(event.target as HTMLInputElement);\n\n if (prevInput) {\n prevInput.focus();\n prevInput.select();\n }\n }\n\n function moveToNext(event: InputEvent | KeyboardEvent) {\n const nextInput: HTMLInputElement = findNextInput(event.target as HTMLInputElement);\n\n if (nextInput) {\n nextInput.focus();\n nextInput.select();\n }\n }\n\n function findPrevInput(element: HTMLInputElement) {\n const prevElement = element.previousElementSibling;\n\n if (!prevElement) return;\n\n return prevElement.nodeName === 'INPUT' ? prevElement : findPrevInput(prevElement as HTMLInputElement);\n }\n\n function findNextInput(element: HTMLInputElement) {\n const nextElement = element.nextElementSibling;\n\n if (!nextElement) return;\n\n return nextElement.nodeName === 'INPUT' ? nextElement : findNextInput(nextElement as HTMLInputElement);\n }\n\n function handleFocus(event) {\n event.target.select();\n emit('focus', event);\n }\n\n function handleBlur(event: Event) {\n emit('blur', event);\n }\n\n function handleKeyDown(event: KeyboardEvent) {\n if (event.ctrlKey || event.metaKey) {\n return;\n }\n\n switch (event.code) {\n case 'ArrowLeft':\n moveToPrev(event);\n event.preventDefault();\n break;\n\n case 'ArrowUp':\n case 'ArrowDown':\n event.preventDefault();\n break;\n\n case 'Backspace':\n if (event.target?.['value'].length === 0) {\n moveToPrev(event);\n event.preventDefault();\n }\n break;\n\n case 'ArrowRight':\n moveToNext(event);\n event.preventDefault();\n\n break;\n\n case 'Enter':\n case 'NumpadEnter':\n case 'Tab':\n break;\n\n default:\n if (\n !(event.code !== 'Space' && Number(event.key) >= 0 && Number(event.key) <= 9) ||\n (data.value.join('').length >= props.digitCount && event.code !== 'Delete')\n ) {\n event.preventDefault();\n }\n\n break;\n }\n }\n\n function handlePaste(event: ClipboardEvent) {\n const paste = event.clipboardData?.getData('text');\n\n if (paste?.length) {\n const pastedCode = paste?.substring(0, props.digitCount);\n\n const parsed = parseInt(pastedCode);\n\n if (!isNaN(parsed)) {\n data.value = pastedCode.split('');\n updateModel(event);\n }\n }\n\n event.preventDefault();\n }\n\n watch(\n () => props.modelValue,\n (newValue) => {\n data.value = newValue ? newValue.split('') : new Array(props.digitCount);\n },\n );\n</script>\n\n<template>\n <div\n class=\"stash-confirmation-code-input inline-block\"\n data-test=\"stash-confirmation-code-input\"\n :class=\"[classes['stash-confirmation-code-input-container']]\"\n >\n <div class=\"mb-3 flex gap-6\">\n <template v-for=\"field in props.digitCount\" :key=\"field\">\n <input\n data-test=\"stash-confirmation-code-input__otp\"\n class=\"border bg-white p-2 text-center text-base font-medium text-ice-900 focus:border-blue-500\"\n :class=\"[\n classes['otp-code-input'],\n { [classes['has-error']]: !!props.errorText },\n { [classes['has-success']]: !!props.successText },\n ]\"\n type=\"text\"\n inputmode=\"numeric\"\n maxlength=\"1\"\n :value=\"data[field - 1]\"\n pattern=\"[0-9]\"\n autocomplete=\"one-time-code\"\n @input=\"handleInput($event as InputEvent, field - 1)\"\n @keydown=\"handleKeyDown\"\n @paste=\"handlePaste\"\n @focus=\"handleFocus\"\n @blur=\"handleBlur\"\n />\n </template>\n </div>\n <small\n v-if=\"props.errorText\"\n class=\"mt-1 block whitespace-pre-line pr-6 text-center text-red-500\"\n data-test=\"field-error\"\n >\n {{ props.errorText }}\n </small>\n <small\n v-if=\"props.successText\"\n class=\"mt-1 block whitespace-pre-line pr-6 text-center text-green-500\"\n data-test=\"field-success\"\n >\n {{ props.successText }}\n </small>\n <small\n v-if=\"props.hintText\"\n class=\"mt-1 block whitespace-pre-line pr-6 text-center text-ice-700\"\n data-test=\"field-hint\"\n >\n {{ props.hintText }}\n </small>\n </div>\n</template>\n\n<style module>\n @layer utilities {\n .stash-confirmation-code-input-container {\n --otp-digits: v-bind(digitCount);\n --otp-container-width: calc(var(--otp-digits) * 60px);\n\n width: var(--otp-container-width);\n }\n\n .otp-code-input {\n border-radius: 4px;\n caret-color: transparent;\n height: 36px;\n width: 36px;\n }\n\n .otp-code-input.has-error:not(:focus) {\n border-color: var(--color-red-500);\n }\n\n .otp-code-input.has-success:not(:focus) {\n border-color: var(--color-green-500);\n }\n\n .otp-code-input:focus {\n box-shadow: 0 0 0 3px rgb(0 114 240 / 15%);\n outline: none;\n }\n }\n</style>\n"],"names":["classes","useCssModule","props","__props","emit","__emit","data","ref","onMounted","_a","handleInput","event","index","updateModel","moveToPrev","moveToNext","newValue","prevInput","findPrevInput","nextInput","findNextInput","element","prevElement","nextElement","handleFocus","handleBlur","handleKeyDown","handlePaste","paste","pastedCode","parsed","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGE,UAAMA,IAAUC,EAAA,GAsBVC,IAAQC,GAQRC,IAAOC,GAOPC,IAA2BC,EAAI,EAAE;AAEvC,IAAAC,EAAU,MAAM;;AACd,MAAIN,EAAM,eACRI,EAAK,SAAQG,IAAAP,EAAM,eAAN,gBAAAO,EAAkB,MAAM;AAAA,IAEzC,CAAC;AAED,aAASC,EAAYC,GAAmBC,GAAO;;AAC7C,MAAAN,EAAK,MAAMM,CAAK,KAAIH,IAAAE,EAAM,WAAN,gBAAAF,EAAe,OACnCI,EAAYF,CAAK,GAEbA,EAAM,cAAc,0BACtBG,EAAWH,CAAK,KACPA,EAAM,cAAc,gBAAgBA,EAAM,cAAc,2BACjEI,EAAWJ,CAAK;AAAA,IAEpB;AAEA,aAASE,EAAYF,GAAc;AACjC,YAAMK,IAAWV,EAAK,MAAM,KAAK,EAAE;AACnC,MAAAF,EAAK,sBAAsBY,CAAQ,GACnCZ,EAAK,UAAU,EAAE,eAAeO,GAAO,OAAOK,GAAU;AAAA,IAC1D;AAEA,aAASF,EAAWH,GAAmC;AACrD,YAAMM,IAA8BC,EAAcP,EAAM,MAA0B;AAElF,MAAIM,MACFA,EAAU,MAAA,GACVA,EAAU,OAAA;AAAA,IAEd;AAEA,aAASF,EAAWJ,GAAmC;AACrD,YAAMQ,IAA8BC,EAAcT,EAAM,MAA0B;AAElF,MAAIQ,MACFA,EAAU,MAAA,GACVA,EAAU,OAAA;AAAA,IAEd;AAEA,aAASD,EAAcG,GAA2B;AAChD,YAAMC,IAAcD,EAAQ;AAE5B,UAAKC;AAEL,eAAOA,EAAY,aAAa,UAAUA,IAAcJ,EAAcI,CAA+B;AAAA,IACvG;AAEA,aAASF,EAAcC,GAA2B;AAChD,YAAME,IAAcF,EAAQ;AAE5B,UAAKE;AAEL,eAAOA,EAAY,aAAa,UAAUA,IAAcH,EAAcG,CAA+B;AAAA,IACvG;AAEA,aAASC,EAAYb,GAAO;AAC1B,MAAAA,EAAM,OAAO,OAAA,GACbP,EAAK,SAASO,CAAK;AAAA,IACrB;AAEA,aAASc,EAAWd,GAAc;AAChC,MAAAP,EAAK,QAAQO,CAAK;AAAA,IACpB;AAEA,aAASe,EAAcf,GAAsB;;AAC3C,UAAI,EAAAA,EAAM,WAAWA,EAAM;AAI3B,gBAAQA,EAAM,MAAA;AAAA,UACZ,KAAK;AACH,YAAAG,EAAWH,CAAK,GAChBA,EAAM,eAAA;AACN;AAAA,UAEF,KAAK;AAAA,UACL,KAAK;AACH,YAAAA,EAAM,eAAA;AACN;AAAA,UAEF,KAAK;AACH,cAAIF,IAAAE,EAAM,WAAN,gBAAAF,EAAe,MAAS,YAAW,MACrCK,EAAWH,CAAK,GAChBA,EAAM,eAAA;AAER;AAAA,UAEF,KAAK;AACH,YAAAI,EAAWJ,CAAK,GAChBA,EAAM,eAAA;AAEN;AAAA,UAEF,KAAK;AAAA,UACL,KAAK;AAAA,UACL,KAAK;AACH;AAAA,UAEF;AACE,aACE,EAAEA,EAAM,SAAS,WAAW,OAAOA,EAAM,GAAG,KAAK,KAAK,OAAOA,EAAM,GAAG,KAAK,MAC1EL,EAAK,MAAM,KAAK,EAAE,EAAE,UAAUJ,EAAM,cAAcS,EAAM,SAAS,aAElEA,EAAM,eAAA;AAGR;AAAA,QAAA;AAAA,IAEN;AAEA,aAASgB,EAAYhB,GAAuB;;AAC1C,YAAMiB,KAAQnB,IAAAE,EAAM,kBAAN,gBAAAF,EAAqB,QAAQ;AAE3C,UAAImB,KAAA,QAAAA,EAAO,QAAQ;AACjB,cAAMC,IAAaD,KAAA,gBAAAA,EAAO,UAAU,GAAG1B,EAAM,aAEvC4B,IAAS,SAASD,CAAU;AAElC,QAAK,MAAMC,CAAM,MACfxB,EAAK,QAAQuB,EAAW,MAAM,EAAE,GAChChB,EAAYF,CAAK;AAAA,MAErB;AAEA,MAAAA,EAAM,eAAA;AAAA,IACR;AAEA,WAAAoB;AAAA,MACE,MAAM7B,EAAM;AAAA,MACZ,CAACc,MAAa;AACZ,QAAAV,EAAK,QAAQU,IAAWA,EAAS,MAAM,EAAE,IAAI,IAAI,MAAMd,EAAM,UAAU;AAAA,MACzE;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|