@leaflink/stash 51.9.3 → 51.10.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/assets/icons/cloud-share.svg +1 -0
- package/assets/spritesheet.svg +1 -1
- package/dist/Accordion.js.map +1 -1
- package/dist/Accordion.vue.d.ts +7 -38
- package/dist/ActionsDropdown.js +2 -2
- package/dist/ActionsDropdown.js.map +1 -1
- package/dist/ActionsDropdown.vue.d.ts +0 -74
- package/dist/AddressSelect.js +56 -60
- package/dist/AddressSelect.js.map +1 -1
- package/dist/AddressSelect.vue.d.ts +8 -65
- package/dist/Alert.js.map +1 -1
- package/dist/Alert.vue.d.ts +4 -41
- package/dist/AppNavigationItem.js.map +1 -1
- package/dist/AppNavigationItem.vue.d.ts +5 -32
- package/dist/AppSidebar.js.map +1 -1
- package/dist/AppSidebar.vue.d.ts +8 -35
- package/dist/AppTopbar.js +1 -1
- package/dist/AppTopbar.js.map +1 -1
- package/dist/AppTopbar.vue.d.ts +4 -33
- package/dist/Avatar.js.map +1 -1
- package/dist/Avatar.vue.d.ts +5 -44
- package/dist/Backdrop.js.map +1 -1
- package/dist/Backdrop.vue.d.ts +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Badge.vue.d.ts +6 -55
- package/dist/Box.vue.d.ts +3 -36
- package/dist/Box.vue_vue_type_script_setup_true_lang-rFnvwLVY.js.map +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Button.vue.d.ts +5 -50
- package/dist/ButtonGroup.js +33 -37
- package/dist/ButtonGroup.js.map +1 -1
- package/dist/ButtonGroup.vue.d.ts +6 -39
- package/dist/Card.js.map +1 -1
- package/dist/Card.vue.d.ts +5 -32
- package/dist/CardContent.js.map +1 -1
- package/dist/CardContent.vue.d.ts +1 -1
- package/dist/CardFooter.js.map +1 -1
- package/dist/CardFooter.vue.d.ts +1 -1
- package/dist/CardHeader.js.map +1 -1
- package/dist/CardHeader.vue.d.ts +2 -15
- package/dist/CardMedia.js.map +1 -1
- package/dist/CardMedia.vue.d.ts +2 -15
- package/dist/Carousel.js +66 -72
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +10 -10
- package/dist/Checkbox.js.map +1 -1
- package/dist/Checkbox.vue.d.ts +8 -53
- package/dist/ChevronToggle.vue.d.ts +7 -34
- package/dist/ChevronToggle.vue_vue_type_script_setup_true_lang-Ce_qOXfR.js.map +1 -1
- package/dist/Chip.js.map +1 -1
- package/dist/Chip.vue.d.ts +10 -52
- package/dist/ConfirmationCodeInput.js +40 -44
- package/dist/ConfirmationCodeInput.js.map +1 -1
- package/dist/ConfirmationCodeInput.vue.d.ts +8 -43
- package/dist/ContextSwitcher.js.map +1 -1
- package/dist/ContextSwitcher.vue.d.ts +6 -41
- package/dist/Copy.js.map +1 -1
- package/dist/Copy.vue.d.ts +3 -34
- package/dist/CurrencyInput.js +20 -21
- package/dist/CurrencyInput.js.map +1 -1
- package/dist/CurrencyInput.vue.d.ts +125 -46
- package/dist/CustomRender.js.map +1 -1
- package/dist/DataView.js +94 -96
- package/dist/DataView.js.map +1 -1
- package/dist/DataView.keys-aSOnA4AD.js.map +1 -1
- package/dist/DataView.vue.d.ts +15 -57
- package/dist/DataViewFilters.js +127 -139
- package/dist/DataViewFilters.js.map +1 -1
- package/dist/DataViewFilters.keys-BLu07FiP.js.map +1 -1
- package/dist/DataViewFilters.vue.d.ts +9 -54
- package/dist/DataViewSortButton.js +2 -2
- package/dist/DataViewSortButton.js.map +1 -1
- package/dist/DataViewSortButton.vue.d.ts +3 -30
- package/dist/DataViewToolbar.js +70 -62
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DataViewToolbar.vue.d.ts +5 -40
- package/dist/DatePicker.js +4524 -4636
- package/dist/DatePicker.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +32 -81
- package/dist/DescriptionList.js.map +1 -1
- package/dist/DescriptionList.vue.d.ts +3 -32
- package/dist/DescriptionListDetail.js.map +1 -1
- package/dist/DescriptionListDetail.vue.d.ts +1 -1
- package/dist/DescriptionListGroup.js.map +1 -1
- package/dist/DescriptionListGroup.vue.d.ts +1 -1
- package/dist/DescriptionListTerm.js.map +1 -1
- package/dist/DescriptionListTerm.vue.d.ts +1 -1
- package/dist/Dialog.js.map +1 -1
- package/dist/Dialog.vue.d.ts +10 -53
- package/dist/Divider.js.map +1 -1
- package/dist/Dropdown.js +89 -95
- package/dist/Dropdown.js.map +1 -1
- package/dist/Dropdown.vue.d.ts +12 -48
- package/dist/EmptyState.js +1 -1
- package/dist/EmptyState.js.map +1 -1
- package/dist/EmptyState.vue.d.ts +5 -62
- package/dist/Expand.vue.d.ts +10 -40
- package/dist/Expand.vue_vue_type_script_setup_true_lang-CiONJfAp.js.map +1 -1
- package/dist/Field.vue.d.ts +4 -53
- package/dist/Field.vue_vue_type_script_setup_true_lang-DI6z3AE9.js.map +1 -1
- package/dist/FileUpload.js +72 -74
- package/dist/FileUpload.js.map +1 -1
- package/dist/FileUpload.vue.d.ts +10 -44
- package/dist/FilterChip.js.map +1 -1
- package/dist/FilterChip.vue.d.ts +6 -41
- package/dist/FilterDrawerItem.js +21 -21
- package/dist/FilterDrawerItem.js.map +1 -1
- package/dist/FilterDrawerItem.vue.d.ts +6 -23
- package/dist/FilterDropdown.js +63 -69
- package/dist/FilterDropdown.js.map +1 -1
- package/dist/FilterDropdown.vue.d.ts +122 -35
- package/dist/FilterSelect.js.map +1 -1
- package/dist/FilterSelect.vue.d.ts +4 -31
- package/dist/Filters.js +157 -164
- package/dist/Filters.js.map +1 -1
- package/dist/Filters.vue.d.ts +0 -2190
- package/dist/HttpError.js +7 -7
- package/dist/HttpError.js.map +1 -1
- package/dist/HttpError.vue.d.ts +4 -41
- package/dist/Icon.js +16 -15
- package/dist/Icon.js.map +1 -1
- package/dist/Icon.vue.d.ts +4 -37
- package/dist/IconLabel.js.map +1 -1
- package/dist/IconLabel.vue.d.ts +6 -41
- package/dist/Illustration.js +2 -2
- package/dist/Illustration.vue.d.ts +3 -42
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js → Illustration.vue_vue_type_script_setup_true_lang-BVzzNsRt.js} +11 -11
- package/dist/{Illustration.vue_vue_type_script_setup_true_lang-BrqEF8xe.js.map → Illustration.vue_vue_type_script_setup_true_lang-BVzzNsRt.js.map} +1 -1
- package/dist/Image.js +2 -2
- package/dist/Image.vue.d.ts +5 -40
- package/dist/{Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js → Image.vue_vue_type_script_setup_true_lang-Dg2Zk2r2.js} +37 -41
- package/dist/{Image.vue_vue_type_script_setup_true_lang-D5u4av0_.js.map → Image.vue_vue_type_script_setup_true_lang-Dg2Zk2r2.js.map} +1 -1
- package/dist/InlineEdit.js.map +1 -1
- package/dist/InlineEdit.vue.d.ts +126 -47
- package/dist/Input.js.map +1 -1
- package/dist/Input.vue.d.ts +12 -45
- package/dist/InputOptions.js +66 -69
- package/dist/InputOptions.js.map +1 -1
- package/dist/InputOptions.vue.d.ts +10 -55
- package/dist/IntegrationIcon.js +7 -7
- package/dist/IntegrationIcon.js.map +1 -1
- package/dist/IntegrationIcon.vue.d.ts +3 -36
- package/dist/Label.vue.d.ts +3 -42
- package/dist/Label.vue_vue_type_script_setup_true_lang-CNquF3AP.js.map +1 -1
- package/dist/LicenseChip.js.map +1 -1
- package/dist/LicenseChip.vue.d.ts +3 -30
- package/dist/ListItem.js.map +1 -1
- package/dist/ListItem.vue.d.ts +0 -294
- package/dist/ListItemCell.js.map +1 -1
- package/dist/ListItemCell.vue.d.ts +0 -21
- package/dist/ListView.js +4 -7
- package/dist/ListView.js.map +1 -1
- package/dist/ListView.types.d.ts +0 -29
- package/dist/ListView.vue.d.ts +0 -5496
- package/dist/Loading.js +2 -2
- package/dist/Loading.js.map +1 -1
- package/dist/Loading.vue.d.ts +1 -1
- package/dist/Logo.js +1 -1
- package/dist/Logo.vue.d.ts +6 -41
- package/dist/{Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js → Logo.vue_vue_type_script_setup_true_lang-Y3iE9utm.js} +17 -17
- package/dist/Logo.vue_vue_type_script_setup_true_lang-Y3iE9utm.js.map +1 -0
- package/dist/Menu.js.map +1 -1
- package/dist/Menu.vue.d.ts +1 -1
- package/dist/MenuItem.js.map +1 -1
- package/dist/MenuItem.vue.d.ts +1 -1
- package/dist/MenusPlugin-B4jpNe7x.js +12 -0
- package/dist/{MenusPlugin-Bk6UW6o9.js.map → MenusPlugin-B4jpNe7x.js.map} +1 -1
- package/dist/Metric.js.map +1 -1
- package/dist/Metric.vue.d.ts +3 -34
- package/dist/Modal.js +62 -64
- package/dist/Modal.js.map +1 -1
- package/dist/Modal.vue.d.ts +13 -60
- package/dist/Modals.js +17 -18
- package/dist/Modals.js.map +1 -1
- package/dist/ModalsPlugin.js +11 -11
- package/dist/ModalsPlugin.js.map +1 -1
- package/dist/Module.js.map +1 -1
- package/dist/Module.keys-CEsrW2f0.js.map +1 -1
- package/dist/Module.types-B1FfGGac.js.map +1 -1
- package/dist/Module.vue.d.ts +2 -29
- package/dist/ModuleContent.js.map +1 -1
- package/dist/ModuleContent.vue.d.ts +3 -3
- package/dist/ModuleFooter.js.map +1 -1
- package/dist/ModuleFooter.vue.d.ts +1 -1
- package/dist/ModuleHeader.js.map +1 -1
- package/dist/ModuleHeader.vue.d.ts +5 -39
- package/dist/ObfuscateText.js.map +1 -1
- package/dist/ObfuscateText.vue.d.ts +3 -40
- package/dist/PageContent.js.map +1 -1
- package/dist/PageContent.vue.d.ts +3 -30
- package/dist/PageHeader.js.map +1 -1
- package/dist/PageHeader.vue.d.ts +6 -35
- package/dist/PageNavigation.js +50 -50
- package/dist/PageNavigation.js.map +1 -1
- package/dist/PageNavigation.vue.d.ts +7 -36
- package/dist/Paginate.js.map +1 -1
- package/dist/Paginate.vue.d.ts +5 -40
- package/dist/PlaidLink.js.map +1 -1
- package/dist/PlaidLink.vue.d.ts +12 -49
- package/dist/QuickAction.js.map +1 -1
- package/dist/QuickAction.vue.d.ts +3 -16
- package/dist/Radio.js.map +1 -1
- package/dist/Radio.vue.d.ts +0 -93
- package/dist/RadioGroup.js +94 -101
- package/dist/RadioGroup.js.map +1 -1
- package/dist/RadioGroup.vue.d.ts +116 -42
- package/dist/RadioNew.js +96 -99
- package/dist/RadioNew.js.map +1 -1
- package/dist/RadioNew.vue.d.ts +7 -48
- package/dist/RangeInput.js.map +1 -1
- package/dist/RangeInput.vue.d.ts +1 -1
- package/dist/SearchBar.js +38 -39
- package/dist/SearchBar.js.map +1 -1
- package/dist/SearchBar.vue.d.ts +127 -44
- package/dist/SectionHeader.js.map +1 -1
- package/dist/SectionHeader.vue.d.ts +6 -37
- package/dist/Select.js +171 -183
- package/dist/Select.js.map +1 -1
- package/dist/Select.vue.d.ts +23 -102
- package/dist/SelectStatus.js +38 -38
- package/dist/SelectStatus.js.map +1 -1
- package/dist/SelectStatus.vue.d.ts +227 -47
- package/dist/Skeleton.js.map +1 -1
- package/dist/Skeleton.vue.d.ts +3 -34
- package/dist/Step.js +44 -44
- package/dist/Step.js.map +1 -1
- package/dist/Step.vue.d.ts +4 -43
- package/dist/Stepper.js.map +1 -1
- package/dist/Stepper.vue.d.ts +9 -44
- package/dist/Switch.js.map +1 -1
- package/dist/Switch.vue.d.ts +8 -47
- package/dist/Tab.js +1 -1
- package/dist/Tab.js.map +1 -1
- package/dist/Tab.vue.d.ts +2 -15
- package/dist/TabPanel.js.map +1 -1
- package/dist/TabPanel.vue.d.ts +3 -30
- package/dist/Table.js +53 -59
- package/dist/Table.js.map +1 -1
- package/dist/Table.keys-LHQf6FEH.js.map +1 -1
- package/dist/Table.vue.d.ts +3 -50
- package/dist/TableCell.js +1 -1
- package/dist/TableCell.js.map +1 -1
- package/dist/TableCell.vue.d.ts +3 -32
- package/dist/TableHeaderCell.js +1 -1
- package/dist/TableHeaderCell.js.map +1 -1
- package/dist/TableHeaderCell.vue.d.ts +3 -30
- package/dist/TableHeaderRow.js +47 -45
- package/dist/TableHeaderRow.js.map +1 -1
- package/dist/TableHeaderRow.vue.d.ts +5 -34
- package/dist/TableRow.js +60 -61
- package/dist/TableRow.js.map +1 -1
- package/dist/TableRow.vue.d.ts +7 -48
- package/dist/Tabs.js +2 -2
- package/dist/Tabs.vue.d.ts +122 -31
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-Dprx064Y.js +156 -0
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-CmnBP4i1.js.map → Tabs.vue_vue_type_script_setup_true_lang-Dprx064Y.js.map} +1 -1
- package/dist/TextEditor.js +2414 -2420
- package/dist/TextEditor.js.map +1 -1
- package/dist/TextEditor.vue.d.ts +9 -40
- package/dist/Textarea.js +69 -69
- package/dist/Textarea.js.map +1 -1
- package/dist/Textarea.vue.d.ts +9 -44
- package/dist/Thumbnail.js +1 -1
- package/dist/Thumbnail.js.map +1 -1
- package/dist/Thumbnail.vue.d.ts +4 -4
- package/dist/ThumbnailEmpty.js.map +1 -1
- package/dist/ThumbnailEmpty.vue.d.ts +1 -1
- package/dist/ThumbnailGroup.js.map +1 -1
- package/dist/ThumbnailGroup.keys-EJ4qFNhx.js.map +1 -1
- package/dist/ThumbnailGroup.vue.d.ts +26 -22
- package/dist/Timeline.js.map +1 -1
- package/dist/Timeline.vue.d.ts +3 -32
- package/dist/TimelineItem.js.map +1 -1
- package/dist/TimelineItem.vue.d.ts +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Toast.vue.d.ts +3 -30
- package/dist/Toasts.js.map +1 -1
- package/dist/ToastsPlugin.js +11 -11
- package/dist/ToastsPlugin.js.map +1 -1
- package/dist/Tooltip.js +29 -30
- package/dist/Tooltip.js.map +1 -1
- package/dist/Tooltip.vue.d.ts +11 -43
- package/dist/colors-DDDVvqfQ.js.map +1 -1
- package/dist/components.css +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/directives/autofocus.js.map +1 -1
- package/dist/directives/clickoutside.js.map +1 -1
- package/dist/directives/observe.js.map +1 -1
- package/dist/directives/sticky.js.map +1 -1
- package/dist/directives/tooltip.js +3 -3
- package/dist/directives/tooltip.js.map +1 -1
- package/dist/directives/viewable.js +39 -44
- package/dist/directives/viewable.js.map +1 -1
- package/dist/{floating-ui.vue-pzUuloyX.js → floating-ui.vue-CL01Y9ER.js} +2 -2
- package/dist/{floating-ui.vue-pzUuloyX.js.map → floating-ui.vue-CL01Y9ER.js.map} +1 -1
- package/dist/formatDateTime-DG7kBc2T.js +1414 -0
- package/dist/{formatDateTime-Dz8bXV0R.js.map → formatDateTime-DG7kBc2T.js.map} +1 -1
- package/dist/index-D6bxWkZ1.js.map +1 -1
- package/dist/{index-ConQ3o31.js → index-GUu9zvbg.js} +3 -3
- package/dist/{index-ConQ3o31.js.map → index-GUu9zvbg.js.map} +1 -1
- package/dist/index.js +99 -104
- package/dist/index.js.map +1 -1
- package/dist/isDefined-DzVx0B6k.js.map +1 -1
- package/dist/keys-BEdEsanp.js.map +1 -1
- package/dist/keys-C8Zfr_By.js.map +1 -1
- package/dist/locale.js.map +1 -1
- package/dist/misc-CHQs-G03.js.map +1 -1
- package/dist/obfuscateText.d.ts +1 -1
- package/dist/parseISO-wlfIB_QJ.js.map +1 -1
- package/dist/searchFuzzy-DBDE6jkd.js +408 -0
- package/dist/{searchFuzzy-DRasJ33G.js.map → searchFuzzy-DBDE6jkd.js.map} +1 -1
- package/dist/statusLevels-D8EgtE_L.js.map +1 -1
- package/dist/storage.js.map +1 -1
- package/dist/tailwind-base.js +1 -1
- package/dist/tailwind-base.js.map +1 -1
- package/dist/toTimeZone-Coq1oPTt.js.map +1 -1
- package/dist/useConfirmBeforeClosing.js.map +1 -1
- package/dist/useDialog.d.ts +2 -2
- package/dist/useDialog.js +21 -25
- package/dist/useDialog.js.map +1 -1
- package/dist/useGoogleMaps.js +108 -110
- package/dist/useGoogleMaps.js.map +1 -1
- package/dist/useMediaQuery.d.ts +0 -6
- package/dist/useMediaQuery.js +11 -15
- package/dist/useMediaQuery.js.map +1 -1
- package/dist/useModals.d.ts +1 -1
- package/dist/useModals.js.map +1 -1
- package/dist/usePaginationStats-d_q39naC.js.map +1 -1
- package/dist/usePlaidLink.js +20 -27
- package/dist/usePlaidLink.js.map +1 -1
- package/dist/useScriptTag.js.map +1 -1
- package/dist/useSearch.js +13 -13
- package/dist/useSearch.js.map +1 -1
- package/dist/useSelection.js +56 -56
- package/dist/useSelection.js.map +1 -1
- package/dist/useSortable.js +54 -63
- package/dist/useSortable.js.map +1 -1
- package/dist/useStepper.d.ts +2 -2
- package/dist/useStepper.js +36 -40
- package/dist/useStepper.js.map +1 -1
- package/dist/useToasts.js +23 -23
- package/dist/useToasts.js.map +1 -1
- package/dist/useValidation.js +96 -100
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/calculateElementOverflow.js +4 -4
- package/dist/utils/calculateElementOverflow.js.map +1 -1
- package/dist/utils/colorScheme.js +2 -2
- package/dist/utils/colorScheme.js.map +1 -1
- package/dist/utils/createQueryString.js.map +1 -1
- package/dist/utils/createValidDate.js.map +1 -1
- package/dist/utils/formatDateTime.js +1 -1
- package/dist/utils/getContrastingTextColor.js.map +1 -1
- package/dist/utils/helpers.js.map +1 -1
- package/dist/utils/i18n.js.map +1 -1
- package/dist/utils/normalizeDate.js.map +1 -1
- package/dist/utils/obfuscateText.js +6 -6
- package/dist/utils/obfuscateText.js.map +1 -1
- package/dist/utils/searchFuzzy.js +1 -1
- package/dist/utils/storage.js +23 -23
- package/dist/utils/storage.js.map +1 -1
- package/package.json +12 -13
- package/tailwind-base.ts +1 -1
- package/types/vite.d.ts +7 -0
- package/types/vitest.d.ts +7 -0
- package/dist/Logo.vue_vue_type_script_setup_true_lang-Dz8c98sc.js.map +0 -1
- package/dist/MenusPlugin-Bk6UW6o9.js +0 -12
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-CmnBP4i1.js +0 -159
- package/dist/formatDateTime-Dz8bXV0R.js +0 -1418
- package/dist/searchFuzzy-DRasJ33G.js +0 -409
package/dist/Chip.vue.d.ts
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
|
-
import { ExtractPropTypes } from 'vue';
|
|
5
|
-
import { PropType } from 'vue';
|
|
6
4
|
import { PublicProps } from 'vue';
|
|
7
5
|
|
|
8
|
-
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
-
|
|
10
|
-
declare type __VLS_Prettify<T> = {
|
|
11
|
-
[K in keyof T]: T[K];
|
|
12
|
-
} & {};
|
|
13
|
-
|
|
14
|
-
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
24
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
-
default: D[K];
|
|
26
|
-
}> : P[K];
|
|
27
|
-
};
|
|
28
|
-
|
|
29
6
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
7
|
new (): {
|
|
31
8
|
$slots: S;
|
|
32
9
|
};
|
|
33
10
|
};
|
|
34
11
|
|
|
35
|
-
|
|
12
|
+
declare interface ChipProps {
|
|
36
13
|
/**
|
|
37
14
|
* The color for the chip that determines both the text and bg color. Needs to
|
|
38
15
|
* be one of the brand colors in our design system (not a shade).
|
|
@@ -74,43 +51,24 @@ export declare interface ChipProps {
|
|
|
74
51
|
disabled?: boolean;
|
|
75
52
|
}
|
|
76
53
|
|
|
77
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
shade: string;
|
|
82
|
-
bgColor: undefined;
|
|
83
|
-
textColor: undefined;
|
|
84
|
-
isRemovable: boolean;
|
|
85
|
-
shouldOverrideColors: boolean;
|
|
86
|
-
disabled: boolean;
|
|
87
|
-
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
88
|
-
click: () => void;
|
|
89
|
-
remove: () => void;
|
|
90
|
-
}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ChipProps>, {
|
|
91
|
-
size: string;
|
|
92
|
-
radius: string;
|
|
93
|
-
colorScheme: string;
|
|
94
|
-
shade: string;
|
|
95
|
-
bgColor: undefined;
|
|
96
|
-
textColor: undefined;
|
|
97
|
-
isRemovable: boolean;
|
|
98
|
-
shouldOverrideColors: boolean;
|
|
99
|
-
disabled: boolean;
|
|
100
|
-
}>>> & Readonly<{
|
|
54
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<ChipProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
55
|
+
click: () => any;
|
|
56
|
+
remove: () => any;
|
|
57
|
+
}, string, PublicProps, Readonly<ChipProps> & Readonly<{
|
|
101
58
|
onClick?: (() => any) | undefined;
|
|
102
59
|
onRemove?: (() => any) | undefined;
|
|
103
60
|
}>, {
|
|
104
|
-
|
|
61
|
+
textColor: "ice-700" | "white" | "black" | "red-500" | "orange-500" | "blue-500" | "green-500" | "purple-700" | "purple-500" | "purple-100" | "royal-700" | "royal-500" | "royal-100" | "blue-700" | "blue-100" | "teal-700" | "teal-500" | "teal-100" | "green-700" | "green-100" | "seafoam-700" | "seafoam-500" | "seafoam-100" | "yellow-700" | "yellow-500" | "yellow-100" | "orange-700" | "orange-100" | "red-700" | "red-100" | "ice-500" | "ice-200" | "ice-100";
|
|
105
62
|
size: "small" | "medium";
|
|
63
|
+
disabled: boolean;
|
|
106
64
|
shade: "main" | "light";
|
|
107
65
|
colorScheme: StashPrimaryColorGroup;
|
|
108
66
|
radius: "standard" | "none" | "pill";
|
|
109
|
-
bgColor: "ice-700" | "purple-700" | "purple-500" | "purple-100" | "royal-700" | "royal-500" | "royal-100" | "blue-700" | "blue-
|
|
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";
|
|
67
|
+
bgColor: "ice-700" | "white" | "black" | "red-500" | "orange-500" | "blue-500" | "green-500" | "purple-700" | "purple-500" | "purple-100" | "royal-700" | "royal-500" | "royal-100" | "blue-700" | "blue-100" | "teal-700" | "teal-500" | "teal-100" | "green-700" | "green-100" | "seafoam-700" | "seafoam-500" | "seafoam-100" | "yellow-700" | "yellow-500" | "yellow-100" | "orange-700" | "orange-100" | "red-700" | "red-100" | "ice-500" | "ice-200" | "ice-100";
|
|
111
68
|
isRemovable: boolean;
|
|
112
69
|
shouldOverrideColors: boolean;
|
|
113
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
70
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLSpanElement>, {
|
|
71
|
+
default?(_: {}): any;
|
|
114
72
|
default?(_: {}): any;
|
|
115
73
|
}>;
|
|
116
74
|
export default _default;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as D, useCssVars as I, useCssModule as v, ref as E, onMounted as V, watch as B, createElementBlock as a, openBlock as r, normalizeClass as x, unref as u, createElementVNode as P, createCommentVNode as p, Fragment as z, renderList as A, toDisplayString as f } from "vue";
|
|
2
|
+
import { _ as M } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const F = { class: "tw-mb-3 tw-flex tw-gap-6" }, K = ["value", "onInput"], S = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-red-500",
|
|
6
6
|
"data-test": "field-error"
|
|
7
|
-
},
|
|
7
|
+
}, U = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-green-500",
|
|
10
10
|
"data-test": "field-success"
|
|
11
|
-
},
|
|
11
|
+
}, j = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-ice-700",
|
|
14
14
|
"data-test": "field-hint"
|
|
15
|
-
},
|
|
15
|
+
}, L = /* @__PURE__ */ D({
|
|
16
16
|
__name: "ConfirmationCodeInput",
|
|
17
17
|
props: {
|
|
18
18
|
digitCount: { default: 6 },
|
|
@@ -23,23 +23,21 @@ const K = { class: "tw-mb-3 tw-flex tw-gap-6" }, S = ["value", "onInput"], U = {
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["update:model-value", "change", "focus", "blur"],
|
|
25
25
|
setup(g, { emit: b }) {
|
|
26
|
-
|
|
26
|
+
I((t) => ({
|
|
27
27
|
b1b2f1d6: t.digitCount
|
|
28
28
|
}));
|
|
29
|
-
const c =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
o.modelValue && (s.value = (t = o.modelValue) == null ? void 0 : t.split(""));
|
|
29
|
+
const c = v(), o = g, i = b, n = E([]);
|
|
30
|
+
V(() => {
|
|
31
|
+
o.modelValue && (n.value = o.modelValue?.split(""));
|
|
33
32
|
});
|
|
34
33
|
function k(t, e) {
|
|
35
|
-
|
|
36
|
-
s.value[e] = (n = t.target) == null ? void 0 : n.value, m(t), t.inputType === "deleteContentBackward" ? d(t) : (t.inputType === "insertText" || t.inputType === "deleteContentForward") && w(t);
|
|
34
|
+
n.value[e] = t.target?.value, m(t), t.inputType === "deleteContentBackward" ? l(t) : (t.inputType === "insertText" || t.inputType === "deleteContentForward") && w(t);
|
|
37
35
|
}
|
|
38
36
|
function m(t) {
|
|
39
|
-
const e =
|
|
37
|
+
const e = n.value.join("");
|
|
40
38
|
i("update:model-value", e), i("change", { originalEvent: t, value: e });
|
|
41
39
|
}
|
|
42
|
-
function
|
|
40
|
+
function l(t) {
|
|
43
41
|
const e = h(t.target);
|
|
44
42
|
e && (e.focus(), e.select());
|
|
45
43
|
}
|
|
@@ -64,18 +62,17 @@ const K = { class: "tw-mb-3 tw-flex tw-gap-6" }, S = ["value", "onInput"], U = {
|
|
|
64
62
|
i("blur", t);
|
|
65
63
|
}
|
|
66
64
|
function C(t) {
|
|
67
|
-
var e;
|
|
68
65
|
if (!(t.ctrlKey || t.metaKey))
|
|
69
66
|
switch (t.code) {
|
|
70
67
|
case "ArrowLeft":
|
|
71
|
-
|
|
68
|
+
l(t), t.preventDefault();
|
|
72
69
|
break;
|
|
73
70
|
case "ArrowUp":
|
|
74
71
|
case "ArrowDown":
|
|
75
72
|
t.preventDefault();
|
|
76
73
|
break;
|
|
77
74
|
case "Backspace":
|
|
78
|
-
|
|
75
|
+
t.target?.value.length === 0 && (l(t), t.preventDefault());
|
|
79
76
|
break;
|
|
80
77
|
case "ArrowRight":
|
|
81
78
|
w(t), t.preventDefault();
|
|
@@ -85,64 +82,63 @@ const K = { class: "tw-mb-3 tw-flex tw-gap-6" }, S = ["value", "onInput"], U = {
|
|
|
85
82
|
case "Tab":
|
|
86
83
|
break;
|
|
87
84
|
default:
|
|
88
|
-
(!(t.code !== "Space" && Number(t.key) >= 0 && Number(t.key) <= 9) ||
|
|
85
|
+
(!(t.code !== "Space" && Number(t.key) >= 0 && Number(t.key) <= 9) || n.value.join("").length >= o.digitCount && t.code !== "Delete") && t.preventDefault();
|
|
89
86
|
break;
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
89
|
function N(t) {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
isNaN(D) || (s.value = u.split(""), m(t));
|
|
90
|
+
const e = t.clipboardData?.getData("text");
|
|
91
|
+
if (e?.length) {
|
|
92
|
+
const s = e?.substring(0, o.digitCount), d = parseInt(s);
|
|
93
|
+
isNaN(d) || (n.value = s.split(""), m(t));
|
|
98
94
|
}
|
|
99
95
|
t.preventDefault();
|
|
100
96
|
}
|
|
101
|
-
return
|
|
97
|
+
return B(
|
|
102
98
|
() => o.modelValue,
|
|
103
99
|
(t) => {
|
|
104
|
-
|
|
100
|
+
n.value = t ? t.split("") : new Array(o.digitCount);
|
|
105
101
|
}
|
|
106
102
|
), (t, e) => (r(), a("div", {
|
|
107
|
-
class: x(["stash-confirmation-code-input tw-inline-block", [
|
|
103
|
+
class: x(["stash-confirmation-code-input tw-inline-block", [u(c)["stash-confirmation-code-input-container"]]]),
|
|
108
104
|
"data-test": "stash-confirmation-code-input"
|
|
109
105
|
}, [
|
|
110
|
-
|
|
111
|
-
(r(!0), a(
|
|
112
|
-
key:
|
|
106
|
+
P("div", F, [
|
|
107
|
+
(r(!0), a(z, null, A(o.digitCount, (s) => (r(), a("input", {
|
|
108
|
+
key: s,
|
|
113
109
|
"data-test": "stash-confirmation-code-input__otp",
|
|
114
110
|
class: x(["tw-border tw-bg-white tw-p-2 tw-text-center tw-text-base tw-font-medium tw-text-ice-900 focus:tw-border-blue-500", [
|
|
115
|
-
|
|
116
|
-
{ [
|
|
117
|
-
{ [
|
|
111
|
+
u(c)["otp-code-input"],
|
|
112
|
+
{ [u(c)["has-error"]]: !!o.errorText },
|
|
113
|
+
{ [u(c)["has-success"]]: !!o.successText }
|
|
118
114
|
]]),
|
|
119
115
|
type: "text",
|
|
120
116
|
inputmode: "numeric",
|
|
121
117
|
maxlength: "1",
|
|
122
|
-
value:
|
|
118
|
+
value: n.value[s - 1],
|
|
123
119
|
pattern: "[0-9]",
|
|
124
120
|
autocomplete: "one-time-code",
|
|
125
|
-
onInput: (
|
|
121
|
+
onInput: (d) => k(d, s - 1),
|
|
126
122
|
onKeydown: C,
|
|
127
123
|
onPaste: N,
|
|
128
124
|
onFocus: T,
|
|
129
125
|
onBlur: y
|
|
130
|
-
}, null, 42,
|
|
126
|
+
}, null, 42, K))), 128))
|
|
131
127
|
]),
|
|
132
|
-
o.errorText ? (r(), a("small",
|
|
133
|
-
o.successText ? (r(), a("small",
|
|
134
|
-
o.hintText ? (r(), a("small",
|
|
128
|
+
o.errorText ? (r(), a("small", S, f(o.errorText), 1)) : p("", !0),
|
|
129
|
+
o.successText ? (r(), a("small", U, f(o.successText), 1)) : p("", !0),
|
|
130
|
+
o.hintText ? (r(), a("small", j, f(o.hintText), 1)) : p("", !0)
|
|
135
131
|
], 2));
|
|
136
132
|
}
|
|
137
|
-
}),
|
|
133
|
+
}), R = {
|
|
138
134
|
"stash-confirmation-code-input-container": "_stash-confirmation-code-input-container_kwgaz_2",
|
|
139
135
|
"otp-code-input": "_otp-code-input_kwgaz_9",
|
|
140
136
|
"has-error": "_has-error_kwgaz_16",
|
|
141
137
|
"has-success": "_has-success_kwgaz_20"
|
|
142
|
-
},
|
|
143
|
-
$style:
|
|
144
|
-
},
|
|
138
|
+
}, $ = {
|
|
139
|
+
$style: R
|
|
140
|
+
}, H = /* @__PURE__ */ M(L, [["__cssModules", $]]);
|
|
145
141
|
export {
|
|
146
|
-
|
|
142
|
+
H as default
|
|
147
143
|
};
|
|
148
144
|
//# 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 { 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 tw-inline-block\"\n data-test=\"stash-confirmation-code-input\"\n :class=\"[classes['stash-confirmation-code-input-container']]\"\n >\n <div class=\"tw-mb-3 tw-flex tw-gap-6\">\n <template v-for=\"field in props.digitCount\" :key=\"field\">\n <input\n data-test=\"stash-confirmation-code-input__otp\"\n class=\"tw-border tw-bg-white 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['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=\"tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-red-500\"\n data-test=\"field-error\"\n >\n {{ props.errorText }}\n </small>\n <small\n v-if=\"props.successText\"\n class=\"tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-green-500\"\n data-test=\"field-success\"\n >\n {{ props.successText }}\n </small>\n <small\n v-if=\"props.hintText\"\n class=\"tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-ice-700\"\n data-test=\"field-hint\"\n >\n {{ props.hintText }}\n </small>\n </div>\n</template>\n\n<style module>\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</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,GAsBvBC,IAAQC,GAQRC,IAAOC,GAOPC,IAA2BC,EAAI,EAAE;AAEvC,IAAAC,EAAU,MAAM;;AACd,MAAIN,EAAM,eACRI,EAAK,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;;;;;;;;;;;;"}
|
|
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 tw-inline-block\"\n data-test=\"stash-confirmation-code-input\"\n :class=\"[classes['stash-confirmation-code-input-container']]\"\n >\n <div class=\"tw-mb-3 tw-flex tw-gap-6\">\n <template v-for=\"field in props.digitCount\" :key=\"field\">\n <input\n data-test=\"stash-confirmation-code-input__otp\"\n class=\"tw-border tw-bg-white 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['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=\"tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-red-500\"\n data-test=\"field-error\"\n >\n {{ props.errorText }}\n </small>\n <small\n v-if=\"props.successText\"\n class=\"tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-green-500\"\n data-test=\"field-success\"\n >\n {{ props.successText }}\n </small>\n <small\n v-if=\"props.hintText\"\n class=\"tw-mt-1 tw-block tw-whitespace-pre-line tw-pr-6 tw-text-center tw-text-ice-700\"\n data-test=\"field-hint\"\n >\n {{ props.hintText }}\n </small>\n </div>\n</template>\n\n<style module>\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</style>\n"],"names":["classes","useCssModule","props","__props","emit","__emit","data","ref","onMounted","handleInput","event","index","updateModel","moveToPrev","moveToNext","newValue","prevInput","findPrevInput","nextInput","findNextInput","element","prevElement","nextElement","handleFocus","handleBlur","handleKeyDown","handlePaste","paste","pastedCode","parsed","watch","_createElementBlock","_normalizeClass","_unref","_createElementVNode","_hoisted_1","_openBlock","_Fragment","_renderList","field","$event","_hoisted_3","_toDisplayString","_hoisted_4","_hoisted_5"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGE,UAAMA,IAAUC,EAAA,GAsBVC,IAAQC,GAQRC,IAAOC,GAOPC,IAA2BC,EAAI,EAAE;AAEvC,IAAAC,EAAU,MAAM;AACd,MAAIN,EAAM,eACRI,EAAK,QAAQJ,EAAM,YAAY,MAAM,EAAE;AAAA,IAE3C,CAAC;AAED,aAASO,EAAYC,GAAmBC,GAAO;AAC7C,MAAAL,EAAK,MAAMK,CAAK,IAAID,EAAM,QAAS,OACnCE,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,IAAWT,EAAK,MAAM,KAAK,EAAE;AACnC,MAAAF,EAAK,sBAAsBW,CAAQ,GACnCX,EAAK,UAAU,EAAE,eAAeM,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,IA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,SANRa,GAMQF,EADHxC,EAAM,QAAQ,GAAA,CAAA;;;;;;;;;;;"}
|
|
@@ -1,52 +1,17 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
|
-
import { ExtractPropTypes } from 'vue';
|
|
5
|
-
import { PropType } from 'vue';
|
|
6
4
|
import { PublicProps } from 'vue';
|
|
7
5
|
|
|
8
|
-
declare
|
|
9
|
-
|
|
10
|
-
declare type __VLS_Prettify<T> = {
|
|
11
|
-
[K in keyof T]: T[K];
|
|
12
|
-
} & {};
|
|
13
|
-
|
|
14
|
-
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
24
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
-
default: D[K];
|
|
26
|
-
}> : P[K];
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
declare const _default: DefineComponent<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<VerificationCodeInputProps>, {
|
|
30
|
-
digitCount: number;
|
|
31
|
-
errorText: undefined;
|
|
32
|
-
successText: undefined;
|
|
33
|
-
hintText: undefined;
|
|
34
|
-
modelValue: undefined;
|
|
35
|
-
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
36
|
-
"update:model-value": (value: string | null) => void;
|
|
6
|
+
declare const _default: DefineComponent<VerificationCodeInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
7
|
+
blur: (params: Event) => any;
|
|
37
8
|
change: (params: {
|
|
38
9
|
originalEvent: Event;
|
|
39
10
|
value: string | null;
|
|
40
|
-
}) =>
|
|
41
|
-
focus: (params: Event) =>
|
|
42
|
-
|
|
43
|
-
}, string, PublicProps, Readonly<
|
|
44
|
-
digitCount: number;
|
|
45
|
-
errorText: undefined;
|
|
46
|
-
successText: undefined;
|
|
47
|
-
hintText: undefined;
|
|
48
|
-
modelValue: undefined;
|
|
49
|
-
}>>> & Readonly<{
|
|
11
|
+
}) => any;
|
|
12
|
+
focus: (params: Event) => any;
|
|
13
|
+
"update:model-value": (value: string | null) => any;
|
|
14
|
+
}, string, PublicProps, Readonly<VerificationCodeInputProps> & Readonly<{
|
|
50
15
|
onBlur?: ((params: Event) => any) | undefined;
|
|
51
16
|
onChange?: ((params: {
|
|
52
17
|
originalEvent: Event;
|
|
@@ -60,10 +25,10 @@ hintText: string;
|
|
|
60
25
|
modelValue: string;
|
|
61
26
|
digitCount: number;
|
|
62
27
|
successText: string;
|
|
63
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
28
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
64
29
|
export default _default;
|
|
65
30
|
|
|
66
|
-
|
|
31
|
+
declare interface VerificationCodeInputProps {
|
|
67
32
|
digitCount?: number;
|
|
68
33
|
/**
|
|
69
34
|
* Error text to display.
|
|
@@ -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 = 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,
|
|
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","_openBlock","_createElementBlock","_hoisted_1","_Fragment","_renderList","route","_normalizeClass","evt","_toDisplayString","_hoisted_2","_createBlock","_component_router_link","routeQuery","_createTextVNode"],"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,MAAA;AAAA,MAEnC;AAAA,QACE,KAAKM,EAAK;AAAA,QACV,MAAMN,EAAM,aAAa,iBAAiB,aAAaA,EAAM;AAAA,QAC7D,cAAc;AAAA,MAAA;AAAA,IAChB,CAEH;AASD,aAASO,EAAYC,GAAmBC,GAAgB;AACtD,UAAIA,MAAQT,EAAM;AAChB;AAGF,YAAMU,IAAkB,OAAO,SAAS;AACxC,UAAIC,IAAeH,EAAM,OAA6B;AAEtD,UAAIR,EAAM,aAAa,kBAAkBA,EAAM,aAAa,gBAAgB;AAE1E,cAAMY,IAAqB,G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,MAAe;AAAA,cAAZQ,EAAAL,EAAAH,EAAM,GAAG,GAAA,CAAA;AAAA,YAAA;;;;;;;;"}
|
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
|
-
import { ExtractPropTypes } from 'vue';
|
|
5
4
|
import { LocationQuery } from 'vue-router';
|
|
6
|
-
import { PropType } from 'vue';
|
|
7
5
|
import { PublicProps } from 'vue';
|
|
8
6
|
|
|
9
|
-
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
10
|
-
|
|
11
|
-
declare type __VLS_Prettify<T> = {
|
|
12
|
-
[K in keyof T]: T[K];
|
|
13
|
-
} & {};
|
|
14
|
-
|
|
15
|
-
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
16
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
-
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
-
} : {
|
|
19
|
-
type: PropType<T[K]>;
|
|
20
|
-
required: true;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
25
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
26
|
-
default: D[K];
|
|
27
|
-
}> : P[K];
|
|
28
|
-
};
|
|
29
|
-
|
|
30
7
|
/**
|
|
31
8
|
* LeafLink app names
|
|
32
9
|
*/
|
|
@@ -37,7 +14,7 @@ declare const APPS: {
|
|
|
37
14
|
|
|
38
15
|
declare type AppValues = (typeof APPS)[keyof typeof APPS];
|
|
39
16
|
|
|
40
|
-
|
|
17
|
+
declare interface ContextSwitcherProps {
|
|
41
18
|
/**
|
|
42
19
|
* The current app that is active. Choices are 'marketplace' | 'payments'.
|
|
43
20
|
*/
|
|
@@ -56,28 +33,16 @@ export declare interface ContextSwitcherProps {
|
|
|
56
33
|
routeQuery?: LocationQuery;
|
|
57
34
|
}
|
|
58
35
|
|
|
59
|
-
declare const _default: DefineComponent<
|
|
60
|
-
portalAccess: () => {
|
|
61
|
-
commercePortal: boolean;
|
|
62
|
-
paymentsPortal: boolean;
|
|
63
|
-
};
|
|
64
|
-
routeQuery: () => {};
|
|
65
|
-
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
36
|
+
declare const _default: DefineComponent<ContextSwitcherProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
66
37
|
click: (urlInfo: {
|
|
67
38
|
from: string;
|
|
68
39
|
to: string;
|
|
69
|
-
}) =>
|
|
40
|
+
}) => any;
|
|
70
41
|
switch: (evt: MouseEvent, urlInfo: {
|
|
71
42
|
from: string;
|
|
72
43
|
to: string;
|
|
73
|
-
}) =>
|
|
74
|
-
}, string, PublicProps, Readonly<
|
|
75
|
-
portalAccess: () => {
|
|
76
|
-
commercePortal: boolean;
|
|
77
|
-
paymentsPortal: boolean;
|
|
78
|
-
};
|
|
79
|
-
routeQuery: () => {};
|
|
80
|
-
}>>> & Readonly<{
|
|
44
|
+
}) => any;
|
|
45
|
+
}, string, PublicProps, Readonly<ContextSwitcherProps> & Readonly<{
|
|
81
46
|
onClick?: ((urlInfo: {
|
|
82
47
|
from: string;
|
|
83
48
|
to: string;
|
|
@@ -92,7 +57,7 @@ commercePortal: boolean;
|
|
|
92
57
|
paymentsPortal: boolean;
|
|
93
58
|
};
|
|
94
59
|
routeQuery: LocationQuery;
|
|
95
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
60
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
96
61
|
export default _default;
|
|
97
62
|
|
|
98
63
|
export { }
|
package/dist/Copy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Copy.js","sources":["../src/components/Copy/Copy.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useCssModule } from 'vue';\n\n import { UI_TIMEOUT } from '../../constants';\n import vTooltip from '../../directives/tooltip/tooltip';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface CopyProps {\n /**\n * Optional text to display instead of icon.\n */\n text?: string;\n\n /**\n * The value to copy to clipboard.\n */\n value?: string;\n\n /**\n * Sets the copy icon or text to always be visible. By default, icon/text only appears when hovering over slot content.\n */\n visible?: boolean;\n }\n\n const props = withDefaults(defineProps<CopyProps>(), {\n text: undefined,\n value: '', // Todo - We should default this to the content of the default slot so you can do <Copy>631f67a</Copy>.\n visible: false,\n });\n const classes = useCssModule();\n\n // Flag to indicate whether a user successfully copied the text to their clipboard.\n // Note: We reset this flag after a timeout to allow the user to copy the text multiple times.\n const isCopied = ref(false);\n\n const tooltip = computed(() => {\n return isCopied.value ? t('ll.copy.copied') : !props.text ? t('ll.copy.copyToClipboard') : null;\n });\n\n function handleCopy() {\n navigator.clipboard.writeText(props.value);\n isCopied.value = true;\n\n setTimeout(() => {\n isCopied.value = false;\n }, UI_TIMEOUT);\n }\n</script>\n\n<template>\n <div class=\"stash-copy tw-flex tw-items-center\" :class=\"{ [classes.hidden]: !props.visible }\" data-test=\"stash-copy\">\n <!-- @slot Anything you want to render. This is not what will be copied to the clipboard. -->\n <slot></slot>\n <div\n v-tooltip.top=\"tooltip\"\n class=\"stash-copy__copy-zone tw-ml-3 tw-cursor-pointer\"\n :class=\"classes.copy\"\n data-test=\"stash-copy|copy-zone\"\n >\n <Icon\n v-if=\"isCopied\"\n class=\"stash-copy__success-icon tw-text-green-500\"\n name=\"circle-check\"\n data-test=\"stash-copy|success-icon\"\n />\n <Button\n v-else-if=\"props.text\"\n class=\"stash-copy__copy-text\"\n inline\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n >\n {{ props.text }}\n </Button>\n <Icon\n v-else\n class=\"stash-copy__copy-icon\"\n name=\"copy\"\n title=\"Copy to clipboard\"\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n />\n </div>\n </div>\n</template>\n\n<style module>\n .hidden {\n .copy {\n visibility: hidden;\n }\n\n &:hover {\n .copy {\n visibility: visible;\n }\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","isCopied","ref","tooltip","computed","t","handleCopy","UI_TIMEOUT"],"mappings":";;;;;;;;;;;;;;;AA0BE,UAAMA,IAAQC,GAKRC,IAAUC,
|
|
1
|
+
{"version":3,"file":"Copy.js","sources":["../src/components/Copy/Copy.vue"],"sourcesContent":["<script setup lang=\"ts\">\n import { computed, ref, useCssModule } from 'vue';\n\n import { UI_TIMEOUT } from '../../constants';\n import vTooltip from '../../directives/tooltip/tooltip';\n import { t } from '../../locale';\n import Button from '../Button/Button.vue';\n import Icon from '../Icon/Icon.vue';\n\n export interface CopyProps {\n /**\n * Optional text to display instead of icon.\n */\n text?: string;\n\n /**\n * The value to copy to clipboard.\n */\n value?: string;\n\n /**\n * Sets the copy icon or text to always be visible. By default, icon/text only appears when hovering over slot content.\n */\n visible?: boolean;\n }\n\n const props = withDefaults(defineProps<CopyProps>(), {\n text: undefined,\n value: '', // Todo - We should default this to the content of the default slot so you can do <Copy>631f67a</Copy>.\n visible: false,\n });\n const classes = useCssModule();\n\n // Flag to indicate whether a user successfully copied the text to their clipboard.\n // Note: We reset this flag after a timeout to allow the user to copy the text multiple times.\n const isCopied = ref(false);\n\n const tooltip = computed(() => {\n return isCopied.value ? t('ll.copy.copied') : !props.text ? t('ll.copy.copyToClipboard') : null;\n });\n\n function handleCopy() {\n navigator.clipboard.writeText(props.value);\n isCopied.value = true;\n\n setTimeout(() => {\n isCopied.value = false;\n }, UI_TIMEOUT);\n }\n</script>\n\n<template>\n <div class=\"stash-copy tw-flex tw-items-center\" :class=\"{ [classes.hidden]: !props.visible }\" data-test=\"stash-copy\">\n <!-- @slot Anything you want to render. This is not what will be copied to the clipboard. -->\n <slot></slot>\n <div\n v-tooltip.top=\"tooltip\"\n class=\"stash-copy__copy-zone tw-ml-3 tw-cursor-pointer\"\n :class=\"classes.copy\"\n data-test=\"stash-copy|copy-zone\"\n >\n <Icon\n v-if=\"isCopied\"\n class=\"stash-copy__success-icon tw-text-green-500\"\n name=\"circle-check\"\n data-test=\"stash-copy|success-icon\"\n />\n <Button\n v-else-if=\"props.text\"\n class=\"stash-copy__copy-text\"\n inline\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n >\n {{ props.text }}\n </Button>\n <Icon\n v-else\n class=\"stash-copy__copy-icon\"\n name=\"copy\"\n title=\"Copy to clipboard\"\n data-test=\"stash-copy|copy-target\"\n @click=\"handleCopy\"\n />\n </div>\n </div>\n</template>\n\n<style module>\n .hidden {\n .copy {\n visibility: hidden;\n }\n\n &:hover {\n .copy {\n visibility: visible;\n }\n }\n }\n</style>\n"],"names":["props","__props","classes","useCssModule","isCopied","ref","tooltip","computed","t","handleCopy","UI_TIMEOUT","_createElementBlock","_normalizeClass","_unref","_renderSlot","_ctx","_createBlock","Icon","Button","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;AA0BE,UAAMA,IAAQC,GAKRC,IAAUC,EAAA,GAIVC,IAAWC,EAAI,EAAK,GAEpBC,IAAUC,EAAS,MAChBH,EAAS,QAAQI,EAAE,gBAAgB,IAAKR,EAAM,OAAsC,OAA/BQ,EAAE,yBAAyB,CACxF;AAED,aAASC,IAAa;AACpB,gBAAU,UAAU,UAAUT,EAAM,KAAK,GACzCI,EAAS,QAAQ,IAEjB,WAAW,MAAM;AACf,QAAAA,EAAS,QAAQ;AAAA,MACnB,GAAGM,CAAU;AAAA,IACf;2BAIAC,EAiCM,OAAA;AAAA,MAjCD,OAAKC,EAAA,CAAC,sCAAoC,EAAA,CAAYC,EAAAX,CAAA,EAAQ,MAAM,GAAA,CAAIF,EAAM,QAAA,CAAO,CAAA;AAAA,MAAI,aAAU;AAAA,IAAA;MAEtGc,EAAaC,EAAA,QAAA,SAAA;AAAA,cACbJ,EA6BM,OAAA;AAAA,QA3BJ,OAAKC,EAAA,CAAC,mDACEC,EAAAX,CAAA,EAAQ,IAAI,CAAA;AAAA,QACpB,aAAU;AAAA,MAAA;QAGFE,EAAA,cADRY,EAKEC,GAAA;AAAA;UAHA,OAAM;AAAA,UACN,MAAK;AAAA,UACL,aAAU;AAAA,QAAA,MAGCjB,EAAM,aADnBgB,EAQSE,GAAA;AAAA;UANP,OAAM;AAAA,UACN,QAAA;AAAA,UACA,aAAU;AAAA,UACT,SAAOT;AAAA,QAAA;qBAER,MAAgB;AAAA,YAAbU,EAAAC,EAAApB,EAAM,IAAI,GAAA,CAAA;AAAA,UAAA;;oBAEfgB,EAOEC,GAAA;AAAA;UALA,OAAM;AAAA,UACN,MAAK;AAAA,UACL,OAAM;AAAA,UACN,aAAU;AAAA,UACT,SAAOR;AAAA,QAAA;;;;UA1BKH,EAAA;AAAA;UAAL,EAAA,KAAV,GAAA;AAAA,QAAuB;AAAA;;;;;;;;;"}
|
package/dist/Copy.vue.d.ts
CHANGED
|
@@ -1,38 +1,15 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue';
|
|
2
2
|
import { ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { DefineComponent } from 'vue';
|
|
4
|
-
import { ExtractPropTypes } from 'vue';
|
|
5
|
-
import { PropType } from 'vue';
|
|
6
4
|
import { PublicProps } from 'vue';
|
|
7
5
|
|
|
8
|
-
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
-
|
|
10
|
-
declare type __VLS_Prettify<T> = {
|
|
11
|
-
[K in keyof T]: T[K];
|
|
12
|
-
} & {};
|
|
13
|
-
|
|
14
|
-
declare type __VLS_TypePropsToRuntimeProps<T> = {
|
|
15
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
16
|
-
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
17
|
-
} : {
|
|
18
|
-
type: PropType<T[K]>;
|
|
19
|
-
required: true;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
declare type __VLS_WithDefaults<P, D> = {
|
|
24
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
-
default: D[K];
|
|
26
|
-
}> : P[K];
|
|
27
|
-
};
|
|
28
|
-
|
|
29
6
|
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
7
|
new (): {
|
|
31
8
|
$slots: S;
|
|
32
9
|
};
|
|
33
10
|
};
|
|
34
11
|
|
|
35
|
-
|
|
12
|
+
declare interface CopyProps {
|
|
36
13
|
/**
|
|
37
14
|
* Optional text to display instead of icon.
|
|
38
15
|
*/
|
|
@@ -47,19 +24,11 @@ export declare interface CopyProps {
|
|
|
47
24
|
visible?: boolean;
|
|
48
25
|
}
|
|
49
26
|
|
|
50
|
-
declare const _default: __VLS_WithTemplateSlots<DefineComponent<
|
|
51
|
-
text: undefined;
|
|
52
|
-
value: string;
|
|
53
|
-
visible: boolean;
|
|
54
|
-
}>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<CopyProps>, {
|
|
55
|
-
text: undefined;
|
|
56
|
-
value: string;
|
|
57
|
-
visible: boolean;
|
|
58
|
-
}>>> & Readonly<{}>, {
|
|
27
|
+
declare const _default: __VLS_WithTemplateSlots<DefineComponent<CopyProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<CopyProps> & Readonly<{}>, {
|
|
59
28
|
text: string;
|
|
60
29
|
value: string;
|
|
61
30
|
visible: boolean;
|
|
62
|
-
}, {}, {}, {}, string, ComponentProvideOptions,
|
|
31
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>, {
|
|
63
32
|
default?(_: {}): any;
|
|
64
33
|
}>;
|
|
65
34
|
export default _default;
|