@leaflink/stash 48.16.0 → 48.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/illustrations/FileUpload/csv.svg +1 -1
- package/assets/illustrations/FileUpload/document.svg +1 -17
- package/assets/illustrations/FileUpload/image.svg +1 -1
- package/assets/illustrations/FileUpload/pdf.svg +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/Accordion.js.map +1 -1
- package/dist/Accordion.vue.d.ts +8 -9
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/ActionsDropdown.vue.d.ts +7 -8
- package/dist/AddressSelect.js +42 -38
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +10 -11
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.vue.d.ts +6 -7
- package/dist/AppNavigationItem.js +2 -2
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppNavigationItem.vue.d.ts +7 -8
- package/dist/AppSidebar.js +42 -42
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppSidebar.vue.d.ts +8 -9
- package/dist/AppTopbar.js +16 -16
- package/dist/AppTopbar.js.map +1 -1
- package/dist/AppTopbar.vue.d.ts +8 -9
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +7 -8
- package/dist/Backdrop.vue.d.ts +3 -5
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +7 -8
- package/dist/Box.vue.d.ts +6 -7
- package/dist/Box.vue_vue_type_script_setup_true_lang-69e5176b.js.map +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue.d.ts +7 -8
- package/dist/ButtonGroup.js +29 -29
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/ButtonGroup.vue.d.ts +8 -9
- package/dist/Card.js.map +1 -1
- package/dist/Card.vue.d.ts +6 -7
- package/dist/CardContent.vue.d.ts +3 -5
- package/dist/CardFooter.vue.d.ts +3 -5
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardHeader.vue.d.ts +3 -4
- package/dist/CardMedia.js +6 -6
- package/dist/CardMedia.js.map +1 -1
- package/dist/CardMedia.vue.d.ts +3 -4
- package/dist/Carousel.js +249 -249
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +9 -9
- package/dist/Checkbox.js +27 -27
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +11 -12
- package/dist/ChevronToggle.js +1 -1
- package/dist/ChevronToggle.vue.d.ts +8 -9
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js} +11 -11
- package/dist/{ChevronToggle.vue_vue_type_script_setup_true_lang-1591294c.js.map → ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map} +1 -1
- package/dist/Chip.js +30 -30
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +9 -10
- package/dist/ConfirmationCodeInput.js +25 -25
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +8 -9
- package/dist/ContextSwitcher.js +18 -18
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/ContextSwitcher.vue.d.ts +9 -10
- package/dist/Copy.js.map +1 -1
- package/dist/Copy.vue.d.ts +6 -7
- package/dist/CurrencyInput.js +93 -93
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +10 -11
- package/dist/CustomRender.vue.d.ts +3 -15
- package/dist/DataView.js +97 -97
- package/dist/DataView.js.map +1 -1
- package/dist/DataView.vue.d.ts +9 -10
- package/dist/DataViewFilters.js +153 -150
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewFilters.vue.d.ts +9 -10
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewSortButton.vue.d.ts +6 -7
- package/dist/DataViewToolbar.js +27 -27
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +8 -9
- package/dist/DatePicker.js +738 -738
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +11 -12
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionList.vue.d.ts +6 -7
- package/dist/DescriptionListDetail.vue.d.ts +3 -5
- package/dist/DescriptionListGroup.vue.d.ts +3 -5
- package/dist/DescriptionListTerm.vue.d.ts +3 -5
- package/dist/Dialog.js +44 -44
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.vue.d.ts +10 -11
- package/dist/Divider.vue.d.ts +3 -5
- package/dist/Dropdown.js +38 -38
- package/dist/Dropdown.js.map +1 -1
- package/dist/Dropdown.vue.d.ts +9 -10
- package/dist/EmptyState.js +20 -20
- package/dist/EmptyState.js.map +1 -1
- package/dist/EmptyState.vue.d.ts +6 -7
- package/dist/Expand.js +1 -1
- package/dist/Expand.vue.d.ts +8 -9
- package/dist/{Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js → Expand.vue_vue_type_script_setup_true_lang-0f236267.js} +19 -19
- package/dist/Expand.vue_vue_type_script_setup_true_lang-0f236267.js.map +1 -0
- package/dist/Field.vue.d.ts +6 -7
- package/dist/Field.vue_vue_type_script_setup_true_lang-e1e4ff03.js.map +1 -1
- package/dist/FileUpload.js +65 -65
- package/dist/FileUpload.js.map +1 -1
- package/dist/FileUpload.vue.d.ts +10 -11
- package/dist/FilterChip.js +27 -27
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterChip.vue.d.ts +8 -9
- package/dist/FilterDrawerItem.js +26 -26
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDrawerItem.vue.d.ts +5 -6
- package/dist/FilterDropdown.js +49 -49
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterDropdown.vue.d.ts +8 -9
- package/dist/FilterSelect.js +23 -23
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +8 -9
- package/dist/Filters.js +112 -104
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +2204 -65
- package/dist/HttpError.js +42 -42
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +6 -7
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +7 -8
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +8 -9
- package/dist/Illustration.vue.d.ts +6 -7
- package/dist/Illustration.vue_vue_type_script_setup_true_lang-e26c3841.js.map +1 -1
- package/dist/Image.js +47 -47
- package/dist/Image.js.map +1 -1
- package/dist/Image.vue.d.ts +6 -7
- package/dist/InlineEdit.js +34 -34
- package/dist/InlineEdit.js.map +1 -1
- package/dist/InlineEdit.vue.d.ts +9 -10
- package/dist/Input.js +35 -35
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +13 -14
- package/dist/InputOptions.js +33 -33
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +8 -9
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/IntegrationIcon.vue.d.ts +7 -8
- package/dist/Label.vue.d.ts +6 -7
- package/dist/Label.vue_vue_type_script_setup_true_lang-4b02087f.js.map +1 -1
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +6 -7
- package/dist/ListItem.vue.d.ts +225 -95
- package/dist/ListItemCell.vue.d.ts +4 -16
- package/dist/ListView.js +1 -1
- package/dist/ListView.vue.d.ts +5072 -470
- package/dist/Loading.js +16 -16
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue.d.ts +3 -5
- package/dist/Logo.js +1 -1
- package/dist/Logo.vue.d.ts +9 -10
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js +196 -0
- package/dist/Logo.vue_vue_type_script_setup_true_lang-2a2597cb.js.map +1 -0
- package/dist/Menu.vue.d.ts +3 -5
- package/dist/MenuItem.vue.d.ts +3 -5
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +6 -7
- package/dist/Modal.js +29 -29
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.vue.d.ts +8 -9
- package/dist/Modals.js +8 -7
- package/dist/Modals.js.map +1 -1
- package/dist/Modals.vue.d.ts +3 -5
- package/dist/Module.js.map +1 -1
- package/dist/Module.vue.d.ts +7 -8
- package/dist/ModuleContent.vue.d.ts +3 -5
- package/dist/ModuleFooter.vue.d.ts +3 -5
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/ModuleHeader.vue.d.ts +6 -7
- package/dist/ObfuscateText.js +1 -1
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +6 -7
- package/dist/PageContent.vue.d.ts +3 -5
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageHeader.vue.d.ts +6 -7
- package/dist/PageNavigation.js +30 -27
- package/dist/PageNavigation.js.map +1 -1
- package/dist/PageNavigation.vue.d.ts +8 -9
- package/dist/Paginate.js +32 -32
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue.d.ts +8 -9
- package/dist/PlaidLink.js +29 -29
- package/dist/PlaidLink.js.map +1 -1
- package/dist/PlaidLink.vue.d.ts +11 -12
- package/dist/QuickAction.js.map +1 -1
- package/dist/QuickAction.vue.d.ts +4 -5
- package/dist/Radio.vue.d.ts +20 -1
- package/dist/RadioGroup.js +123 -123
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +10 -11
- package/dist/RadioNew.js +102 -102
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +10 -11
- package/dist/RangeInput.vue.d.ts +3 -5
- package/dist/SearchBar.js +36 -36
- package/dist/SearchBar.js.map +1 -1
- package/dist/SearchBar.vue.d.ts +9 -10
- package/dist/Select.js +792 -774
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +14 -15
- package/dist/SelectStatus.js +27 -27
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +12 -13
- package/dist/Skeleton.js.map +1 -1
- package/dist/Skeleton.vue.d.ts +7 -8
- package/dist/Step.js.map +1 -1
- package/dist/Step.vue.d.ts +7 -8
- package/dist/Stepper.js +19 -19
- package/dist/Stepper.js.map +1 -1
- package/dist/Stepper.vue.d.ts +9 -10
- package/dist/Switch.js +25 -25
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.vue.d.ts +11 -12
- package/dist/Tab.js +2 -2
- package/dist/Tab.vue.d.ts +3 -4
- package/dist/{Tab.vue_vue_type_script_setup_true_lang-69d1b046.js → Tab.vue_vue_type_script_setup_true_lang-9aa53203.js} +5 -3
- package/dist/Tab.vue_vue_type_script_setup_true_lang-9aa53203.js.map +1 -0
- package/dist/Table.js +3 -3
- package/dist/Table.js.map +1 -1
- package/dist/{Table.keys-cf93df19.js → Table.keys-83e4f09b.js} +11 -11
- package/dist/{Table.keys-cf93df19.js.map → Table.keys-83e4f09b.js.map} +1 -1
- package/dist/Table.vue.d.ts +6 -7
- package/dist/TableCell.js +1 -1
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCell.vue.d.ts +6 -7
- package/dist/TableHeaderCell.js +12 -12
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +6 -7
- package/dist/TableHeaderRow.js +21 -21
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRow.vue.d.ts +8 -9
- package/dist/TableRow.js +42 -42
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +8 -9
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue.d.ts +8 -9
- package/dist/{Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js → Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js} +37 -37
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-3aa36673.js.map +1 -0
- package/dist/TextEditor.js +565 -565
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +12 -13
- package/dist/Textarea.js +28 -28
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +10 -11
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +6 -7
- package/dist/TimelineItem.js +21 -21
- package/dist/TimelineItem.js.map +1 -1
- package/dist/TimelineItem.vue.d.ts +13 -6
- package/dist/Toast.js +134 -134
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +6 -7
- package/dist/Toasts.vue.d.ts +3 -5
- package/dist/components.css +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/usePlaidLink.d.ts +1 -6
- package/dist/useScriptTag.d.ts +3 -8
- package/dist/useStepper.d.ts +7 -2
- package/package.json +1 -1
- package/tailwind-base.ts +13 -6
- package/dist/Expand.vue_vue_type_script_setup_true_lang-1751f4a6.js.map +0 -1
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js +0 -196
- package/dist/Logo.vue_vue_type_script_setup_true_lang-d7da48a0.js.map +0 -1
- package/dist/Tab.vue_vue_type_script_setup_true_lang-69d1b046.js.map +0 -1
- package/dist/Tabs.vue_used_vue_type_style_index_0_lang.module-2a131332.js.map +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as a, computed as i, openBlock as s, createBlock as l, withCtx as m, createVNode as p } from "vue";
|
|
2
|
+
import d from "./Button.js";
|
|
3
|
+
import u from "./Icon.js";
|
|
4
|
+
const k = /* @__PURE__ */ a({
|
|
5
5
|
__name: "ChevronToggle",
|
|
6
6
|
props: {
|
|
7
7
|
direction: { default: "down" }
|
|
8
8
|
},
|
|
9
9
|
emits: ["click"],
|
|
10
10
|
setup(o, { emit: n }) {
|
|
11
|
-
const c = o, t =
|
|
12
|
-
return (
|
|
11
|
+
const c = o, r = n, t = i(() => `chevron-${c.direction}`);
|
|
12
|
+
return (f, e) => (s(), l(d, {
|
|
13
13
|
class: "stash-chevron-toggle",
|
|
14
14
|
icon: "",
|
|
15
15
|
"data-test": "stash-chevron-toggle",
|
|
16
|
-
onClick: e[0] || (e[0] = (
|
|
16
|
+
onClick: e[0] || (e[0] = (v) => r("click"))
|
|
17
17
|
}, {
|
|
18
|
-
default:
|
|
19
|
-
|
|
18
|
+
default: m(() => [
|
|
19
|
+
p(u, {
|
|
20
20
|
name: t.value,
|
|
21
21
|
"data-test": `icon|${t.value}`
|
|
22
22
|
}, null, 8, ["name", "data-test"])
|
|
@@ -26,6 +26,6 @@ const _ = /* @__PURE__ */ r({
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
export {
|
|
29
|
-
_
|
|
29
|
+
k as _
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=ChevronToggle.vue_vue_type_script_setup_true_lang-
|
|
31
|
+
//# sourceMappingURL=ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChevronToggle.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
{"version":3,"file":"ChevronToggle.vue_vue_type_script_setup_true_lang-fcdf0c19.js","sources":["../src/components/ChevronToggle/ChevronToggle.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n\n import Button from '../Button/Button.vue';\n import { IconName } from '../Icon/Icon.types';\n import Icon from '../Icon/Icon.vue';\n\n enum ChevronToggleDirections {\n Up = 'up',\n Down = 'down',\n Left = 'left',\n Right = 'right',\n }\n\n export type ChevronToggleDirection = `${ChevronToggleDirections}`;\n\n export interface ChevronToggleProps {\n direction?: ChevronToggleDirection;\n }\n\n const props = withDefaults(defineProps<ChevronToggleProps>(), {\n direction: 'down',\n });\n\n const emit = defineEmits<{ (e: 'click'): void }>();\n\n const icon = computed<IconName>(() => `chevron-${props.direction}`);\n</script>\n\n<template>\n <Button class=\"stash-chevron-toggle\" icon data-test=\"stash-chevron-toggle\" @click=\"emit('click')\">\n <Icon :name=\"icon\" :data-test=\"`icon|${icon}`\" />\n </Button>\n</template>\n"],"names":["props","__props","emit","__emit","icon","computed"],"mappings":";;;;;;;;;;AAoBE,UAAMA,IAAQC,GAIRC,IAAOC,GAEPC,IAAOC,EAAmB,MAAM,WAAWL,EAAM,WAAW;;;;;;;;;;;;;;;;;"}
|
package/dist/Chip.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { _ as
|
|
1
|
+
import { defineComponent as f, useCssModule as b, openBlock as a, createElementBlock as d, normalizeClass as n, unref as i, renderSlot as m, withKeys as v, withModifiers as u, createVNode as _, createCommentVNode as w } from "vue";
|
|
2
|
+
import C from "./utils/colorScheme.js";
|
|
3
|
+
import y from "./Icon.js";
|
|
4
|
+
import { _ as $ } from "./_plugin-vue_export-helper-dad06003.js";
|
|
5
5
|
import "lodash-es/uniqueId";
|
|
6
6
|
import "./index-9e1095ef.js";
|
|
7
7
|
import "./Icon.vue_used_vue_type_style_index_0_lang.module-eb359559.js";
|
|
8
|
-
const
|
|
8
|
+
const z = ["disabled"], k = /* @__PURE__ */ f({
|
|
9
9
|
name: "ll-chip",
|
|
10
10
|
__name: "Chip",
|
|
11
11
|
props: {
|
|
@@ -20,10 +20,10 @@ const $ = ["disabled"], z = /* @__PURE__ */ h({
|
|
|
20
20
|
disabled: { type: Boolean, default: !1 }
|
|
21
21
|
},
|
|
22
22
|
emits: ["click", "remove"],
|
|
23
|
-
setup(c, { emit:
|
|
24
|
-
const e = c, s =
|
|
25
|
-
function
|
|
26
|
-
const { computedBgColor: o, computedTextColor: t } =
|
|
23
|
+
setup(c, { emit: p }) {
|
|
24
|
+
const e = c, r = p, s = b();
|
|
25
|
+
function h() {
|
|
26
|
+
const { computedBgColor: o, computedTextColor: t } = C({
|
|
27
27
|
shade: e.shade,
|
|
28
28
|
color: e.colorScheme
|
|
29
29
|
}), l = `tw-text-${e.textColor || t} tw-bg-${e.bgColor || o}`;
|
|
@@ -35,51 +35,51 @@ const $ = ["disabled"], z = /* @__PURE__ */ h({
|
|
|
35
35
|
"tw-bg-ice-500 tw-text-white": e.disabled
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
return (o, t) => (
|
|
38
|
+
return (o, t) => (a(), d("span", {
|
|
39
39
|
class: n(["stash-chip tw-relative tw-inline-flex tw-items-center", [
|
|
40
40
|
`stash-chip--radius-${e.radius}`,
|
|
41
41
|
`stash-chip--size-${e.size}`,
|
|
42
42
|
`stash-chip--shade-${e.shade}`,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
i(s).root,
|
|
44
|
+
i(s).removableChip,
|
|
45
|
+
i(s)[`size-${e.size}`],
|
|
46
|
+
h()
|
|
47
47
|
]]),
|
|
48
48
|
"data-test": "stash-chip",
|
|
49
|
-
onClick: t[2] || (t[2] = (l) =>
|
|
49
|
+
onClick: t[2] || (t[2] = (l) => r("click"))
|
|
50
50
|
}, [
|
|
51
|
-
o.isRemovable ? (
|
|
51
|
+
o.isRemovable ? (a(), d("span", {
|
|
52
52
|
key: 0,
|
|
53
53
|
class: n([{ "tw-mr-6 tw-truncate": e.isRemovable }])
|
|
54
54
|
}, [
|
|
55
|
-
|
|
56
|
-
], 2)) :
|
|
57
|
-
e.isRemovable ? (
|
|
55
|
+
m(o.$slots, "default")
|
|
56
|
+
], 2)) : m(o.$slots, "default", { key: 1 }),
|
|
57
|
+
e.isRemovable ? (a(), d("button", {
|
|
58
58
|
key: 2,
|
|
59
59
|
tabindex: "-1",
|
|
60
|
-
class: n(["stash-chip__remove-button", ["tw-absolute",
|
|
60
|
+
class: n(["stash-chip__remove-button", ["tw-absolute", i(s)["remove-button"]]]),
|
|
61
61
|
"data-test": "stash-chip|remove-button",
|
|
62
62
|
disabled: e.disabled,
|
|
63
|
-
onKeypress: t[0] || (t[0] =
|
|
64
|
-
onMousedown: t[1] || (t[1] =
|
|
63
|
+
onKeypress: t[0] || (t[0] = v(u((l) => r("remove"), ["prevent"]), ["enter"])),
|
|
64
|
+
onMousedown: t[1] || (t[1] = u((l) => r("remove"), ["prevent", "stop"]))
|
|
65
65
|
}, [
|
|
66
|
-
|
|
66
|
+
_(y, {
|
|
67
67
|
"data-test": "icon|close",
|
|
68
68
|
name: "close",
|
|
69
69
|
size: "small"
|
|
70
70
|
})
|
|
71
|
-
], 42,
|
|
71
|
+
], 42, z)) : w("", !0)
|
|
72
72
|
], 2));
|
|
73
73
|
}
|
|
74
|
-
}),
|
|
75
|
-
root:
|
|
74
|
+
}), x = "_root_1u8h2_2", g = {
|
|
75
|
+
root: x,
|
|
76
76
|
"size-medium": "_size-medium_1u8h2_12",
|
|
77
77
|
"size-small": "_size-small_1u8h2_17",
|
|
78
78
|
"remove-button": "_remove-button_1u8h2_22"
|
|
79
|
-
},
|
|
80
|
-
$style:
|
|
81
|
-
},
|
|
79
|
+
}, B = {
|
|
80
|
+
$style: g
|
|
81
|
+
}, E = /* @__PURE__ */ $(k, [["__cssModules", B]]);
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
E as default
|
|
84
84
|
};
|
|
85
85
|
//# 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
|
|
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 = `tw-text-${props.textColor || computedTextColor} tw-bg-${props.bgColor || computedBgColor}`;\n\n return {\n 'tw-rounded-none': props.radius === 'none',\n 'tw-rounded-sm': props.radius === 'standard',\n 'tw-rounded-full': props.radius === 'pill',\n [colorStyles]: !props.shouldOverrideColors && !props.disabled,\n 'tw-bg-ice-500 tw-text-white': props.disabled,\n };\n }\n</script>\n\n<template>\n <span\n class=\"stash-chip tw-relative tw-inline-flex tw-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=\"[{ 'tw-mr-6 tw-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=\"['tw-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 .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 tw-leading-none tw-font-semibold tw-uppercase tw-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</style>\n"],"names":["props","__props","emit","__emit","classes","useCssModule","determineConditionalStyles","computedBgColor","computedTextColor","colorSchemeUtil","colorStyles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6DE,UAAMA,IAAQC,GAYRC,IAAOC,GAWPC,IAAUC;AAEhB,aAASC,IAA6B;AACpC,YAAM,EAAE,iBAAAC,GAAiB,mBAAAC,EAAkB,IAAIC,EAAgB;AAAA,QAC7D,OAAOT,EAAM;AAAA,QACb,OAAOA,EAAM;AAAA,MAAA,CACd,GAEKU,IAAc,WAAWV,EAAM,aAAaQ,WAA2BR,EAAM,WAAWO;AAEvF,aAAA;AAAA,QACL,mBAAmBP,EAAM,WAAW;AAAA,QACpC,iBAAiBA,EAAM,WAAW;AAAA,QAClC,mBAAmBA,EAAM,WAAW;AAAA,QACpC,CAACU,CAAW,GAAG,CAACV,EAAM,wBAAwB,CAACA,EAAM;AAAA,QACrD,+BAA+BA,EAAM;AAAA,MAAA;AAAA,IAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Chip.vue.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import { PropType } from 'vue';
|
|
7
|
-
import {
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
8
7
|
|
|
9
8
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
9
|
|
|
@@ -75,7 +74,7 @@ export declare interface ChipProps {
|
|
|
75
74
|
disabled?: boolean;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChipProps>, {
|
|
77
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChipProps>, {
|
|
79
78
|
size: string;
|
|
80
79
|
radius: string;
|
|
81
80
|
colorScheme: string;
|
|
@@ -85,10 +84,10 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
85
84
|
isRemovable: boolean;
|
|
86
85
|
shouldOverrideColors: boolean;
|
|
87
86
|
disabled: boolean;
|
|
88
|
-
}
|
|
87
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
89
88
|
click: () => void;
|
|
90
89
|
remove: () => void;
|
|
91
|
-
}, string,
|
|
90
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChipProps>, {
|
|
92
91
|
size: string;
|
|
93
92
|
radius: string;
|
|
94
93
|
colorScheme: string;
|
|
@@ -98,12 +97,12 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
98
97
|
isRemovable: boolean;
|
|
99
98
|
shouldOverrideColors: boolean;
|
|
100
99
|
disabled: boolean;
|
|
101
|
-
}>>> & {
|
|
100
|
+
}>>> & Readonly<{
|
|
102
101
|
onClick?: (() => any) | undefined;
|
|
103
102
|
onRemove?: (() => any) | undefined;
|
|
104
|
-
}
|
|
105
|
-
size: "small" | "medium";
|
|
103
|
+
}>, {
|
|
106
104
|
disabled: boolean;
|
|
105
|
+
size: "small" | "medium";
|
|
107
106
|
shade: "main" | "light";
|
|
108
107
|
colorScheme: StashPrimaryColorGroup;
|
|
109
108
|
radius: "standard" | "none" | "pill";
|
|
@@ -111,7 +110,7 @@ declare const _default: __VLS_WithTemplateSlots<DefineComponent<__VLS_WithDefaul
|
|
|
111
110
|
textColor: "ice-700" | "purple-700" | "purple-500" | "purple-100" | "royal-700" | "royal-500" | "royal-100" | "blue-700" | "blue-500" | "blue-100" | "teal-700" | "teal-500" | "teal-100" | "green-700" | "green-500" | "green-100" | "seafoam-700" | "seafoam-500" | "seafoam-100" | "yellow-700" | "yellow-500" | "yellow-100" | "orange-700" | "orange-500" | "orange-100" | "red-700" | "red-500" | "red-100" | "ice-500" | "ice-200" | "ice-100" | "white" | "black";
|
|
112
111
|
isRemovable: boolean;
|
|
113
112
|
shouldOverrideColors: boolean;
|
|
114
|
-
}, {}>, {
|
|
113
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, {
|
|
115
114
|
default?(_: {}): any;
|
|
116
115
|
}>;
|
|
117
116
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as C, useCssModule as y, ref as m, watch as E, openBlock as c, createElementBlock as i, createElementVNode as I, Fragment as N, renderList as T, withDirectives as D, normalizeClass as p, unref as f, vModelText as S, toDisplayString as v, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { _ as z } from "./_plugin-vue_export-helper-dad06003.js";
|
|
3
|
+
const q = { class: "tw-mb-3 tw-flex tw-gap-6" }, B = ["onUpdate:modelValue", "onPaste", "onKeyup", "onClick"], M = /* @__PURE__ */ C({
|
|
4
4
|
__name: "ConfirmationCodeInput",
|
|
5
5
|
props: {
|
|
6
6
|
digitCount: { default: 6 },
|
|
@@ -8,12 +8,12 @@ const z = { class: "tw-mb-3 tw-flex tw-gap-6" }, q = ["onUpdate:modelValue", "on
|
|
|
8
8
|
successText: { default: void 0 }
|
|
9
9
|
},
|
|
10
10
|
emits: ["update:model-value"],
|
|
11
|
-
setup(x, { emit:
|
|
12
|
-
const a = x,
|
|
13
|
-
function
|
|
11
|
+
setup(x, { emit: g }) {
|
|
12
|
+
const l = y(), a = x, d = g, s = m([]), n = m();
|
|
13
|
+
function h(e) {
|
|
14
14
|
e.data && e.target.nextElementSibling ? e.target.nextElementSibling.focus() : e.data == null && e.target.previousElementSibling && e.target.previousElementSibling.focus();
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function w(e, o) {
|
|
17
17
|
if (e.preventDefault(), s.value[o]) {
|
|
18
18
|
n.value[o].focus();
|
|
19
19
|
return;
|
|
@@ -23,7 +23,7 @@ const z = { class: "tw-mb-3 tw-flex tw-gap-6" }, q = ["onUpdate:modelValue", "on
|
|
|
23
23
|
u && (t = r + 1);
|
|
24
24
|
}), n.value[t].focus();
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function b(e, o) {
|
|
27
27
|
if (e.key !== "Backspace" && !new RegExp("^([0-9])$").test(e.key)) {
|
|
28
28
|
e.preventDefault();
|
|
29
29
|
return;
|
|
@@ -44,7 +44,7 @@ const z = { class: "tw-mb-3 tw-flex tw-gap-6" }, q = ["onUpdate:modelValue", "on
|
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function k(e) {
|
|
48
48
|
var u;
|
|
49
49
|
const o = (u = e.clipboardData) == null ? void 0 : u.getData("text");
|
|
50
50
|
if (isNaN(Number(o))) {
|
|
@@ -56,7 +56,7 @@ const z = { class: "tw-mb-3 tw-flex tw-gap-6" }, q = ["onUpdate:modelValue", "on
|
|
|
56
56
|
for (let r = 1; r < o.length; r++)
|
|
57
57
|
t && (s.value[r] = o[r], t = t.nextElementSibling);
|
|
58
58
|
}
|
|
59
|
-
return
|
|
59
|
+
return E(
|
|
60
60
|
() => s,
|
|
61
61
|
(e) => {
|
|
62
62
|
if (e.value.join("") === "")
|
|
@@ -74,10 +74,10 @@ const z = { class: "tw-mb-3 tw-flex tw-gap-6" }, q = ["onUpdate:modelValue", "on
|
|
|
74
74
|
ref: "otpCont",
|
|
75
75
|
class: "stash-confirmation-code-input tw-inline-block",
|
|
76
76
|
"data-test": "stash-confirmation-code-input",
|
|
77
|
-
onInput:
|
|
77
|
+
onInput: h
|
|
78
78
|
}, [
|
|
79
|
-
|
|
80
|
-
(c(!0), i(
|
|
79
|
+
I("div", q, [
|
|
80
|
+
(c(!0), i(N, null, T(a.digitCount, (t, u) => D((c(), i("input", {
|
|
81
81
|
key: t,
|
|
82
82
|
ref_for: !0,
|
|
83
83
|
ref_key: "inputEl",
|
|
@@ -92,11 +92,11 @@ const z = { class: "tw-mb-3 tw-flex tw-gap-6" }, q = ["onUpdate:modelValue", "on
|
|
|
92
92
|
{ [f(l)["has-success"]]: !!a.successText }
|
|
93
93
|
]]),
|
|
94
94
|
inputmode: "numeric",
|
|
95
|
-
onPaste: (r) => t === 1 &&
|
|
96
|
-
onKeyup: (r) =>
|
|
97
|
-
onClick: (r) =>
|
|
98
|
-
}, null, 42,
|
|
99
|
-
[
|
|
95
|
+
onPaste: (r) => t === 1 && k(r),
|
|
96
|
+
onKeyup: (r) => b(r, u),
|
|
97
|
+
onClick: (r) => w(r, u)
|
|
98
|
+
}, null, 42, B)), [
|
|
99
|
+
[S, s.value[t - 1]]
|
|
100
100
|
])), 128))
|
|
101
101
|
]),
|
|
102
102
|
a.errorText ? (c(), i("small", {
|
|
@@ -111,15 +111,15 @@ const z = { class: "tw-mb-3 tw-flex tw-gap-6" }, q = ["onUpdate:modelValue", "on
|
|
|
111
111
|
}, v(a.successText), 3)) : _("", !0)
|
|
112
112
|
], 544));
|
|
113
113
|
}
|
|
114
|
-
}),
|
|
115
|
-
otpCodeInput:
|
|
114
|
+
}), K = "_otpCodeInput_1qtz8_2", P = "_error_1qtz8_21", U = {
|
|
115
|
+
otpCodeInput: K,
|
|
116
116
|
"has-error": "_has-error_1qtz8_9",
|
|
117
117
|
"has-success": "_has-success_1qtz8_13",
|
|
118
|
-
error:
|
|
119
|
-
},
|
|
120
|
-
$style:
|
|
121
|
-
},
|
|
118
|
+
error: P
|
|
119
|
+
}, $ = {
|
|
120
|
+
$style: U
|
|
121
|
+
}, R = /* @__PURE__ */ z(M, [["__cssModules", $]]);
|
|
122
122
|
export {
|
|
123
|
-
|
|
123
|
+
R as default
|
|
124
124
|
};
|
|
125
125
|
//# sourceMappingURL=ConfirmationCodeInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationCodeInput.js","sources":["../src/components/ConfirmationCodeInput/ConfirmationCodeInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { 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\n const props = withDefaults(defineProps<VerificationCodeInputProps>(), {\n digitCount: 6,\n errorText: undefined,\n successText: undefined,\n });\n\n const emit
|
|
1
|
+
{"version":3,"file":"ConfirmationCodeInput.js","sources":["../src/components/ConfirmationCodeInput/ConfirmationCodeInput.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { 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\n const props = withDefaults(defineProps<VerificationCodeInputProps>(), {\n digitCount: 6,\n errorText: undefined,\n successText: undefined,\n });\n\n const emit = defineEmits<{\n (e: 'update:model-value', value: number | null): void;\n }>();\n\n const data: Ref<Array<string>> = ref([]);\n const inputEl = ref();\n\n function handleOtpInput(e) {\n if (e.data && e.target.nextElementSibling) {\n e.target.nextElementSibling.focus();\n } else if (e.data == null && e.target.previousElementSibling) {\n e.target.previousElementSibling.focus();\n }\n }\n\n function handleFocus(event, elementIndex: number) {\n event.preventDefault();\n\n if (data.value[elementIndex]) {\n inputEl.value[elementIndex].focus();\n\n return;\n }\n\n let focusedIndex = 0;\n\n data.value.forEach((value, index) => {\n if (value) {\n focusedIndex = index + 1;\n }\n });\n\n inputEl.value[focusedIndex].focus();\n }\n\n function handleKeyUp(e: KeyboardEvent, index: number) {\n if (e.key !== 'Backspace' && !new RegExp('^([0-9])$').test(e.key)) {\n e.preventDefault();\n return;\n }\n\n let focusedIndex = 0;\n\n if (index !== 0) {\n focusedIndex = index - 1;\n } else {\n focusedIndex = 0;\n }\n\n if (e.key === 'Backspace') {\n if (index + 1 === data.value.length - 1 && data.value[index]) {\n inputEl.value[index + 1].focus();\n return;\n }\n\n if (data.value[index]) {\n return;\n }\n\n data.value[focusedIndex] = '';\n inputEl.value[focusedIndex].focus();\n\n return;\n }\n\n if (!new RegExp('^([0-9])$').test(e.key) && !data.value[index]) {\n data.value[focusedIndex] = '';\n inputEl.value[focusedIndex].focus();\n return;\n }\n }\n\n function handlePaste(e: ClipboardEvent) {\n const pasteData = e.clipboardData?.getData('text');\n\n if (isNaN(Number(pasteData))) {\n inputEl.value[0].focus();\n return;\n }\n\n let nextEl = inputEl.value[0].nextElementSibling;\n if (pasteData) {\n for (let i = 1; i < pasteData.length; i++) {\n if (nextEl) {\n data.value[i] = pasteData[i];\n nextEl = nextEl.nextElementSibling;\n }\n }\n }\n }\n\n watch(\n () => data,\n (newVal) => {\n if (newVal.value.join('') === '') {\n emit('update:model-value', null);\n } else {\n if (isNaN(Number(newVal.value[0]))) {\n data.value[0] = '';\n return;\n }\n emit('update:model-value', Number(newVal.value.join('')));\n }\n },\n { deep: true },\n );\n</script>\n\n<template>\n <form\n ref=\"otpCont\"\n class=\"stash-confirmation-code-input tw-inline-block\"\n data-test=\"stash-confirmation-code-input\"\n @input=\"handleOtpInput\"\n >\n <div class=\"tw-mb-3 tw-flex tw-gap-6\">\n <template v-for=\"(field, index) in props.digitCount\" :key=\"field\">\n <input\n ref=\"inputEl\"\n v-model=\"data[field - 1]\"\n data-test=\"stash-confirmation-code-input__otp\"\n type=\"text\"\n maxlength=\"1\"\n class=\"tw-border tw-p-2 tw-text-center tw-text-base tw-font-medium tw-text-ice-900 focus:tw-border-blue-500\"\n :class=\"[\n classes.otpCodeInput,\n { [classes['has-error']]: !!props.errorText },\n { [classes['has-success']]: !!props.successText },\n ]\"\n inputmode=\"numeric\"\n @paste=\"field === 1 && handlePaste($event)\"\n @keyup=\"handleKeyUp($event, index)\"\n @click=\"(evt) => handleFocus(evt, index)\"\n />\n </template>\n </div>\n <small\n v-if=\"props.errorText\"\n class=\"tw-block tw-text-center tw-text-red-500\"\n :class=\"classes.error\"\n data-test=\"field-error\"\n >\n {{ props.errorText }}\n </small>\n <small\n v-if=\"props.successText\"\n class=\"tw-block tw-text-center tw-text-green-500\"\n :class=\"classes.error\"\n data-test=\"field-error\"\n >\n {{ props.successText }}\n </small>\n </form>\n</template>\n\n<style module>\n .otpCodeInput {\n border-radius: 4px;\n caret-color: transparent;\n height: 36px;\n width: 36px;\n }\n\n .otpCodeInput.has-error:not(:focus) {\n border-color: var(--color-red-500);\n }\n\n .otpCodeInput.has-success:not(:focus) {\n border-color: var(--color-green-500);\n }\n\n .otpCodeInput:focus {\n outline: none;\n }\n\n .error {\n margin-top: 4px;\n white-space: pre-line;\n }\n</style>\n"],"names":["classes","useCssModule","props","__props","emit","__emit","data","ref","inputEl","handleOtpInput","handleFocus","event","elementIndex","focusedIndex","value","index","handleKeyUp","handlePaste","pasteData","_a","nextEl","i","watch","newVal"],"mappings":";;;;;;;;;;;AAGE,UAAMA,IAAUC,KAcVC,IAAQC,GAMRC,IAAOC,GAIPC,IAA2BC,EAAI,CAAA,CAAE,GACjCC,IAAUD;AAEhB,aAASE,EAAe,GAAG;AACzB,MAAI,EAAE,QAAQ,EAAE,OAAO,qBACnB,EAAA,OAAO,mBAAmB,UACnB,EAAE,QAAQ,QAAQ,EAAE,OAAO,0BAClC,EAAA,OAAO,uBAAuB;IAEpC;AAES,aAAAC,EAAYC,GAAOC,GAAsB;AAG5C,UAFJD,EAAM,eAAe,GAEjBL,EAAK,MAAMM,CAAY,GAAG;AACpB,QAAAJ,EAAA,MAAMI,CAAY,EAAE,MAAM;AAElC;AAAA;AAGF,UAAIC,IAAe;AAEnB,MAAAP,EAAK,MAAM,QAAQ,CAACQ,GAAOC,MAAU;AACnC,QAAID,MACFD,IAAeE,IAAQ;AAAA,MACzB,CACD,GAEOP,EAAA,MAAMK,CAAY,EAAE,MAAM;AAAA,IACpC;AAES,aAAAG,EAAY,GAAkBD,GAAe;AAChD,UAAA,EAAE,QAAQ,eAAe,CAAC,IAAI,OAAO,WAAW,EAAE,KAAK,EAAE,GAAG,GAAG;AACjE,UAAE,eAAe;AACjB;AAAA;AAGF,UAAIF,IAAe;AAQf,UANAE,MAAU,IACZF,IAAeE,IAAQ,IAERF,IAAA,GAGb,EAAE,QAAQ,aAAa;AACrB,YAAAE,IAAQ,MAAMT,EAAK,MAAM,SAAS,KAAKA,EAAK,MAAMS,CAAK,GAAG;AAC5D,UAAAP,EAAQ,MAAMO,IAAQ,CAAC,EAAE,MAAM;AAC/B;AAAA;AAGE,YAAAT,EAAK,MAAMS,CAAK;AAClB;AAGG,QAAAT,EAAA,MAAMO,CAAY,IAAI,IACnBL,EAAA,MAAMK,CAAY,EAAE,MAAM;AAElC;AAAA;AAGF,UAAI,CAAC,IAAI,OAAO,WAAW,EAAE,KAAK,EAAE,GAAG,KAAK,CAACP,EAAK,MAAMS,CAAK,GAAG;AACzD,QAAAT,EAAA,MAAMO,CAAY,IAAI,IACnBL,EAAA,MAAMK,CAAY,EAAE,MAAM;AAClC;AAAA;AAAA,IAEJ;AAEA,aAASI,EAAY,GAAmB;;AACtC,YAAMC,KAAYC,IAAA,EAAE,kBAAF,gBAAAA,EAAiB,QAAQ;AAE3C,UAAI,MAAM,OAAOD,CAAS,CAAC,GAAG;AACpB,QAAAV,EAAA,MAAM,CAAC,EAAE,MAAM;AACvB;AAAA;AAGF,UAAIY,IAASZ,EAAQ,MAAM,CAAC,EAAE;AAC9B,UAAIU;AACF,iBAASG,IAAI,GAAGA,IAAIH,EAAU,QAAQG;AACpC,UAAID,MACFd,EAAK,MAAMe,CAAC,IAAIH,EAAUG,CAAC,GAC3BD,IAASA,EAAO;AAAA,IAIxB;AAEA,WAAAE;AAAA,MACE,MAAMhB;AAAA,MACN,CAACiB,MAAW;AACV,YAAIA,EAAO,MAAM,KAAK,EAAE,MAAM;AAC5B,UAAAnB,EAAK,sBAAsB,IAAI;AAAA,aAC1B;AACL,cAAI,MAAM,OAAOmB,EAAO,MAAM,CAAC,CAAC,CAAC,GAAG;AAC7B,YAAAjB,EAAA,MAAM,CAAC,IAAI;AAChB;AAAA;AAEF,UAAAF,EAAK,sBAAsB,OAAOmB,EAAO,MAAM,KAAK,EAAE,CAAC,CAAC;AAAA;AAAA,MAE5D;AAAA,MACA,EAAE,MAAM,GAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { AllowedComponentProps } from 'vue';
|
|
2
|
-
import { ComponentCustomProps } from 'vue';
|
|
3
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
4
3
|
import { DefineComponent } from 'vue';
|
|
5
4
|
import { ExtractPropTypes } from 'vue';
|
|
6
5
|
import { PropType } from 'vue';
|
|
7
|
-
import {
|
|
6
|
+
import { PublicProps } from 'vue';
|
|
8
7
|
|
|
9
8
|
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
9
|
|
|
@@ -27,23 +26,23 @@ declare type __VLS_WithDefaults<P, D> = {
|
|
|
27
26
|
}> : P[K];
|
|
28
27
|
};
|
|
29
28
|
|
|
30
|
-
declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VerificationCodeInputProps>, {
|
|
29
|
+
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VerificationCodeInputProps>, {
|
|
31
30
|
digitCount: number;
|
|
32
31
|
errorText: undefined;
|
|
33
32
|
successText: undefined;
|
|
34
|
-
}
|
|
33
|
+
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
35
34
|
"update:model-value": (value: number | null) => void;
|
|
36
|
-
}, string,
|
|
35
|
+
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VerificationCodeInputProps>, {
|
|
37
36
|
digitCount: number;
|
|
38
37
|
errorText: undefined;
|
|
39
38
|
successText: undefined;
|
|
40
|
-
}>>> & {
|
|
39
|
+
}>>> & Readonly<{
|
|
41
40
|
"onUpdate:model-value"?: ((value: number | null) => any) | undefined;
|
|
42
|
-
}
|
|
41
|
+
}>, {
|
|
43
42
|
errorText: string;
|
|
44
43
|
digitCount: number;
|
|
45
44
|
successText: string;
|
|
46
|
-
}, {}>;
|
|
45
|
+
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
47
46
|
export default _default;
|
|
48
47
|
|
|
49
48
|
export declare interface VerificationCodeInputProps {
|
package/dist/ContextSwitcher.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as _, computed as C, resolveComponent as g, openBlock as s, createElementBlock as i, Fragment as u, renderList as x, normalizeClass as d, toDisplayString as f, createBlock as E, withCtx as S, createTextVNode as b } from "vue";
|
|
2
2
|
import { APPS as a } from "./constants.js";
|
|
3
|
-
import { setPersistentItem as
|
|
3
|
+
import { setPersistentItem as T, getPersistentItem as v, removePersistentItem as R } from "./utils/storage.js";
|
|
4
4
|
import "@leaflink/snitch";
|
|
5
5
|
import "./utils/helpers.js";
|
|
6
6
|
import "lodash-es/camelCase";
|
|
7
7
|
import "lodash-es/get";
|
|
8
8
|
import "lodash-es/isFinite";
|
|
9
9
|
import "lodash-es/isPlainObject";
|
|
10
|
-
const
|
|
10
|
+
const N = {
|
|
11
11
|
class: "stash-context-switcher tw-mx-auto tw-flex tw-w-64 tw-rounded-full tw-border tw-border-white/10 tw-bg-purple-700 tw-p-1.5 tw-text-center",
|
|
12
12
|
"data-test": "stash-context-switcher"
|
|
13
|
-
},
|
|
13
|
+
}, B = ["href", "onClick"], h = "-last-session", Q = /* @__PURE__ */ _({
|
|
14
14
|
name: "ll-context-switcher",
|
|
15
15
|
__name: "ContextSwitcher",
|
|
16
16
|
props: {
|
|
@@ -23,8 +23,8 @@ const R = {
|
|
|
23
23
|
routeQuery: { default: () => ({}) }
|
|
24
24
|
},
|
|
25
25
|
emits: ["click", "switch"],
|
|
26
|
-
setup(A, { emit:
|
|
27
|
-
const e = A, y =
|
|
26
|
+
setup(A, { emit: y }) {
|
|
27
|
+
const e = A, p = y, P = C(() => [
|
|
28
28
|
{
|
|
29
29
|
app: a.MARKETPLACE,
|
|
30
30
|
name: e.portalAccess.commercePortal ? "dashboard" : e.limitedAccessUrl,
|
|
@@ -42,33 +42,33 @@ const R = {
|
|
|
42
42
|
const r = window.location.href;
|
|
43
43
|
let t = o.target.href;
|
|
44
44
|
if (e.portalAccess.paymentsPortal && e.portalAccess.commercePortal) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
45
|
+
const k = `${n === a.PAYMENTS ? a.MARKETPLACE : a.PAYMENTS}${h}`, w = `${n}${h}`;
|
|
46
|
+
T(k, r, { global: !0 });
|
|
47
|
+
const l = v(w, { global: !0 });
|
|
48
|
+
l && (o.preventDefault(), t = l, window.location.href = l, R(w, { global: !0 }));
|
|
49
49
|
}
|
|
50
50
|
p("click", { from: r, to: t }), p("switch", o, { from: r, to: t });
|
|
51
51
|
}
|
|
52
52
|
return (o, n) => {
|
|
53
|
-
const r =
|
|
54
|
-
return s(),
|
|
55
|
-
(s(!0),
|
|
53
|
+
const r = g("router-link");
|
|
54
|
+
return s(), i("div", N, [
|
|
55
|
+
(s(!0), i(u, null, x(P.value, (t) => (s(), i(u, {
|
|
56
56
|
key: t.app
|
|
57
57
|
}, [
|
|
58
|
-
t.hasBaseRoute ? (s(),
|
|
58
|
+
t.hasBaseRoute ? (s(), i("a", {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: d(["tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline", e.activeApp === t.app ? "tw-text-white tw-bg-royal-500" : "tw-text-ice-500"]),
|
|
61
61
|
href: `/${t.name}`,
|
|
62
62
|
onClick: (c) => m(c, t.app)
|
|
63
|
-
}, f(t.app), 11,
|
|
63
|
+
}, f(t.app), 11, B)) : (s(), E(r, {
|
|
64
64
|
key: 1,
|
|
65
65
|
class: d(["tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline", e.activeApp === t.app ? "tw-text-white tw-bg-royal-500" : "tw-text-ice-500"]),
|
|
66
66
|
to: { name: t.name, query: o.routeQuery },
|
|
67
67
|
"data-test-route": JSON.stringify({ name: t.name, query: o.routeQuery }),
|
|
68
68
|
onClick: (c) => m(c, t.app)
|
|
69
69
|
}, {
|
|
70
|
-
default:
|
|
71
|
-
|
|
70
|
+
default: S(() => [
|
|
71
|
+
b(f(t.app), 1)
|
|
72
72
|
]),
|
|
73
73
|
_: 2
|
|
74
74
|
}, 1032, ["class", "to", "data-test-route", "onClick"]))
|
|
@@ -78,6 +78,6 @@ const R = {
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
Q as default
|
|
82
82
|
};
|
|
83
83
|
//# sourceMappingURL=ContextSwitcher.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextSwitcher.js","sources":["../src/components/ContextSwitcher/ContextSwitcher.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { LocationQuery } from 'vue-router';\n\n import { APPS } from '../../constants';\n import { getPersistentItem, removePersistentItem, setPersistentItem } from '../../utils/storage';\n\n defineOptions({\n name: 'll-context-switcher',\n });\n\n type AppValues = typeof APPS[keyof typeof APPS];\n\n export interface ContextSwitcherProps {\n /**\n * The current app that is active. Choices are 'marketplace' | 'payments'.\n */\n activeApp: AppValues;\n\n /**\n * Portal access to both marketplace and payments.\n */\n portalAccess?: {\n commercePortal: boolean;\n paymentsPortal: boolean;\n };\n\n /**\n * Url to replace the other app if current user does not have portal access.\n */\n limitedAccessUrl: string;\n\n routeQuery?: LocationQuery;\n }\n\n const props = withDefaults(defineProps<ContextSwitcherProps>(), {\n portalAccess: () => ({\n commercePortal: false,\n paymentsPortal: false,\n }),\n routeQuery: () => ({}),\n });\n\n const emit
|
|
1
|
+
{"version":3,"file":"ContextSwitcher.js","sources":["../src/components/ContextSwitcher/ContextSwitcher.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed } from 'vue';\n import type { LocationQuery } from 'vue-router';\n\n import { APPS } from '../../constants';\n import { getPersistentItem, removePersistentItem, setPersistentItem } from '../../utils/storage';\n\n defineOptions({\n name: 'll-context-switcher',\n });\n\n type AppValues = (typeof APPS)[keyof typeof APPS];\n\n export interface ContextSwitcherProps {\n /**\n * The current app that is active. Choices are 'marketplace' | 'payments'.\n */\n activeApp: AppValues;\n\n /**\n * Portal access to both marketplace and payments.\n */\n portalAccess?: {\n commercePortal: boolean;\n paymentsPortal: boolean;\n };\n\n /**\n * Url to replace the other app if current user does not have portal access.\n */\n limitedAccessUrl: string;\n\n routeQuery?: LocationQuery;\n }\n\n const props = withDefaults(defineProps<ContextSwitcherProps>(), {\n portalAccess: () => ({\n commercePortal: false,\n paymentsPortal: false,\n }),\n routeQuery: () => ({}),\n });\n\n const emit = defineEmits<{\n /**\n * Fires on click of the context switcher.\n * @deprecated Use `switch` instead.\n */\n (e: 'click', urlInfo: { from: string; to: string }): void;\n /**\n * Fires on click of the context switcher.\n */\n (e: 'switch', evt: MouseEvent, urlInfo: { from: string; to: string }): void;\n }>();\n\n interface ContextItem {\n app: AppValues;\n name: string;\n hasBaseRoute: boolean;\n }\n\n const CONTEXT_SWITCHER_STORAGE_KEY = '-last-session';\n\n const routes = computed<ContextItem[]>(() => {\n return [\n {\n app: APPS.MARKETPLACE,\n name: props.portalAccess.commercePortal ? 'dashboard' : props.limitedAccessUrl,\n hasBaseRoute: props.portalAccess.commercePortal,\n },\n {\n app: APPS.PAYMENTS,\n name: props.portalAccess.paymentsPortal ? 'payments' : props.limitedAccessUrl,\n hasBaseRoute: false,\n },\n ];\n });\n\n /**\n * Saves the current url in local storage before leaving the current app, if user has access to both apps\n * If a previous session url exists, redirect users there instead then remove the local storage item afterward.\n *\n * @param event - Event from user click.\n * @param app - App name of the clicked link, is a key of `APPS`.\n */\n function handleClick(event: MouseEvent, app: AppValues) {\n if (app === props.activeApp) {\n return;\n }\n\n const currentLocation = window.location.href;\n let destination = (event.target as HTMLAnchorElement).href;\n\n if (props.portalAccess.paymentsPortal && props.portalAccess.commercePortal) {\n const appRoute = app === APPS.PAYMENTS ? APPS.MARKETPLACE : APPS.PAYMENTS;\n const currentSessionName = `${appRoute}${CONTEXT_SWITCHER_STORAGE_KEY}`;\n const prevSessionName = `${app}${CONTEXT_SWITCHER_STORAGE_KEY}`;\n\n // save the current url in local storage\n setPersistentItem(currentSessionName, currentLocation, { global: true });\n\n // get the other app's url from local storage\n const prevSessionUrl = getPersistentItem(prevSessionName, { global: true });\n\n // if it exists, redirect users to such location and remove the item from local storage\n if (prevSessionUrl) {\n event.preventDefault();\n destination = prevSessionUrl;\n window.location.href = prevSessionUrl;\n removePersistentItem(prevSessionName, { global: true });\n }\n }\n\n emit('click', { from: currentLocation, to: destination });\n emit('switch', event, { from: currentLocation, to: destination });\n }\n</script>\n\n<template>\n <div\n class=\"stash-context-switcher tw-mx-auto tw-flex tw-w-64 tw-rounded-full tw-border tw-border-white/10 tw-bg-purple-700 tw-p-1.5 tw-text-center\"\n data-test=\"stash-context-switcher\"\n >\n <template v-for=\"route in routes\" :key=\"route.app\">\n <!-- render anchor tag to override base route in Payments -->\n <a\n v-if=\"route.hasBaseRoute\"\n class=\"tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline\"\n :class=\"props.activeApp === route.app ? 'tw-text-white tw-bg-royal-500' : 'tw-text-ice-500'\"\n :href=\"`/${route.name}`\"\n @click=\"(evt) => handleClick(evt, route.app)\"\n >\n {{ route.app }}\n </a>\n\n <router-link\n v-else\n class=\"tw-w-1/2 tw-cursor-pointer tw-rounded-full tw-py-2.5 tw-font-semibold !tw-capitalize tw-leading-none !tw-no-underline\"\n :class=\"props.activeApp === route.app ? 'tw-text-white tw-bg-royal-500' : 'tw-text-ice-500'\"\n :to=\"{ name: route.name, query: routeQuery }\"\n :data-test-route=\"JSON.stringify({ name: route.name, query: routeQuery })\"\n @click=\"(evt) => handleClick(evt, route.app)\"\n >\n {{ route.app }}\n </router-link>\n </template>\n </div>\n</template>\n"],"names":["CONTEXT_SWITCHER_STORAGE_KEY","props","__props","emit","__emit","routes","computed","APPS","handleClick","event","app","currentLocation","destination","currentSessionName","prevSessionName","setPersistentItem","prevSessionUrl","getPersistentItem","removePersistentItem"],"mappings":";;;;;;;;;;;;4BA6DQA,IAA+B;;;;;;;;;;;;;;AA1BrC,UAAMC,IAAQC,GAQRC,IAAOC,GAoBPC,IAASC,EAAwB,MAC9B;AAAA,MACL;AAAA,QACE,KAAKC,EAAK;AAAA,QACV,MAAMN,EAAM,aAAa,iBAAiB,cAAcA,EAAM;AAAA,QAC9D,cAAcA,EAAM,aAAa;AAAA,MACnC;AAAA,MACA;AAAA,QACE,KAAKM,EAAK;AAAA,QACV,MAAMN,EAAM,aAAa,iBAAiB,aAAaA,EAAM;AAAA,QAC7D,cAAc;AAAA,MAChB;AAAA,IAAA,CAEH;AASQ,aAAAO,EAAYC,GAAmBC,GAAgB;AAClD,UAAAA,MAAQT,EAAM;AAChB;AAGI,YAAAU,IAAkB,OAAO,SAAS;AACpC,UAAAC,IAAeH,EAAM,OAA6B;AAEtD,UAAIR,EAAM,aAAa,kBAAkBA,EAAM,aAAa,gBAAgB;AAEpE,cAAAY,IAAqB,GADVH,MAAQH,EAAK,WAAWA,EAAK,cAAcA,EAAK,WACxBP,KACnCc,IAAkB,GAAGJ,IAAMV;AAGjC,QAAAe,EAAkBF,GAAoBF,GAAiB,EAAE,QAAQ,GAAM,CAAA;AAGvE,cAAMK,IAAiBC,EAAkBH,GAAiB,EAAE,QAAQ,IAAM;AAG1E,QAAIE,MACFP,EAAM,eAAe,GACPG,IAAAI,GACd,OAAO,SAAS,OAAOA,GACvBE,EAAqBJ,GAAiB,EAAE,QAAQ,GAAM,CAAA;AAAA;AAI1D,MAAAX,EAAK,SAAS,EAAE,MAAMQ,GAAiB,IAAIC,GAAa,GACxDT,EAAK,UAAUM,GAAO,EAAE,MAAME,GAAiB,IAAIC,GAAa;AAAA,IAClE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|